From: phasefx Date: Wed, 2 Apr 2008 17:38:53 +0000 (+0000) Subject: Fix the Macros button for all template types. Change PINES_CODE to SHORTNAME X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5cac7955e96517e555184e1e9a3e44daca896908;p=Evergreen.git Fix the Macros button for all template types. Change PINES_CODE to SHORTNAME git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@9194 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js b/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js index 19bc1c8724..acd686f3f5 100644 --- a/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js +++ b/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js @@ -128,7 +128,7 @@ circ.print_list_template_editor.prototype = { 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 @@ circ.print_list_template_editor.prototype = { } ); 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 @@ circ.print_list_template_editor.prototype = { + 'Template Macros' + '' + '

General:

' - + '

%PINES_CODE%, %TODAY%, %STAFF_FIRSTNAME%, %STAFF_LASTNAME%, ' + + '

%SHORTNAME%, %TODAY%, %STAFF_FIRSTNAME%, %STAFF_LASTNAME%, ' + '%PATRON_FIRSTNAME%, %LIBRARY%

' + '

For type: ' + template_type + '

'