From bee3a079be187e575b72e007e844d496c291684b Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 23 Sep 2011 14:58:25 -0400 Subject: [PATCH] silent macro updates Signed-off-by: Jason Etheridge --- .../chrome/content/OpenILS/data.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 73fbc61b52..c256315f8c 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js @@ -270,6 +270,25 @@ OpenILS.data.prototype = { for (var i in x) { obj.print_list_templates[i] = x[i]; } + // handle macro changes + var templates = [ 'bills_current', 'bills_historical' ]; + for (var i = 0; i < templates.length; i++) { + if (obj.print_list_templates[templates[i]]) { + // mbts_id + obj.print_list_templates[templates[i]].line_item = + obj.print_list_templates[templates[i]].line_item.replace( + /%id%/g, '%mbts_id%'); + // mbts_xact_start + obj.print_list_templates[templates[i]].line_item = + obj.print_list_templates[templates[i]].line_item.replace( + /%xact_start%/g, '%mbts_xact_start%'); + // mbts_xact_finish + obj.print_list_templates[templates[i]].line_item = + obj.print_list_templates[templates[i]].line_item.replace( + /%xact_finish%/g, '%mbts_xact_finish%'); + } + } + // obj.stash('print_list_templates'); obj.data_progress('Saved print templates retrieved from file. '); } -- 2.43.2