[open-ils-commits] r17378 - trunk/Open-ILS/xul/staff_client/chrome/content/util (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 30 11:36:25 EDT 2010
Author: phasefx
Date: 2010-08-30 11:36:23 -0400 (Mon, 30 Aug 2010)
New Revision: 17378
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js
Log:
allows us to set printer context for list-based print actions
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js 2010-08-30 15:36:20 UTC (rev 17377)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js 2010-08-30 15:36:23 UTC (rev 17378)
@@ -33,6 +33,8 @@
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 @@
'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 @@
'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 @@
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) {
More information about the open-ils-commits
mailing list