[open-ils-commits] r14224 - in trunk/Open-ILS/xul/staff_client: chrome/content/OpenILS server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Sep 30 12:18:06 EDT 2009
Author: phasefx
Date: 2009-09-30 12:18:03 -0400 (Wed, 30 Sep 2009)
New Revision: 14224
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
trunk/Open-ILS/xul/staff_client/server/circ/checkin.xul
trunk/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
Log:
Indicators for the Checkin Modifiers (since the checkboxes are now hidden from view). oils_persist support for menuitems @type=checkbox. Without that hidePopup() in the onload, oils_persist will make the menu popup sit open.
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js 2009-09-30 15:46:37 UTC (rev 14223)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js 2009-09-30 16:18:03 UTC (rev 14224)
@@ -51,7 +51,7 @@
dump('persist_helper: retrieving key = ' + key + ' value = ' + value + ' for ' + nodes[i].nodeName + '\n');
if (value) nodes[i].setAttribute( attribute_list[j], value );
}
- if (nodes[i].nodeName == 'checkbox' && attribute_list.indexOf('checked') > -1) {
+ if ( (nodes[i].nodeName == 'checkbox' || nodes[i].nodeName == 'menuitem') && attribute_list.indexOf('checked') > -1) {
if (nodes[i].disabled == false && nodes[i].hidden == false) {
var no_poke = nodes[i].getAttribute('oils_persist_no_poke');
if (no_poke && no_poke == 'true') {
@@ -69,12 +69,17 @@
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var key = bk + 'checked';
- var value = ev.target.checked;
+ var value;
+ if (ev.target.nodeName == 'checkbox') {
+ value = ev.target.checked;
+ } else {
+ value = ev.target.getAttribute('checked'); // menuitem with type="checkbox"
+ }
ev.target.setAttribute( 'checked', value );
prefs.setCharPref( key, value );
- dump('persist_helper: setting key = ' + key + ' value = ' + value + ' for checkbox\n');
+ dump('persist_helper: setting key = ' + key + ' value = ' + value + ' for checkbox/menuitem\n');
} catch(E) {
- alert('Error in persist_helper(), checkbox command event listener: ' + E);
+ alert('Error in persist_helper(), checkbox/menuitem command event listener: ' + E);
}
};
}(base_key),
Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkin.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkin.xul 2009-09-30 15:46:37 UTC (rev 14223)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkin.xul 2009-09-30 16:18:03 UTC (rev 14224)
@@ -20,7 +20,7 @@
<?xul-overlay href="/xul/server/circ/checkin_overlay.xul"?>
<window id="checkin_win"
- onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }"
+ onload="try { my_init(); font_helper(); persist_helper(); document.getElementById('checkin_modifiers_popup').hidePopup(); } catch(E) { alert(E); }"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul 2009-09-30 15:46:37 UTC (rev 14223)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul 2009-09-30 16:18:03 UTC (rev 14224)
@@ -41,8 +41,14 @@
<hbox id="background" style="background-color: green;">
<spacer flex="1"/>
<vbox>
- <label id="background-text" value="&staff.circ.checkin_overlay.background_text;" style="font-size: x-large; font-weight: bold;"/>
- <label id="hold_capture_blurb" hidden="true" value="&staff.circ.checkin_overlay.background_text.hold_capture;" style="font-size: large; font-weight: bold;"/>
+ <hbox align="center"><label id="background-text" value="&staff.circ.checkin_overlay.background_text;" style="font-size: x-large; font-weight: bold;"/></hbox>
+ <hbox align="center"><label id="hold_capture_blurb" hidden="true" value="&staff.circ.checkin_overlay.background_text.hold_capture;" style="font-size: large; font-weight: bold;"/></hbox>
+ <vbox align="center">
+ <description id="do_not_alert_on_precat_indicator" hidden="true" style="font-size: large; font-weight: bold;">&staff.circ.checkin_overlay.do_not_alert_on_precat.label;</description>
+ <description id="suppress_holds_and_transits_indicator" hidden="true" style="font-size: large; font-weight: bold;">&staff.circ.checkin_overlay.suppress_holds_and_transits.label;</description>
+ <description id="amnesty_mode_indicator" hidden="true" style="font-size: large; font-weight: bold;">&staff.circ.checkin_overlay.amnesty_mode.label;</description>
+ <description id="checkin_auto_indicator" hidden="true" style="font-size: large; font-weight: bold;">&staff.circ.checkin_overlay.checkin_auto.label;</description>
+ </vbox>
</vbox>
<spacer flex="1"/>
</hbox>
@@ -128,15 +134,19 @@
<button id="checkin_modifiers" oncommand="this.firstChild.showPopup();"
label="&staff.circ.checkin_overlay.checkin_modifiers_btn.label;"
accesskey="&staff.circ.checkin_overlay.checkin_modifiers_btn.accesskey;"
- type="menu" allowevents="true">
+ type="menu" allowevents="false">
<menupopup id="checkin_modifiers_popup">
- <menuitem type="checkbox" id="do_not_alert_on_precat" oils_persist="checked"
+ <menuitem type="checkbox" id="do_not_alert_on_precat" oils_persist="checked"
+ oncommand="document.getElementById('do_not_alert_on_precat_indicator').hidden = this.getAttribute('checked') != 'true'; document.getElementById('checkin_barcode_entry_textbox').focus();"
label="&staff.circ.checkin_overlay.do_not_alert_on_precat.label;" accesskey="&staff.circ.checkin_overlay.do_not_alert_on_precat.accesskey;"/>
- <menuitem type="checkbox" id="suppress_holds_and_transits" oils_persist="checked"
+ <menuitem type="checkbox" id="suppress_holds_and_transits" oils_persist="checked"
+ oncommand="document.getElementById('suppress_holds_and_transits_indicator').hidden = this.getAttribute('checked') != 'true'; document.getElementById('checkin_barcode_entry_textbox').focus();"
label="&staff.circ.checkin_overlay.suppress_holds_and_transits.label;" accesskey="&staff.circ.checkin_overlay.suppress_holds_and_transits.accesskey;"/>
- <menuitem type="checkbox" id="amnesty_mode" oils_persist="checked"
+ <menuitem type="checkbox" id="amnesty_mode" oils_persist="checked"
+ oncommand="document.getElementById('amnesty_mode_indicator').hidden = this.getAttribute('checked') != 'true'; document.getElementById('checkin_barcode_entry_textbox').focus();"
label="&staff.circ.checkin_overlay.amnesty_mode.label;" accesskey="&staff.circ.checkin_overlay.amnesty_mode.accesskey;"/>
- <menuitem type="checkbox" id="checkin_auto" oils_persist="checked"
+ <menuitem type="checkbox" id="checkin_auto" oils_persist="checked"
+ oncommand="document.getElementById('checkin_auto_indicator').hidden = this.getAttribute('checked') != 'true'; document.getElementById('checkin_barcode_entry_textbox').focus();"
label="&staff.circ.checkin_overlay.checkin_auto.label;" accesskey="&staff.circ.checkin_overlay.checkin_auto.accesskey;"/>
</menupopup>
</button>
More information about the open-ils-commits
mailing list