From 28305d79dee8ca83203fd6da569f859566fe9034 Mon Sep 17 00:00:00 2001 From: phasefx Date: Sun, 16 Jul 2006 05:54:00 +0000 Subject: [PATCH] print on_all_fleshed callback git-svn-id: svn://svn.open-ils.org/ILS/trunk@5023 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/server/patron/bill_history.xul | 38 +++++++++++++--------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/bill_history.xul b/Open-ILS/xul/staff_client/server/patron/bill_history.xul index 9a00e9fcda..9d860d8a2d 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill_history.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill_history.xul @@ -283,21 +283,29 @@ function print_bills() { try { - var template = 'bills_historical'; if (g.cgi.param('current')) template = 'bills_current'; - JSAN.use('patron.util'); - var params = { - 'patron' : patron.util.retrieve_au_via_id(ses(),g.patron_id), - 'lib' : g.data.hash.aou[ g.data.list.au[0].ws_ou() ], - 'staff' : g.data.list.au[0], - 'header' : g.data.print_list_templates[template].header, - 'line_item' : g.data.print_list_templates[template].line_item, - '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 ); + g.bill_list.on_all_fleshed = function() { + try { + var template = 'bills_historical'; if (g.cgi.param('current')) template = 'bills_current'; + JSAN.use('patron.util'); + var params = { + 'patron' : patron.util.retrieve_au_via_id(ses(),g.patron_id), + 'lib' : g.data.hash.aou[ g.data.list.au[0].ws_ou() ], + 'staff' : g.data.list.au[0], + 'header' : g.data.print_list_templates[template].header, + 'line_item' : g.data.print_list_templates[template].line_item, + '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 ); + setTimeout(function(){ g.bill_list.on_all_fleshed = null; },0); + } catch(E) { + g.error.standard_unexpected_error_alert('printing bills', E); + } + } + g.bill_list.full_retrieve(); } catch(E) { g.error.standard_unexpected_error_alert('printing bills', E); } -- 2.11.0