for now.. we still need to move the receipt templates to org settings
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Mar 2006 17:03:14 +0000 (17:03 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Mar 2006 17:03:14 +0000 (17:03 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3379 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js

index 7e8d6dd..c8137f6 100644 (file)
@@ -91,10 +91,53 @@ OpenILS.data.prototype = {
                }
        },
 
+       'print_list_defaults' : function() {
+               var obj = this;
+               if (typeof obj.print_list_templates == 'undefined') {
+                       obj.print_list_types = [ 'items', 'holds', 'patrons' ];
+                       obj.print_list_templates = { 
+                               'item_status' : {
+                                       'type' : 'items',
+                                       'header' : 'You following items were checked:<hr/><ol>',
+                                       'line_item' : '<li>%title%\r\nBarcode: %barcode%\r\n',
+                                       'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\n',
+                               }, 
+                               'items_out' : {
+                                       'type' : 'items',
+                                       'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou have the following items:<hr/><ol>',
+                                       'line_item' : '<li>%title%\r\nBarcode: %barcode% Due: %due_date%\r\n',
+                                       'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%',
+                               }, 
+                               'checkout' : {
+                                       'type' : 'items',
+                                       'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou checked out the following items:<hr/><ol>',
+                                       'line_item' : '<li>%title%\r\nBarcode: %barcode% Due: %due_date%\r\n',
+                                       'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%',
+                               }, 
+                               'checkin' : {
+                                       'type' : 'items',
+                                       'header' : 'You checked in the following items:<hr/><ol>',
+                                       'line_item' : '<li>%title%\r\nBarcode: %barcode%  Call Number: %call_number%\r\n',
+                                       'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\n',
+                               }, 
+                               'holds' : {
+                                       'type' : 'holds',
+                                       'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou have the following titles on hold:<hr/><ol>',
+                                       'line_item' : '<li>%title%\r\n',
+                                       'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%',
+                               } 
+                       }; 
+
+                       obj.stash( 'print_list_templates', 'print_list_types' );
+               }
+       },
+
        'network_retrieve' : function() {
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                var obj = this;
 
+               try { obj.print_list_defaults(); } catch(E) { alert(E); }
+
                JSAN.use('util.file');
                JSAN.use('util.functional');
                JSAN.use('util.fm_utils');
index a8324e9..a1724c8 100644 (file)
@@ -37,43 +37,6 @@ circ.print_list_template_editor.prototype = {
 
                        }
 
-                       if (typeof obj.data.print_list_templates == 'undefined') {
-                               obj.data.print_list_types = [ 'items', 'holds', 'patrons' ];
-                               obj.data.print_list_templates = { 
-                                       'item_status' : {
-                                               'type' : 'items',
-                                               'header' : 'You following items were checked:<hr/><ol>',
-                                               'line_item' : '<li>%title%\r\nBarcode: %barcode%\r\n',
-                                               'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\n',
-                                       }, 
-                                       'items_out' : {
-                                               'type' : 'items',
-                                               'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou have the following items:<hr/><ol>',
-                                               'line_item' : '<li>%title%\r\nBarcode: %barcode% Due: %due_date%\r\n',
-                                               'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%',
-                                       }, 
-                                       'checkout' : {
-                                               'type' : 'items',
-                                               'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou checked out the following items:<hr/><ol>',
-                                               'line_item' : '<li>%title%\r\nBarcode: %barcode% Due: %due_date%\r\n',
-                                               'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%',
-                                       }, 
-                                       'checkin' : {
-                                               'type' : 'items',
-                                               'header' : 'You checked in the following items:<hr/><ol>',
-                                               'line_item' : '<li>%title%\r\nBarcode: %barcode%  Call Number: %call_number%\r\n',
-                                               'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\n',
-                                       }, 
-                                       'holds' : {
-                                               'type' : 'holds',
-                                               'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou have the following titles on hold:<hr/><ol>',
-                                               'line_item' : '<li>%title%\r\n',
-                                               'footer' : '</ol><hr />%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%',
-                                       } 
-                               }; 
-
-                               obj.data.stash( 'print_list_templates', 'print_list_types' );
-                       }
 
                        obj.controller_init();
                        obj.controller.render(); obj.controller.view.template_name_menu.focus();