var w;
switch(content_type) {
case 'text/html' :
- var jsrc = 'data:text/javascript,' + window.escape('var params = { "data" : ' + js2JSON(params.data) + ', "list" : ' + js2JSON(params.list) + '};');
- w = obj.win.open('data:text/html,<html><head><script src="' + window.escape(jsrc) + '"></script></head><body>' + window.escape(msg) + '</body></html>','receipt_temp','chrome,resizable');
+ var jsrc = 'data:text/javascript,' + window.escape('var params = { "data" : ' + js2JSON(params.data) + ', "list" : ' + js2JSON(params.list) + '}; function my_init() { if (' + (typeof params.modal != 'undefined' ? 'true' : 'false') + ') window.print(); }');
+ w = obj.win.open('data:text/html,<html><head><script src="' + window.escape(jsrc) + '"></script></head><body onload="my_init();">' + window.escape(msg) + '</body></html>','receipt_temp','chrome,resizable');
break;
default:
w = obj.win.open('data:' + content_type + ',' + window.escape(msg),'receipt_temp','chrome,resizable');
'footer' : g.data.print_list_templates[template].footer,
'type' : g.data.print_list_templates[template].type,
'list' : g.bill_list.dump_with_keys(),
+ 'modal' : true,
};
JSAN.use('util.print'); var print = new util.print();
print.tree_list( params );