[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. caf6322c13c8a101123e8a83157ba377e795e950

Evergreen Git git at git.evergreen-ils.org
Wed Nov 20 10:44:25 EST 2013


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  caf6322c13c8a101123e8a83157ba377e795e950 (commit)
      from  6ec8bcea7e3a1b93fd9d4627571d95483c55b635 (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 caf6322c13c8a101123e8a83157ba377e795e950
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Thu Sep 12 12:02:15 2013 -0400

    LP1093856 fix Fast Item Add with Z39.50 import
    
    The first time I tried this fix I ran afoul of
    https://bugs.launchpad.net/evergreen/+bug/787561
    
    But a second attempt worked.  So I didn't kill
    two birds with one stone, but this should take
    care of 1093856.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js
index 7694d44..eee677e 100644
--- a/Open-ILS/xul/staff_client/server/cat/marcedit.js
+++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js
@@ -991,6 +991,7 @@ function fastItemAdd_attempt(doc_id) {
         if (!document.getElementById('fastItemAdd_barcode').value) { return; }
         window.xulG.fast_add_item( doc_id, document.getElementById('fastItemAdd_callnumber').value, document.getElementById('fastItemAdd_barcode').value );
         document.getElementById('fastItemAdd_barcode').value = '';
+        return true;
     } catch(E) {
         alert('fastItemAdd_attempt: ' + E);
     }
@@ -998,11 +999,19 @@ function fastItemAdd_attempt(doc_id) {
 
 function save_attempt(xml_string) {
     try {
-        var result = window.xulG.save.func( xml_string );   
+        var result = window.xulG.save.func( xml_string );
+        // I'd prefer to pass on_complete on through to fast_item_add,
+        // but with the way these window scopes get destroyed with
+        // tab replacement, maybe not a good idea
+        var replace_on_complete = false;
         if (result) {
             oils_unlock_page();
-            if (result.id) fastItemAdd_attempt(result.id);
-            if (typeof result.on_complete == 'function') result.on_complete();
+            if (result.id) {
+                replace_on_complete = fastItemAdd_attempt(result.id);
+            }
+            if (!replace_on_complete && typeof result.on_complete == 'function') {
+                result.on_complete();
+            }
         }
     } catch(E) {
         alert('save_attempt: ' + E);

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

Summary of changes:
 Open-ILS/xul/staff_client/server/cat/marcedit.js |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list