util.hide library
authorJason Etheridge <jason@esilibrary.com>
Thu, 15 Mar 2012 04:58:05 +0000 (00:58 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 16 Mar 2012 18:15:52 +0000 (14:15 -0400)
commit4bb229b91073d7a499cbd16a4d26ebe7077fb935
treedda01af4f5f240fbf11757127d679c217dc4452b
parentb6c7fa59d33d28252c4a41adc1c10e1ce7b87896
util.hide library

Provides util.hide.generate_dialog and util.hide.generate_css.

util.hide.generate_css takes one parameter, an org unit setting name for a
setting of type array. It tests this setting and for every value in the array
it looks for DOM elements with 'hideable' attributes containing those values.
It adds the CSS classname 'hideme' to such elements, and removes 'hideme' from
any non-matched elements that also have 'hideable' attributes.

util.hide.generate_dialog takes the same setting parameter as generate_css, and
an optional context org parameter (defaults to the workstation library). It pops
up a dialog with a checkbox for every 'hideable' DOM element. Clicking 'OK' will
update the org unit setting with every checked element, and it then calls
generate_css to update the interface being affected.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-ui.hide_copy_editor_fields.sql [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/util/hide.js [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul