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

Evergreen Git git at git.evergreen-ils.org
Tue Mar 18 21:15:58 EDT 2014


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  d59d8f95af806bf218f3c45fc558a582a91393da (commit)
      from  7c3b2dae0b1fca098c4804f52cadf406c29fd458 (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 d59d8f95af806bf218f3c45fc558a582a91393da
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Mar 17 11:53:22 2014 -0400

    LP#1294156 TPAC activate hold Submit on load w/ barcode
    
    Repairs an error introduced by b055fe4, where the Submit button was left
    inactive on initial page load, even when a valid barcode was already
    set.
    
    Overall, this change paritally rolls back b055fe4 to simplify the
    implementation.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 8bae62f..ebed5e5 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -39,11 +39,8 @@ function staff_hold_usr_barcode_changed(isload) {
         var barcode = isload;
         if(!barcode || barcode === true) barcode = document.getElementById('staff_barcode').value;
         var only_settings = true;
-        var bc_from_cgi = false; // user_barcode passed via cgi
         if(!document.getElementById('hold_usr_is_requestor').checked) {
-            if (isload && document.getElementById('hold_usr_input').value)
-                bc_from_cgi = true;
-            if(!isload || bc_from_cgi) {
+            if(!isload) {
                 barcode = document.getElementById('hold_usr_input').value;
                 only_settings = false;
             }
@@ -104,7 +101,8 @@ function staff_hold_usr_barcode_changed(isload) {
             document.getElementById('patron_name').innerHTML = load_info.patron_name;
             document.getElementById("patron_usr_barcode_not_found").style.display = 'none';
         }
-        
+        // Ok, now we can allow submitting again, unless this is a "true" load, in which case we likely have a blank barcode box active
+
         // update the advanced hold options link to propagate the patron
         // barcode if clicked.  This is needed when the patron barcode
         // is manually entered (i.e. the staff client does not provide one).
@@ -116,8 +114,7 @@ function staff_hold_usr_barcode_changed(isload) {
             adv_link.setAttribute('href', href);
         }
 
-        // if we're here, we have a valid barcode.  activate the sumbmit option
-        if(!isload || bc_from_cgi) 
+        if (isload !== true)
             document.getElementById('place_hold_submit').disabled = false;
     }
 }
@@ -129,8 +126,11 @@ window.onload = function() {
         runEvt('rdetail', 'MFHDDrawn');
     }
     if(location.href.match(/place_hold/)) {
-        if(xulG.patron_barcode) {
-            staff_hold_usr_barcode_changed(xulG.patron_barcode);
+        // patron barcode may come from XUL or a CGI param
+        var patron_barcode = xulG.patron_barcode ||
+            document.getElementById('hold_usr_input').value;
+        if(patron_barcode) {
+            staff_hold_usr_barcode_changed(patron_barcode);
         } else {
             staff_hold_usr_barcode_changed(true);
         }

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

Summary of changes:
 Open-ILS/web/js/ui/default/opac/staff.js |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list