From: pines
Date: Tue, 27 Mar 2007 01:54:08 +0000 (+0000)
Subject: backporting shortname print macro and holding maintenance fixes
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cdccf01bc23f2dcbf15a5652deed3d7be2cafa2c;p=Evergreen.git
backporting shortname print macro and holding maintenance fixes
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@7109 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
index 59e5404b43..2b6c7ca2dd 100644
--- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
+++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
@@ -150,25 +150,25 @@ OpenILS.data.prototype = {
'type' : 'items',
'header' : 'The following items have been examined:
',
'line_item' : '- %title%
\r\nBarcode: %barcode%\r\n',
- 'footer' : '
%PINES_CODE% %TODAY_TRIM%
\r\n
\r\n',
+ 'footer' : '
%SHORTNAME% %TODAY_TRIM%
\r\n
\r\n',
},
'transit_list' : {
'type' : 'transits',
'header' : 'Transits:
',
'line_item' : '- From: %transit_source% To: %transit_dest_lib%
\r\nWhen: %transit_source_send_time%
\r\nBarcode: %transit_item_barcode% Title: %transit_item_title%
\r\n',
- 'footer' : '
%PINES_CODE% %TODAY_TRIM%
\r\n
\r\n',
+ 'footer' : '
%SHORTNAME% %TODAY_TRIM%
\r\n
\r\n',
},
'items_out' : {
'type' : 'items',
'header' : 'Welcome to %LIBRARY%!
\r\nYou have the following items:
',
'line_item' : '- %title%
\r\nBarcode: %barcode% Due: %due_date%\r\n',
- 'footer' : '
%PINES_CODE% %TODAY_TRIM%
\r\nYou were helped by %STAFF_FIRSTNAME%
\r\n
\r\n',
+ 'footer' : '
%SHORTNAME% %TODAY_TRIM%
\r\nYou were helped by %STAFF_FIRSTNAME%
\r\n
\r\n',
},
'checkout' : {
'type' : 'items',
'header' : 'Welcome to %LIBRARY%!
\r\nYou checked out the following items:
',
'line_item' : '- %title%
\r\nBarcode: %barcode% Due: %due_date%\r\n',
- 'footer' : '
%PINES_CODE% %TODAY_TRIM%
\r\nYou were helped by %STAFF_FIRSTNAME%
\r\n
\r\n',
+ 'footer' : '
%SHORTNAME% %TODAY_TRIM%
\r\nYou were helped by %STAFF_FIRSTNAME%
\r\n
\r\n',
},
'offline_checkout' : {
'type' : 'offline_checkout',
@@ -180,25 +180,25 @@ OpenILS.data.prototype = {
'type' : 'items',
'header' : 'You checked in the following items:
',
'line_item' : '- %title%
\r\nBarcode: %barcode% Call Number: %call_number%\r\n',
- 'footer' : '
%PINES_CODE% %TODAY_TRIM%
\r\n
\r\n',
+ 'footer' : '
%SHORTNAME% %TODAY_TRIM%
\r\n
\r\n',
},
'bill_payment' : {
'type' : 'payment',
'header' : 'Welcome to %LIBRARY%!
A receipt of your transaction:
| Original Balance: | $%original_balance% |
| Payment Method: | %payment_type% |
| Payment Received: | $%payment_received% |
| Payment Applied: | $%payment_applied% |
| Billings Voided: | %voided_balance% |
| Change Given: | $%change_given% |
| New Balance: | $%new_balance% |
Note: %note%
Specific bills:
',
'line_item' : 'Bill #%bill_id% %last_billing_type% Received: $%payment%
%barcode% %title%
',
- 'footer' : '
%PINES_CODE% %TODAY_TRIM%
',
+ 'footer' : '
%SHORTNAME% %TODAY_TRIM%
',
},
'bills_historical' : {
'type' : 'bills',
'header' : 'Welcome to %LIBRARY%!
You had the following bills:
',
'line_item' : '- Bill #%id%
-
| Date: | %xact_start% |
| Type: | %xact_type% |
| Last Billing: | %last_billing_type% %last_billing_note% |
| Total Billed: | $%total_owed% |
| Last Payment: | %last_payment_type% %last_payment_note% |
| Total Paid: | $%total_paid% |
| Balance: | $%balance_owed% |
',
- 'footer' : '
%PINES_CODE% %TODAY_TRIM%
\r\n
\r\n',
+ 'footer' : '
%SHORTNAME% %TODAY_TRIM%
\r\n
\r\n',
},
'bills_current' : {
'type' : 'bills',
'header' : 'Welcome to %LIBRARY%!
You have the following bills:
',
'line_item' : '- Bill #%id%
-
| Date: | %xact_start% |
| Type: | %xact_type% |
| Last Billing: | %last_billing_type% %last_billing_note% |
| Total Billed: | $%total_owed% |
| Last Payment: | %last_payment_type% %last_payment_note% |
| Total Paid: | $%total_paid% |
| Balance: | $%balance_owed% |
',
- 'footer' : '
%PINES_CODE% %TODAY_TRIM%
\r\n
\r\n',
+ 'footer' : '
%SHORTNAME% %TODAY_TRIM%
\r\n
\r\n',
},
'offline_checkin' : {
'type' : 'offline_checkin',
@@ -228,7 +228,7 @@ OpenILS.data.prototype = {
'type' : 'holds',
'header' : 'Welcome to %LIBRARY%!
\r\nYou have the following titles on hold:
',
'line_item' : '- %title%\r\n',
- 'footer' : '
%PINES_CODE% %TODAY_TRIM%
\r\nYou were helped by %STAFF_FIRSTNAME%
\r\n
\r\n',
+ 'footer' : '
%SHORTNAME% %TODAY_TRIM%
\r\nYou were helped by %STAFF_FIRSTNAME%
\r\n
\r\n',
}
};
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/print.js b/Open-ILS/xul/staff_client/chrome/content/util/print.js
index d516b33cd0..b4d6f9b863 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/print.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js
@@ -154,6 +154,8 @@ util.print.prototype = {
catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
try{b = s; s = s.replace(/%PINES_CODE%/,params.lib.shortname());}
catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
+ try{b = s; s = s.replace(/%SHORTNAME%/,params.lib.shortname());}
+ catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
try{b = s; s = s.replace(/%STAFF_FIRSTNAME%/,params.staff.first_given_name());}
catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
try{b = s; s = s.replace(/%STAFF_LASTNAME%/,params.staff.family_name());}
diff --git a/Open-ILS/xul/staff_client/server/cat/copy_browser.js b/Open-ILS/xul/staff_client/server/cat/copy_browser.js
index b0c916d719..8c31a51937 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_browser.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_browser.js
@@ -874,7 +874,7 @@ cat.copy_browser.prototype = {
'command',
function(ev) {
//obj.show_my_libs(ev.target.value);
- JSAN.use('util.file'); var file = new util.file('copy_browser_prefs');
+ JSAN.use('util.file'); var file = new util.file('copy_browser_prefs.'+obj.data.server_unadorned);
util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ], 'show_acns' : [ 'checked' ], 'show_acps' : [ 'checked' ] });
obj.refresh_list();
},
@@ -886,14 +886,18 @@ cat.copy_browser.prototype = {
JSAN.use('util.widgets');
- file = new util.file('copy_browser_prefs');
+ file = new util.file('copy_browser_prefs.'+obj.data.server_unadorned);
util.widgets.load_attributes(file);
ml.value = ml.getAttribute('value');
+ if (! ml.value) {
+ ml.value = org.id();
+ ml.setAttribute('value',ml.value);
+ }
document.getElementById('show_acns').addEventListener(
'command',
function(ev) {
- JSAN.use('util.file'); var file = new util.file('copy_browser_prefs');
+ JSAN.use('util.file'); var file = new util.file('copy_browser_prefs.'+obj.data.server_unadorned);
util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ], 'show_acns' : [ 'checked' ], 'show_acps' : [ 'checked' ] });
},
false
@@ -902,7 +906,7 @@ cat.copy_browser.prototype = {
document.getElementById('show_acps').addEventListener(
'command',
function(ev) {
- JSAN.use('util.file'); var file = new util.file('copy_browser_prefs');
+ JSAN.use('util.file'); var file = new util.file('copy_browser_prefs.'+obj.data.server_unadorned);
util.widgets.save_attributes(file, { 'lib_menu' : [ 'value' ], 'show_acns' : [ 'checked' ], 'show_acps' : [ 'checked' ] });
},
false