disable Bill Patron button during use
authorJason Etheridge <jason@esilibrary.com>
Tue, 19 Feb 2013 23:30:58 +0000 (18:30 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 6 May 2013 17:38:39 +0000 (13:38 -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 a9af71d..7994bb5 100644 (file)
@@ -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
         );