[open-ils-commits] r14042 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Sep 17 12:37:44 EDT 2009


Author: phasefx
Date: 2009-09-17 12:37:41 -0400 (Thu, 17 Sep 2009)
New Revision: 14042

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/server/patron/summary.xul
   trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul
   trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
Log:
quick links for copying address info to the clipboard in tab-delimited format

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-09-17 16:13:46 UTC (rev 14041)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-09-17 16:37:41 UTC (rev 14042)
@@ -1212,6 +1212,7 @@
 <!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:'>
@@ -1220,6 +1221,7 @@
 <!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:'>

Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary.xul	2009-09-17 16:13:46 UTC (rev 14041)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary.xul	2009-09-17 16:37:41 UTC (rev 14042)
@@ -76,7 +76,33 @@
 				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");

Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul	2009-09-17 16:13:46 UTC (rev 14041)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul	2009-09-17 16:37:41 UTC (rev 14042)
@@ -213,6 +213,10 @@
 		<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">
@@ -224,6 +228,10 @@
 		<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>

Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul	2009-09-17 16:13:46 UTC (rev 14041)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul	2009-09-17 16:37:41 UTC (rev 14042)
@@ -227,6 +227,10 @@
 		<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">
@@ -237,6 +241,10 @@
 		<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>



More information about the open-ils-commits mailing list