From 04a6952da6535f1b26ebe328c8998c034fb569b7 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 17 Sep 2009 16:37:41 +0000 Subject: [PATCH] quick links for copying address info to the clipboard in tab-delimited format 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 | 2 ++ .../xul/staff_client/server/patron/summary.xul | 28 +++++++++++++++++++++- .../staff_client/server/patron/summary_overlay.xul | 8 +++++++ .../server/patron/summary_overlay_horiz.xul | 8 +++++++ 4 files changed, 45 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index cbd66e3e9..a8c28aa20 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -1212,6 +1212,7 @@ + @@ -1220,6 +1221,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/patron/summary.xul b/Open-ILS/xul/staff_client/server/patron/summary.xul index 1aa10444d..68144ae4e 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.xul +++ b/Open-ILS/xul/staff_client/server/patron/summary.xul @@ -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"); diff --git a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul index cddc5a428..a1e1266b5 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/summary_overlay.xul @@ -213,6 +213,10 @@