fix bug where oils persist was instigating the behavior associated with checkboxes...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 23 Sep 2009 03:28:17 +0000 (03:28 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 23 Sep 2009 03:28:17 +0000 (03:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14111 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
Open-ILS/xul/staff_client/server/patron/holds_overlay.xul

index 0ab8fef..c524f63 100644 (file)
                     if (value) nodes[i].setAttribute( attribute_list[j], value );
                 }
                 if (nodes[i].nodeName == 'checkbox' && attribute_list.indexOf('checked') > -1) {
-                    var evt = document.createEvent("Events");
-                    evt.initEvent( 'command', true, true );
-                    nodes[i].dispatchEvent(evt);
+                    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') {
+                            // Timing issue for some checkboxes; don't poke them with an event
+                        } else {
+                            var evt = document.createEvent("Events");
+                            evt.initEvent( 'command', true, true );
+                            nodes[i].dispatchEvent(evt);
+                        }
+                    }
                     nodes[i].addEventListener(
                         'command',
                         function(bk) {
index 45e603a..be22ef7 100644 (file)
@@ -87,7 +87,7 @@
 
     <hbox id="holds_top_ui" flex="1">
         <button id="place_hold_btn" hidden="true" label="&staff.patron.holds_overlay.place_hold.label;" accesskey="&staff.patron.holds_overlay.place_hold.accesskey;" command="cmd_search_opac" />
-        <checkbox id="lib_filter_checkbox" oils_persist="checked" checked="true" hidden="true" label="&staff.patron.holds_overlay.lib_filter_checkbox.label;"/>
+        <checkbox id="lib_filter_checkbox" oils_persist="checked" oils_persist_no_poke="true" checked="true" hidden="true" label="&staff.patron.holds_overlay.lib_filter_checkbox.label;"/>
         <menulist id="lib_type_menu" hidden="true" oils_persist="value">
             <menupopup>
                 <menuitem id="pickup_lib" value="pickup_lib" label="&staff.patron.holds_overlay.pickup_lib.label;"/>