[open-ils-commits] r9193 - trunk/Open-ILS/xul/staff_client/server/circ

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


Author: phasefx
Date: 2008-04-02 13:35:56 -0400 (Wed, 02 Apr 2008)
New Revision: 9193

Modified:
   trunk/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
Log:
Fix the Macros button for all template types.  Remove a + + from some string concatenation that was putting NaN in the display

Modified: trunk/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js	2008-04-02 17:07:25 UTC (rev 9192)
+++ trunk/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js	2008-04-02 17:35:56 UTC (rev 9193)
@@ -161,7 +161,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');
@@ -181,6 +181,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(
@@ -213,7 +258,7 @@
 											+ document.getElementById('circStrings').getString('staff.circ.print_list_template.window.title')
 											+ '</title></head>'
 											+ '<body onload="document.getElementById(\'btn\').focus()">'
-											+ '<h1>' +
+											+ '<h1>' 
 											+ document.getElementById('circStrings').getString('staff.circ.print_list_template.window.heading')
 											+ '</h1>'
 											+ '<p>%SHORTNAME%, %TODAY%, %STAFF_FIRSTNAME%, %STAFF_LASTNAME%, '



More information about the open-ils-commits mailing list