quick links for copying address info to the clipboard in tab-delimited format
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Sep 2009 16:37:41 +0000 (16:37 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Sep 2009 16:37:41 +0000 (16:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14042 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/patron/summary.xul
Open-ILS/xul/staff_client/server/patron/summary_overlay.xul
Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul

index cbd66e3..a8c28aa 100644 (file)
 <!ENTITY staff.patron_display.toggle_summary.accesskey 'T'>
 <!ENTITY staff.patron_display.delete_patron.label 'Delete Patron Account'>
 <!ENTITY staff.patron_display.delete_patron.accesskey 'D'>
+<!ENTITY staff.patron_display.mailing.copy '(Copy)'>
 <!ENTITY staff.patron_display.mailing.city.label 'Mailing City:'>
 <!ENTITY staff.patron_display.mailing.post_code.label 'Mailing ZIP:'>
 <!ENTITY staff.patron_display.mailing.state.label 'Mailing State:'>
 <!ENTITY staff.patron_display.mailing_address 'Mailing Address'>
 <!ENTITY staff.patron_display.name.label 'Patron Name'>
 <!ENTITY staff.patron_display.other_phone.label 'Other Phone:'>
+<!ENTITY staff.patron_display.physical.copy '(Copy)'>
 <!ENTITY staff.patron_display.physical.city.label 'Physical City:'>
 <!ENTITY staff.patron_display.physical.post_code.label 'Physical ZIP:'>
 <!ENTITY staff.patron_display.physical.state.label 'Physical State:'>
index 1aa1044..68144ae 100644 (file)
                                alert(err_msg);
                        }
                }
-               
+
+        function copy_mailing_address() {
+            var a = g.summary.patron.mailing_address();
+            if (!a) return;
+            copy_to_clipboard(
+                (a.street1() ? a.street1() : "") + "\t" + 
+                (a.street2() ? a.street2() : "") + "\t" +  
+                (a.county() ? a.county() : "") + "\t" + 
+                (a.city() ? a.city() : "") + "\t" +  
+                (a.post_code() ? a.post_code() : "") + "\t" + 
+                (a.country() ? a.country() : "")
+            );
+        }
+        
+        function copy_billing_address() {
+            var a = g.summary.patron.billing_address();
+            if (!a) return;
+            copy_to_clipboard(
+                (a.street1() ? a.street1() : "") + "\t" + 
+                (a.street2() ? a.street2() : "") + "\t" +  
+                (a.county() ? a.county() : "") + "\t" + 
+                (a.city() ? a.city() : "") + "\t" +  
+                (a.post_code() ? a.post_code() : "") + "\t" + 
+                (a.country() ? a.country() : "")
+            );
+        }
+       
                function post_overlay() {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
index cddc5a4..a1e1266 100644 (file)
                <label id="patron_mailing_address_state" tooltiptext="&staff.patron_display.mailing.state.label;" class="address state mailing"/>
                <label id="patron_mailing_address_post_code" tooltiptext="&staff.patron_display.mailing.post_code.label;" class="address post_code mailing"/>
        </hbox>
+    <hbox>
+        <spacer flex="1" />
+        <label value="&staff.patron_display.mailing.copy;" onclick="copy_mailing_address();" class="click_link"/>
+    </hbox>
 </groupbox>
 
 <groupbox id="PatronSummaryContact_physical_address" orient="vertical">
                <label id="patron_physical_address_state" tooltiptext="&staff.patron_display.physical.state.label;" class="address state physical"/>
                <label id="patron_physical_address_post_code" tooltiptext="&staff.patron_display.physical.post_code.label;" class="address post_code physical"/>
        </hbox>
+    <hbox>
+        <spacer flex="1" />
+        <label value="&staff.patron_display.physical.copy;" onclick="copy_billing_address();" class="click_link"/>
+    </hbox>
 </groupbox>
 
 </overlay>
index 6db5608..378a0d9 100644 (file)
                <label id="patron_mailing_address_state" tooltiptext="&staff.patron_display.mailing.state.label;" class="address state mailing"/>
                <label id="patron_mailing_address_post_code" tooltiptext="&staff.patron_display.mailing.post_code.label;" class="address post_code mailing"/>
        </hbox>
+    <hbox>
+        <spacer flex="1" />
+        <label value="&staff.patron_display.mailing.copy;" onclick="copy_mailing_address();" class="click_link"/>
+    </hbox>
 </vbox>
 
 <vbox id="PatronSummaryContact_physical_address">
                <label id="patron_physical_address_state" tooltiptext="&staff.patron_display.physical.state.label;" class="address state physical"/>
                <label id="patron_physical_address_post_code" tooltiptext="&staff.patron_display.physical.post_code.label;" class="address post_code physical"/>
        </hbox>
+    <hbox>
+        <spacer flex="1" />
+        <label value="&staff.patron_display.physical.copy;" onclick="copy_billing_address();" class="click_link"/>
+    </hbox>
 </vbox>
 
 </overlay>