[open-ils-commits] r20286 - branches/rel_2_1/Open-ILS/xul/staff_client/server/cat (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Apr 22 11:56:56 EDT 2011


Author: phasefx
Date: 2011-04-22 11:56:53 -0400 (Fri, 22 Apr 2011)
New Revision: 20286

Modified:
   branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
Log:
Don't disable the Create Volume/Item button when building the data structure from the form.

If you have say, a <textbox> with on onchange event that disables a <button> and re-enables it shortly thereafter, and the onchange event was triggered by you clicking on said button while the textbox has focus/changes, then the disable action will prevent any click on the button from registering.


Modified: branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js	2011-04-22 15:56:37 UTC (rev 20285)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js	2011-04-22 15:56:53 UTC (rev 20286)
@@ -776,11 +776,10 @@
     }
 }
 
-g.gather_copies_soon = function() {
+g.gather_copies_soon = function(ev) {
     try {
         if (!xulG.unified_interface) { return; }
         dump('g.gather_copies_soon()\n');
-        document.getElementById("Create").disabled = true;
         if (g.update_copy_editor_timeoutID) {
             clearTimeout(g.update_copy_editor_timeoutID);
         }
@@ -791,9 +790,8 @@
                 try {
                     g.gather_copies();
                     xulG.refresh_copy_editor();
-                    document.getElementById("Create").disabled = false;
                 } catch(E) {
-                    alert('Error in volume_copy_editor.js with g.gather_copies_soon setTimeout func(): ' + E);
+                    dump('Error in volume_copy_editor.js with g.gather_copies_soon setTimeout func(): ' + E + '\n');
                 }
             }, update_timer
         );
@@ -1075,8 +1073,14 @@
 
     try {
 
+        if (g.update_copy_editor_timeoutID) {
+            clearTimeout(g.update_copy_editor_timeoutID);
+        }
+
         var copies;
         if (xulG.unified_interface) {
+            g.gather_copies();
+            xulG.refresh_copy_editor();
             copies = xulG.copies;
         } else {
             copies = g.gather_copies();



More information about the open-ils-commits mailing list