util.hide library
authorJason Etheridge <jason@esilibrary.com>
Thu, 15 Mar 2012 04:58:05 +0000 (00:58 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 27 Mar 2012 18:08:45 +0000 (14:08 -0400)
commit818454dc227fe5560fe8aa255e8a9516c624be82
treee801e25bc1ff8f017298ecdef3e5d55f68431d80
parent864a8dc4548fec46a506319ef5a8a662f014601d
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>
Signed-off-by: Bill Erickson <berick@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