Fix the Macros button for all template types. Remove a + + from some string concaten...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 2 Apr 2008 17:35:56 +0000 (17:35 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 2 Apr 2008 17:35:56 +0000 (17:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9193 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js

index 17786ba..340f870 100644 (file)
@@ -161,7 +161,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');
@@ -181,6 +181,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(
@@ -213,7 +258,7 @@ circ.print_list_template_editor.prototype = {
                                                                                        + 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%, '