]> git.evergreen-ils.org Git - working/Evergreen.git/commit
util.hide library
authorJason Etheridge <jason@esilibrary.com>
Thu, 15 Mar 2012 04:58:05 +0000 (00:58 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 2 Apr 2012 11:46:38 +0000 (07:46 -0400)
commit092c4579ad6d40680d471dfca8bd952da6c859b0
treed1f748bbf3f489f10d5b13e500f9be8100aad6f6
parent131ad24c1c3dfba1c94731defb10318e62975751
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>
Signed-off-by: Mike Rylander <mrylander@gmail.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