From f202b5dcfdd9a75e61fac4fdd7f840b09e0623ad Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 30 Aug 2010 15:36:23 +0000 Subject: [PATCH] allows us to set printer context for list-based print actions git-svn-id: svn://svn.open-ils.org/ILS/trunk@17378 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/chrome/content/util/list.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/util/list.js b/Open-ILS/xul/staff_client/chrome/content/util/list.js index 421139c43..e0568a15f 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/list.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js @@ -33,6 +33,8 @@ util.list.prototype = { JSAN.use('util.widgets'); + obj.printer_context = params.printer_context; + if (typeof params.map_row_to_column == 'function') obj.map_row_to_column = params.map_row_to_column; if (typeof params.map_row_to_columns == 'function') { obj.map_row_to_columns = params.map_row_to_columns; @@ -1265,7 +1267,7 @@ util.list.prototype = { 'dump_csv_to_printer' : function(params) { var obj = this; - JSAN.use('util.print'); var print = new util.print(); + JSAN.use('util.print'); var print = new util.print(params.printer_context || obj.printer_context); if (typeof params == 'undefined') params = {}; if (params.no_full_retrieve) { print.simple( obj.dump_csv( params ), {'content_type':'text/plain'} ); @@ -1280,7 +1282,7 @@ util.list.prototype = { 'dump_extended_format_to_printer' : function(params) { var obj = this; - JSAN.use('util.print'); var print = new util.print(); + JSAN.use('util.print'); var print = new util.print(params.printer_context || obj.printer_context); if (typeof params == 'undefined') params = {}; if (params.no_full_retrieve) { print.simple( obj.dump_extended_format( params ), {'content_type':'text/plain'} ); @@ -1341,7 +1343,7 @@ util.list.prototype = { function() { try { if (!params.list) params.list = obj.dump_with_keys(); - JSAN.use('util.print'); var print = new util.print(); + JSAN.use('util.print'); var print = new util.print(params.printer_context || obj.printer_context); print.tree_list( params ); if (typeof params.callback == 'function') params.callback(); } catch(E) { -- 2.11.0