Don't disable the Create Volume/Item button when building the data structure from...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 22 Apr 2011 15:56:37 +0000 (15:56 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 22 Apr 2011 15:56:37 +0000 (15:56 +0000)
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.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@20285 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js

index e394dfb..ad3ce0e 100644 (file)
@@ -776,11 +776,10 @@ g.delay_gather_copies_soon = function() {
     }
 }
 
-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 @@ g.gather_copies_soon = function() {
                 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 @@ g.stash_and_close = function(param) {
 
     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();