[open-ils-commits] r14111 - in trunk/Open-ILS/xul/staff_client: chrome/content/OpenILS server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Sep 22 23:28:19 EDT 2009


Author: phasefx
Date: 2009-09-22 23:28:17 -0400 (Tue, 22 Sep 2009)
New Revision: 14111

Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
   trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
Log:
fix bug where oils persist was instigating the behavior associated with checkboxes prematurely.  This fixes the duplicate rows problem in the various holds lists

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-23 02:56:17 UTC (rev 14110)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js	2009-09-23 03:28:17 UTC (rev 14111)
@@ -52,9 +52,16 @@
                     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) {

Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul	2009-09-23 02:56:17 UTC (rev 14110)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul	2009-09-23 03:28:17 UTC (rev 14111)
@@ -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;"/>



More information about the open-ils-commits mailing list