Make patron indicators clickable
authorThomas Berezansky <tsbere@mvlc.org>
Wed, 3 Oct 2012 19:27:54 +0000 (15:27 -0400)
committerBen Shum <bshum@biblio.org>
Fri, 8 Feb 2013 22:26:40 +0000 (17:26 -0500)
For example, make "(See Notes)" bring you to notes, provided the patron is
already loaded (aka, not from search).

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/xul/staff_client/server/patron/display.js
Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul
Open-ILS/xul/staff_client/server/patron/display_overlay.xul

index 3530f71..03c350f 100644 (file)
@@ -626,6 +626,13 @@ patron.display.prototype = {
                 try { window.xulG.set_tab_name($("patronStrings").getString('staff.patron.display.init.retrieving_patron')); } catch(E) { alert(E); }
             }
 
+            var displayClickies = document.getElementById("pdm2hb1a").getElementsByTagName("label");
+            for (var i = 0; i < displayClickies.length; i++) {
+                if (displayClickies[i].getAttribute('command')) {
+                    displayClickies[i].setAttribute('onclick', 'this.doCommand();');
+                }
+            }
+
             obj.controller.view.PatronNavBar.selectedIndex = 1;
             JSAN.use('util.widgets'); 
             util.widgets.enable_accesskeys_in_node_and_children(
index 085fd5f..f1a1361 100644 (file)
         <deck id="PatronNavBar" flex="1" class="my_overflow" />
     </hbox>
     <hbox id="pdm2hb1a">
-        <label class="hideme barred_indicator" value="&staff.patron.display_overlay.barred.value;"/>
-        <label class="hideme expired_indicator" value="&staff.patron.display_overlay.expired.value;"/>
-        <label class="hideme inactive_indicator" value="&staff.patron.display_overlay.inactive.value;"/>
-        <label class="hideme juvenile_indicator" value="&staff.patron.display_overlay.juvenile.value;"/>
-        <label class="hideme alert_indicator" value="&staff.patron.display_overlay.alert.value;"/>
-        <label class="hideme note_indicator" value="&staff.patron.display_overlay.see_notes.value;"/>
-        <label class="hideme max_bills_indicator" value="&staff.patron.display_overlay.max_bills.value;"/>
-        <label class="hideme max_overdues_indicator" value="&staff.patron.display_overlay.max_overdues.value;"/>
-        <label class="hideme bills_indicator" value="&staff.patron.display_overlay.has_bills.value;"/>
-        <label class="hideme overdues_indicator" value="&staff.patron.display_overlay.has_overdues.value;"/>
-        <label class="hideme invalid_dob_indicator" value="&staff.patron.display_overlay.invalid_dob.value;"/>
-        <label class="hideme invalid_address_indicator" value="&staff.patron.display_overlay.invalid_address.value;"/>
-        <label class="hideme invalid_email_indicator" value="&staff.patron.display_overlay.invalid_email.value;"/>
-        <label class="hideme invalid_phone_indicator" value="&staff.patron.display_overlay.invalid_phone.value;"/>
+        <label class="hideme barred_indicator" value="&staff.patron.display_overlay.barred.value;" command="cmd_patron_edit"/>
+        <label class="hideme expired_indicator" value="&staff.patron.display_overlay.expired.value;" command="cmd_patron_edit"/>
+        <label class="hideme inactive_indicator" value="&staff.patron.display_overlay.inactive.value;" command="cmd_patron_edit"/>
+        <label class="hideme juvenile_indicator" value="&staff.patron.display_overlay.juvenile.value;" command="cmd_patron_edit"/>
+        <label class="hideme alert_indicator" value="&staff.patron.display_overlay.alert.value;" command="cmd_patron_edit"/>
+        <label class="hideme note_indicator" value="&staff.patron.display_overlay.see_notes.value;" command="cmd_patron_info_notes"/>
+        <label class="hideme max_bills_indicator" value="&staff.patron.display_overlay.max_bills.value;" command="cmd_patron_bills"/>
+        <label class="hideme max_overdues_indicator" value="&staff.patron.display_overlay.max_overdues.value;" command="cmd_patron_items"/>
+        <label class="hideme bills_indicator" value="&staff.patron.display_overlay.has_bills.value;" command="cmd_patron_bills"/>
+        <label class="hideme overdues_indicator" value="&staff.patron.display_overlay.has_overdues.value;" command="cmd_patron_items"/>
+        <label class="hideme invalid_dob_indicator" value="&staff.patron.display_overlay.invalid_dob.value;" command="cmd_patron_edit"/>
+        <label class="hideme invalid_address_indicator" value="&staff.patron.display_overlay.invalid_address.value;" command="cmd_patron_edit"/>
+        <label class="hideme invalid_email_indicator" value="&staff.patron.display_overlay.invalid_email.value;" command="cmd_patron_edit"/>
+        <label class="hideme invalid_phone_indicator" value="&staff.patron.display_overlay.invalid_phone.value;" command="cmd_patron_edit"/>
     </hbox>
     <vbox id="PatronNotNavBar" flex="1" class="my_bg">
         <hbox id="left_deck_vbox" flex="1" oils_persist="height"> 
index 876e137..fdbee54 100644 (file)
         <deck id="PatronNavBar" flex="1" class="my_overflow" />
     </hbox>
     <hbox id="pdm2hb1a">
-        <label class="hideme barred_indicator" value="&staff.patron.display_overlay.barred.value;"/>
-        <label class="hideme expired_indicator" value="&staff.patron.display_overlay.expired.value;"/>
-        <label class="hideme inactive_indicator" value="&staff.patron.display_overlay.inactive.value;"/>
-        <label class="hideme juvenile_indicator" value="&staff.patron.display_overlay.juvenile.value;"/>
-        <label class="hideme alert_indicator" value="&staff.patron.display_overlay.alert.value;"/>
-        <label class="hideme note_indicator" value="&staff.patron.display_overlay.see_notes.value;"/>
-        <label class="hideme max_bills_indicator" value="&staff.patron.display_overlay.max_bills.value;"/>
-        <label class="hideme max_overdues_indicator" value="&staff.patron.display_overlay.max_overdues.value;"/>
-        <label class="hideme bills_indicator" value="&staff.patron.display_overlay.has_bills.value;"/>
-        <label class="hideme overdues_indicator" value="&staff.patron.display_overlay.has_overdues.value;"/>
-        <label class="hideme invalid_dob_indicator" value="&staff.patron.display_overlay.invalid_dob.value;"/>
-        <label class="hideme invalid_address_indicator" value="&staff.patron.display_overlay.invalid_address.value;"/>
-        <label class="hideme invalid_email_indicator" value="&staff.patron.display_overlay.invalid_email.value;"/>
-        <label class="hideme invalid_phone_indicator" value="&staff.patron.display_overlay.invalid_phone.value;"/>
+        <label class="hideme barred_indicator" value="&staff.patron.display_overlay.barred.value;" command="cmd_patron_edit"/>
+        <label class="hideme expired_indicator" value="&staff.patron.display_overlay.expired.value;" command="cmd_patron_edit"/>
+        <label class="hideme inactive_indicator" value="&staff.patron.display_overlay.inactive.value;" command="cmd_patron_edit"/>
+        <label class="hideme juvenile_indicator" value="&staff.patron.display_overlay.juvenile.value;" command="cmd_patron_edit"/>
+        <label class="hideme alert_indicator" value="&staff.patron.display_overlay.alert.value;" command="cmd_patron_edit"/>
+        <label class="hideme note_indicator" value="&staff.patron.display_overlay.see_notes.value;" command="cmd_patron_info_notes"/>
+        <label class="hideme max_bills_indicator" value="&staff.patron.display_overlay.max_bills.value;" command="cmd_patron_bills"/>
+        <label class="hideme max_overdues_indicator" value="&staff.patron.display_overlay.max_overdues.value;" command="cmd_patron_items"/>
+        <label class="hideme bills_indicator" value="&staff.patron.display_overlay.has_bills.value;" command="cmd_patron_bills"/>
+        <label class="hideme overdues_indicator" value="&staff.patron.display_overlay.has_overdues.value;" command="cmd_patron_items"/>
+        <label class="hideme invalid_dob_indicator" value="&staff.patron.display_overlay.invalid_dob.value;" command="cmd_patron_edit"/>
+        <label class="hideme invalid_address_indicator" value="&staff.patron.display_overlay.invalid_address.value;" command="cmd_patron_edit"/>
+        <label class="hideme invalid_email_indicator" value="&staff.patron.display_overlay.invalid_email.value;" command="cmd_patron_edit"/>
+        <label class="hideme invalid_phone_indicator" value="&staff.patron.display_overlay.invalid_phone.value;" command="cmd_patron_edit"/>
     </hbox>
     <hbox id="PatronNotNavBar" flex="1" class="my_bg">
         <vbox id="left_deck_vbox" flex="1" oils_persist="width">