From c602d1e028331b480249260b12d344551b2728b9 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Tue, 1 Oct 2013 16:21:21 -0400 Subject: [PATCH] modify bill2.js --- Open-ILS/xul/staff_client/server/patron/bill2.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index a9af71d7ca..e20fad3d99 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -152,6 +152,7 @@ function event_listeners() { window.bill_event_listeners.add($('bill_patron_btn'), 'command', function() { + $('bill_patron_btn').disabled = true; JSAN.use('util.window'); var win = new util.window(); var my_xulG = win.open( urls.XUL_PATRON_BILL_WIZARD, @@ -163,6 +164,7 @@ function event_listeners() { g.funcs.push( gen_list_append_func( my_xulG.xact_id ) ); if (typeof window.xulG == 'object' && typeof window.xulG.on_money_change == 'function') window.xulG.on_money_change(); } + $('bill_patron_btn').disabled = false; }, false ); @@ -170,16 +172,24 @@ function event_listeners() { window.bill_event_listeners.add($('bill_history_btn'), 'command', function() { - xulG.display_window.g.patron.right_deck.reset_iframe( - urls.XUL_PATRON_BILL_HISTORY, - {}, - { + if (xulG.alt_bill_history) { + xulG.alt_bill_history(); + } else { + var content_params = { 'patron_id' : g.patron_id, 'refresh' : function() { refresh(); }, 'new_tab' : xulG.new_tab, 'url_prefix' : xulG.url_prefix - } - ); + }; + var func = xulG.display_window + ? xulG.display_window.g.patron.right_deck.reset_iframe + : xulG.set_tab; + func( + urls.XUL_PATRON_BILL_HISTORY, + {}, + content_params + ); + } }, false ); -- 2.11.0