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') {
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),
<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>
<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>