lp949322 Copy Patron barcode to clipboard when clicking their name
authoredoceo <code@edoceo.com>
Thu, 2 Aug 2012 02:33:20 +0000 (19:33 -0700)
committerJason Etheridge <jason@esilibrary.com>
Tue, 18 Sep 2012 14:33:26 +0000 (10:33 -0400)
CTRL+Click will open the patron record in a new tab

Signed-off-by: edoceo <code@edoceo.com>
This affects the patron label in Item Status -> Alt View -> Holds/Transits.  Looks good to me.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul

index 128fd22..29a7dd8 100644 (file)
@@ -626,6 +626,13 @@ function load_item() {
             JSAN.use('patron.util'); 
             var au_obj = patron.util.retrieve_fleshed_au_via_id( ses(), details.hold.usr() );
             $('hold_patron_name').setAttribute('value', $('circStrings').getFormattedString('staff.circ.copy_details.user_details', [au_obj.family_name(), au_obj.first_given_name(), au_obj.card().barcode()]) );
+            $('hold_patron_name').onclick = function(e) {
+                if (e.ctrlKey) {
+                   window.xulG.new_patron_tab( {}, { 'id' : au_obj.id() } );
+                   return;
+                }
+                copy_to_clipboard(au_obj.card().barcode());
+            };
 
             set("hold_status", details.hold.status()); 
             set("transit", details.hold.transit()); 
index bcdf212..7d39fd9 100644 (file)
                 <tabpanel orient="vertical"><!-- Hold/Transit -->
                     <groupbox flex="1" id="holds" style="overflow: none; min-height: 80;" oils_persist="height">
                         <caption id="hold_caption" label="&staff.circ.copy_details.hold_caption;"/>
-                        <label id="hold_patron_name" class="patronNameLarge"/>
+                        <label id="hold_patron_name" class="patronNameLarge click_link"/>
                         <tree id="hold" flex="1" enableColumnDrag="true"/>
                         <spacer FIXME="label and tree get swapped without this"/>
                     </groupbox>