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

Evergreen Git git at git.evergreen-ils.org
Wed Feb 13 13:27:38 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  e4be604a1adafaae9bd05283a8fc4fdce3c87e99 (commit)
       via  79720bbb0f5033f0a5dcae5ff86d75ea41d5e71d (commit)
       via  d51caad5280c94fb21bead47001f67adf4e3de8e (commit)
       via  83a6d922f0d9c4a71cce5c9df96c078f6a14e5d9 (commit)
       via  3006a1b3ff41342966913c85f1366b165a700198 (commit)
       via  0da2a803dc982611ad0b6fd0f4eded6baaef797a (commit)
       via  bec0ab371a59ac7c3bd94494968ce23897fbddec (commit)
       via  d0eae88d8a1c665474bb5fd05b5665550a536c6e (commit)
      from  dc02f87a9ce84eb81c4845fc21f0f7660501b52c (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 e4be604a1adafaae9bd05283a8fc4fdce3c87e99
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed Feb 13 10:55:05 2013 -0500

    Add release notes for hold patron name display
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/docs/RELEASE_NOTES_NEXT/hold_patron_name.txt b/docs/RELEASE_NOTES_NEXT/hold_patron_name.txt
new file mode 100644
index 0000000..30891c7
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/hold_patron_name.txt
@@ -0,0 +1,7 @@
+Show Hold Patron Name in TPac
+=============================
+
+When looking up patron information for hold placement via the staff client in
+TPac the hold patron name is now shown next to the entered barcode. In the event
+that the barcode is not found a notice is displayed and the submit button is
+disabled until a valid barcode is entered or the staff member is switched to.

commit 79720bbb0f5033f0a5dcae5ff86d75ea41d5e71d
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed Feb 13 11:15:22 2013 -0500

    Style barcode not found message, hide on empty
    
    The barcode not found message should stand out more, so make it a text alert.
    
    In addition, empty barcode isn't really "not found" but still invalid. Hide the
    "barcode not found" message and disable submit on empty barcode.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2
index 262028d..f82551c 100644
--- a/Open-ILS/src/templates/opac/css/style.css.tt2
+++ b/Open-ILS/src/templates/opac/css/style.css.tt2
@@ -1487,3 +1487,7 @@ a.preflib_change {
     padding: 0;
     vertical-align: middle;
 }
+
+#patron_usr_barcode_not_found {
+    font-weight: bold; color: [% css_colors.text_alert %];
+}
diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index ce26e03..9bfc69e 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -42,6 +42,9 @@ function staff_hold_usr_barcode_changed(isload) {
         }
         if(barcode == undefined || barcode == '') {
             document.getElementById('patron_name').innerHTML = '';
+            // No submitting on empty barcode, but empty barcode doesn't really count as "not found" either
+            document.getElementById('place_hold_submit').disabled = true;
+            document.getElementById("patron_usr_barcode_not_found").style.display = 'none';
             cur_hold_barcode = null;
             return;
         }

commit d51caad5280c94fb21bead47001f67adf4e3de8e
Author: Ben Shum <bshum at biblio.org>
Date:   Wed Feb 13 10:30:47 2013 -0500

    TPAC - add "patron barcode not found" message to hold placement page
    
    Add "Patron barcode not found" as an error text next to the barcode entry
    when the lookup fails. This message helps warn staff that the barcode they
    are attempting to use is not valid.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>

diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2
index c22dee4..5b6171b 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2
@@ -22,7 +22,7 @@
             <label for="hold_usr_is_requestor_not">
                 [% l("Place hold for patron by barcode:") %]
             </label>
-            <input type="text" name="hold_usr" id="hold_usr_input" onchange="staff_hold_usr_barcode_changed();" onkeypress="return no_hold_submit(event)" /> <span id="patron_name"></span><br />
+            <input type="text" name="hold_usr" id="hold_usr_input" onchange="staff_hold_usr_barcode_changed();" onkeypress="return no_hold_submit(event)" /> <span id="patron_name"></span><span id="patron_usr_barcode_not_found" style="display: none">[% l('Patron barcode was not found') %]</span><br />
             <input type="hidden" id="staff_barcode" value="[% ctx.staff_recipient.card.barcode | html %]"/>
             <span>
                 <input type="radio" id="hold_usr_is_requestor"
diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 0de11fb..ce26e03 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -52,6 +52,7 @@ function staff_hold_usr_barcode_changed(isload) {
         var load_info = xulG.get_barcode_and_settings(window, barcode, only_settings);
         if(load_info == false || load_info == undefined) {
             document.getElementById('patron_name').innerHTML = '';
+            document.getElementById("patron_usr_barcode_not_found").style.display = '';
             cur_hold_barcode = null;
             return;
         }
@@ -88,6 +89,7 @@ function staff_hold_usr_barcode_changed(isload) {
         for(var i in update_elements) update_elements[i].textContent = load_info.user_email;
         if(!document.getElementById('hold_usr_is_requestor').checked && document.getElementById('hold_usr_input').value) {
             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
         if (isload !== true)

commit 83a6d922f0d9c4a71cce5c9df96c078f6a14e5d9
Author: Ben Shum <bshum at biblio.org>
Date:   Wed Feb 13 10:27:09 2013 -0500

    TPAC - gray out hold submit button
    
    When disabled, recolor to gray to indicate that it is disabled.
    
    This will turn back to normal once a valid user is found.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>

diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2
index 58ffb4c..262028d 100644
--- a/Open-ILS/src/templates/opac/css/style.css.tt2
+++ b/Open-ILS/src/templates/opac/css/style.css.tt2
@@ -1148,6 +1148,13 @@ a.dash-link:hover { text-decoration: underline !important; }
     height: 26px;
 }
 
+.opac-button:disabled {
+    color: [% css_colors.accent_medium %];
+    cursor: pointer !important;
+    border: 1px solid [% css_colors.accent_light %];
+    background-color: [% css_colors.accent_lighter %];
+}
+
 .opac-button, .results_header_btns, #simple-detail-view-links { 
     color: [% css_colors.button_text %];
     font-weight: bold; 

commit 3006a1b3ff41342966913c85f1366b165a700198
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed Feb 13 09:49:49 2013 -0500

    TPac: Disable staff hold place submit button by default
    
    Because if we don't have a barcode in the box we shouldn't be submitting.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>

diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 599db8c..0de11fb 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -89,8 +89,9 @@ function staff_hold_usr_barcode_changed(isload) {
         if(!document.getElementById('hold_usr_is_requestor').checked && document.getElementById('hold_usr_input').value) {
             document.getElementById('patron_name').innerHTML = load_info.patron_name;
         }
-        // Ok, now we can allow submitting again
-        document.getElementById('place_hold_submit').disabled = false;
+        // Ok, now we can allow submitting again, unless this is a "true" load, in which case we likely have a blank barcode box active
+        if (isload !== true)
+            document.getElementById('place_hold_submit').disabled = false;
     }
 }
 window.onload = function() {

commit 0da2a803dc982611ad0b6fd0f4eded6baaef797a
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed Feb 13 09:06:07 2013 -0500

    TPac: Invalidate 'current' barcode on invalid
    
    Hold placement should allow you to go back to the previous valid barcode.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>

diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 22d6787..599db8c 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -42,6 +42,7 @@ function staff_hold_usr_barcode_changed(isload) {
         }
         if(barcode == undefined || barcode == '') {
             document.getElementById('patron_name').innerHTML = '';
+            cur_hold_barcode = null;
             return;
         }
         if(barcode == cur_hold_barcode)
@@ -51,6 +52,7 @@ function staff_hold_usr_barcode_changed(isload) {
         var load_info = xulG.get_barcode_and_settings(window, barcode, only_settings);
         if(load_info == false || load_info == undefined) {
             document.getElementById('patron_name').innerHTML = '';
+            cur_hold_barcode = null;
             return;
         }
         cur_hold_barcode = load_info.barcode;

commit bec0ab371a59ac7c3bd94494968ce23897fbddec
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Tue Feb 12 09:47:30 2013 -0500

    TPac: Load name from patron place hold interface
    
    only_settings is applied from there, so check if a barcode was entered.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>

diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 0e403ab..22d6787 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -84,7 +84,7 @@ function staff_hold_usr_barcode_changed(isload) {
         }
         update_elements = document.getElementsByName('email_address');
         for(var i in update_elements) update_elements[i].textContent = load_info.user_email;
-        if(!document.getElementById('hold_usr_is_requestor').checked && !only_settings) {
+        if(!document.getElementById('hold_usr_is_requestor').checked && document.getElementById('hold_usr_input').value) {
             document.getElementById('patron_name').innerHTML = load_info.patron_name;
         }
         // Ok, now we can allow submitting again

commit d0eae88d8a1c665474bb5fd05b5665550a536c6e
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Tue Feb 12 09:10:29 2013 -0500

    TPac: Load patron name when placing holds
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>

diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2
index 2066616..c22dee4 100644
--- a/Open-ILS/src/templates/opac/parts/place_hold.tt2
+++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2
@@ -22,7 +22,7 @@
             <label for="hold_usr_is_requestor_not">
                 [% l("Place hold for patron by barcode:") %]
             </label>
-            <input type="text" name="hold_usr" id="hold_usr_input" onchange="staff_hold_usr_barcode_changed();" onkeypress="return no_hold_submit(event)" /><br />
+            <input type="text" name="hold_usr" id="hold_usr_input" onchange="staff_hold_usr_barcode_changed();" onkeypress="return no_hold_submit(event)" /> <span id="patron_name"></span><br />
             <input type="hidden" id="staff_barcode" value="[% ctx.staff_recipient.card.barcode | html %]"/>
             <span>
                 <input type="radio" id="hold_usr_is_requestor"
@@ -99,7 +99,7 @@
                 [% END %]
             </blockquote>
         </p>
-        <input type="submit" name="submit" value="[% l('Submit') %]" title="[% l('Submit') %]"
+        <input id="place_hold_submit" type="submit" name="submit" value="[% l('Submit') %]" title="[% l('Submit') %]"
             alt="[% l('Submit') %]" class="opac-button" />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <input type="reset" name="cancel" onclick="javascript:history.go(-1);"
diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 6e2cbda..0e403ab 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -40,11 +40,19 @@ function staff_hold_usr_barcode_changed(isload) {
             if(barcode && barcode != '' && !document.getElementById('hold_usr_is_requestor_not').checked)
                 document.getElementById('hold_usr_is_requestor_not').checked = 'checked';
         }
-        if(barcode == undefined || barcode == '' || barcode == cur_hold_barcode)
+        if(barcode == undefined || barcode == '') {
+            document.getElementById('patron_name').innerHTML = '';
             return;
+        }
+        if(barcode == cur_hold_barcode)
+            return;
+        // No submitting until we think the barcode is valid
+        document.getElementById('place_hold_submit').disabled = true;
         var load_info = xulG.get_barcode_and_settings(window, barcode, only_settings);
-        if(load_info == false || load_info == undefined)
+        if(load_info == false || load_info == undefined) {
+            document.getElementById('patron_name').innerHTML = '';
             return;
+        }
         cur_hold_barcode = load_info.barcode;
         if(!only_settings || (isload && isload !== true)) document.getElementById('hold_usr_input').value = load_info.barcode; // Safe at this point as we already set cur_hold_barcode
         if(load_info.settings['opac.default_pickup_location'])
@@ -76,6 +84,11 @@ function staff_hold_usr_barcode_changed(isload) {
         }
         update_elements = document.getElementsByName('email_address');
         for(var i in update_elements) update_elements[i].textContent = load_info.user_email;
+        if(!document.getElementById('hold_usr_is_requestor').checked && !only_settings) {
+            document.getElementById('patron_name').innerHTML = load_info.patron_name;
+        }
+        // Ok, now we can allow submitting again
+        document.getElementById('place_hold_submit').disabled = false;
     }
 }
 window.onload = function() {
diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
index 9c5174f..54320d4 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js
+++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
@@ -2660,7 +2660,13 @@ commands:
         }
         if(!settings['opac.default_phone'] && user.day_phone()) settings['opac.default_phone'] = user.day_phone();
         if(!settings['opac.hold_notify'] && settings['opac.hold_notify'] !== '') settings['opac.hold_notify'] = 'email:phone';
-        return {"barcode": barcode, "settings" : settings, "user_email" : user.email()};
+        // Taken from patron/util.js format_name
+        var patron_name = ( user.prefix() ? user.prefix() + ' ' : '') +
+            user.family_name() + ', ' +
+            user.first_given_name() + ' ' +
+            ( user.second_given_name() ? user.second_given_name() + ' ' : '' ) +
+            ( user.suffix() ? user.suffix() : '');
+        return {"barcode": barcode, "settings" : settings, "user_email" : user.email(), "patron_name" : patron_name};
     },
 
     'sort_menu' : function(menu, recurse) {

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

Summary of changes:
 Open-ILS/src/templates/opac/css/style.css.tt2      |   11 ++++++++
 Open-ILS/src/templates/opac/parts/place_hold.tt2   |    4 +-
 Open-ILS/web/js/ui/default/opac/staff.js           |   25 ++++++++++++++++++-
 .../xul/staff_client/chrome/content/main/menu.js   |    8 +++++-
 docs/RELEASE_NOTES_NEXT/hold_patron_name.txt       |    7 +++++
 5 files changed, 50 insertions(+), 5 deletions(-)
 create mode 100644 docs/RELEASE_NOTES_NEXT/hold_patron_name.txt


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list