LP1182519 Per-Hold Behind Desk UI
authorBill Erickson <berick@esilibrary.com>
Thu, 30 May 2013 21:01:55 +0000 (17:01 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 30 May 2013 21:01:55 +0000 (17:01 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/xul/staff_client/server/patron/summary.js

index 9c90b6f..48185e2 100644 (file)
@@ -437,7 +437,7 @@ patron.summary.prototype = {
                                 var e2 = document.getElementById('patron_holds_available');
                                 var e3 = document.getElementById('patron_holds_available_behind_desk');
                                 if (e2) util.widgets.set_text(e2,'...');
-                                if (e3) util.widgets.set_text(e2,'...');
+                                if (e3) util.widgets.set_text(e3,'...');
                                 var under_btn; 
                                 if (xulG) {
                                     if (xulG.display_window) {
@@ -458,13 +458,22 @@ patron.summary.prototype = {
                                         }
                                         if (e3) {
                                             if (robj.behind_desk) {
+                                                alert(e3);
                                                 removeCSSClass(e3.parentNode, 'hideme');
                                                 util.widgets.set_text(e3, robj.behind_desk);
                                             } else {
                                                 addCSSClass(e3.parentNode, 'hideme');
                                             }
                                         }
-                                        if (under_btn) util.widgets.set_text(under_btn, req.getResultObject().ready + '/' + req.getResultObject().total );
+                                        if (under_btn) {
+                                            var str = robj.ready + '/' + robj.total;
+                                            if (robj.behind_desk) {
+                                                str += ' (' + robj.behind_desk + ')';
+                                                under_btn.setAttribute('tooltiptext', 
+                                                    'Ready / Total (Behind Desk)'); // I18N
+                                            }
+                                            util.widgets.set_text(under_btn, str);
+                                        }
                                         obj.holds_summary = robj;
                                         if (obj.holds_summary && obj.bills_summary) 
                                             if (typeof window.xulG == 'object' && typeof window.xulG.stop_sign_page == 'function')