disable Bill Patron button during use
authorJason Etheridge <jason@esilibrary.com>
Tue, 19 Feb 2013 23:30:58 +0000 (18:30 -0500)
committerJason Etheridge <jason@esilibrary.com>
Tue, 27 May 2014 20:01:02 +0000 (16:01 -0400)
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 <jason@esilibrary.com>
Open-ILS/xul/staff_client/server/patron/bill2.js

index 8a248f3..e2e308e 100644 (file)
@@ -158,6 +158,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,
@@ -169,6 +170,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
         );