[open-ils-commits] [GIT] Evergreen ILS branch master updated. 5f446f3ae095bd3dba0135b8ed6bd4536a2e3441

Evergreen Git git at git.evergreen-ils.org
Tue Jun 7 16:37:33 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  5f446f3ae095bd3dba0135b8ed6bd4536a2e3441 (commit)
      from  f0a03c673bbd85b48bd93e9e43bf675e8b0268f3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5f446f3ae095bd3dba0135b8ed6bd4536a2e3441
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed Jun 1 16:25:50 2011 -0400

    make unified vol/copy editor honor required stat cats
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js
index 0ce4db1..0602c09 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js
@@ -1587,10 +1587,22 @@ g.check_for_unmet_required_fields = function() {
             abort.push(fn);
         }
     }
-    if (abort.length > 0) {
-        $('save').setAttribute('disabled','true'); 
+    if (xulG.unified_interface) {
+        if (abort.length > 0) {
+            if (typeof xulG.lock_save_button == 'function') {
+                xulG.lock_save_button();
+            }
+        } else {
+            if (typeof xulG.unlock_save_button == 'function') {
+                xulG.unlock_save_button();
+            }
+        }
     } else {
-        $('save').setAttribute('disabled','false'); 
+        if (abort.length > 0) {
+            $('save').setAttribute('disabled','true');
+        } else {
+            $('save').setAttribute('disabled','false');
+        }
     }
 }
 
diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
index 5112569..111226a 100644
--- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
+++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
@@ -54,6 +54,14 @@ function my_init() {
                     },0
                 );
             }
+            xulG.lock_save_button = function() {
+                g.save_button_locked = true;
+                document.getElementById("Create").disabled = true;
+            }
+            xulG.unlock_save_button = function() {
+                g.save_button_locked = false;
+                document.getElementById("Create").disabled = false;
+            }
         } else {
             $('Create').hidden = true;
         }
@@ -373,7 +381,9 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) {
             document.getElementById("EditThenCreate").disabled = false;
             document.getElementById("CreateWithDefaults").disabled = false;
         } else {
-            document.getElementById("Create").disabled = false;
+            if (! g.save_button_locked) {
+                document.getElementById("Create").disabled = false;
+            }
         }
     }
 
@@ -682,7 +692,9 @@ g.render_barcode_entry = function(node,callnumber_composite_key,count,ou_id) {
                 document.getElementById("EditThenCreate").disabled = false;
                 document.getElementById("CreateWithDefaults").disabled = false;
             } else {
-                document.getElementById("Create").disabled = false;
+                if (! g.save_button_locked) {
+                    document.getElementById("Create").disabled = false;
+                }
             }
         }
 

-----------------------------------------------------------------------

Summary of changes:
 .../xul/staff_client/server/cat/copy_editor.js     |   18 +++++++++++++++---
 .../staff_client/server/cat/volume_copy_creator.js |   16 ++++++++++++++--
 2 files changed, 29 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list