From f864e6ba24c47291609cc4880ef2f3ea28e2ee44 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 16 Mar 2006 17:03:14 +0000 Subject: [PATCH] for now.. we still need to move the receipt templates to org settings git-svn-id: svn://svn.open-ils.org/ILS/trunk@3379 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/OpenILS/data.js | 43 +++++++++++++++++++ .../server/circ/print_list_template_editor.js | 37 ---------------- 2 files changed, 43 insertions(+), 37 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js index 7e8d6dd649..c8137f65e2 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js @@ -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:
    ', + 'line_item' : '
  1. %title%\r\nBarcode: %barcode%\r\n', + 'footer' : '

%PINES_CODE% %TODAY%\r\n', + }, + 'items_out' : { + 'type' : 'items', + 'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou have the following items:
    ', + 'line_item' : '
  1. %title%\r\nBarcode: %barcode% Due: %due_date%\r\n', + 'footer' : '

%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:
    ', + 'line_item' : '
  1. %title%\r\nBarcode: %barcode% Due: %due_date%\r\n', + 'footer' : '

%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%', + }, + 'checkin' : { + 'type' : 'items', + 'header' : 'You checked in the following items:
    ', + 'line_item' : '
  1. %title%\r\nBarcode: %barcode% Call Number: %call_number%\r\n', + 'footer' : '

%PINES_CODE% %TODAY%\r\n', + }, + 'holds' : { + 'type' : 'holds', + 'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou have the following titles on hold:
    ', + 'line_item' : '
  1. %title%\r\n', + 'footer' : '

%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'); 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 a8324e90ae..a1724c865e 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 @@ -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:
    ', - 'line_item' : '
  1. %title%\r\nBarcode: %barcode%\r\n', - 'footer' : '

%PINES_CODE% %TODAY%\r\n', - }, - 'items_out' : { - 'type' : 'items', - 'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou have the following items:
    ', - 'line_item' : '
  1. %title%\r\nBarcode: %barcode% Due: %due_date%\r\n', - 'footer' : '

%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:
    ', - 'line_item' : '
  1. %title%\r\nBarcode: %barcode% Due: %due_date%\r\n', - 'footer' : '

%PINES_CODE% %TODAY%\r\nYou were helped by %STAFF_FIRSTNAME% %STAFF_LASTNAME%', - }, - 'checkin' : { - 'type' : 'items', - 'header' : 'You checked in the following items:
    ', - 'line_item' : '
  1. %title%\r\nBarcode: %barcode% Call Number: %call_number%\r\n', - 'footer' : '

%PINES_CODE% %TODAY%\r\n', - }, - 'holds' : { - 'type' : 'holds', - 'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!\r\nYou have the following titles on hold:
    ', - 'line_item' : '
  1. %title%\r\n', - 'footer' : '

%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(); -- 2.43.2