[open-ils-commits] r9194 - branches/rel_1_2/Open-ILS/xul/staff_client/server/circ

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Apr 2 14:15:13 EDT 2008


Author: phasefx
Date: 2008-04-02 13:38:53 -0400 (Wed, 02 Apr 2008)
New Revision: 9194

Modified:
   branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
Log:
Fix the Macros button for all template types.  Change PINES_CODE to SHORTNAME

Modified: branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js	2008-04-02 17:35:56 UTC (rev 9193)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js	2008-04-02 17:38:53 UTC (rev 9194)
@@ -128,7 +128,7 @@
 								try {
 									JSAN.use('util.functional');
 									var template_type = obj.controller.view.template_type_menu.value;
-									var macros;
+									var macros = [];
 									switch(template_type) {
 										case 'items':
 											JSAN.use('circ.util');
@@ -148,6 +148,51 @@
 												}
 											);
 										break;
+										case 'transits':
+											JSAN.use('circ.util');
+											macros = util.functional.map_list(
+												circ.util.transit_columns( {} ),
+												function(o) {
+													return '%' + o.id + '%';
+												}
+											);
+										break;
+										case 'offline_checkout':
+											JSAN.use('circ.util');
+											macros = util.functional.map_list(
+												circ.util.offline_checkout_columns( {} ),
+												function(o) {
+													return '%' + o.id + '%';
+												}
+											);
+										break;
+										case 'offline_checkin':
+											JSAN.use('circ.util');
+											macros = util.functional.map_list(
+												circ.util.offline_checkin_columns( {} ),
+												function(o) {
+													return '%' + o.id + '%';
+												}
+											);
+										break;
+										case 'offline_renew':
+											JSAN.use('circ.util');
+											macros = util.functional.map_list(
+												circ.util.offline_renew_columns( {} ),
+												function(o) {
+													return '%' + o.id + '%';
+												}
+											);
+										break;
+                                        case 'offline_inhouse_use':
+											JSAN.use('circ.util');
+											macros = util.functional.map_list(
+												circ.util.offline_inhouse_use_columns( {} ),
+												function(o) {
+													return '%' + o.id + '%';
+												}
+											);
+										break;
 										case 'bills':
 											JSAN.use('patron.util');
 											macros = util.functional.map_list(
@@ -179,7 +224,7 @@
 											+ '<head><title>Template Macros</title></head>'
 											+ '<body onload="document.getElementById(\'btn\').focus()">'
 											+ '<h1>General:</h1>'
-											+ '<p>%PINES_CODE%, %TODAY%, %STAFF_FIRSTNAME%, %STAFF_LASTNAME%, '
+											+ '<p>%SHORTNAME%, %TODAY%, %STAFF_FIRSTNAME%, %STAFF_LASTNAME%, '
 											+ '%PATRON_FIRSTNAME%, %LIBRARY%</p>'
 											+ '<h1>For type: '
 											+ template_type + '</h1>'



More information about the open-ils-commits mailing list