From: Jason Etheridge Date: Tue, 19 Feb 2013 23:30:58 +0000 (-0500) Subject: disable Bill Patron button during use X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=efafcb98f5b4c8204d87c08c0b772c9e40872e1c;p=evergreen%2Fequinox.git disable Bill Patron button during use Even though the resulting window is modal, I've seen errors when trying to spam the button while waiting for that window. Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index 68421c2ec1..3dba04c8fd 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, @@ -159,7 +160,11 @@ function event_listeners() { 'chrome,resizable,modal', { 'patron_id' : g.patron_id } ); - if (my_xulG.xact_id) { g.funcs.push( gen_list_append_func( my_xulG.xact_id ) ); /* FIXME: do something to update summary sidebar */ } + if (my_xulG.xact_id) { + 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 );