Add some additional error handling and prevent disabled buttons from being triggered
This commit is contained in:
parent
8a5c25291e
commit
071de55329
4 changed files with 24 additions and 15 deletions
|
@ -210,7 +210,10 @@ var AIRTIME = (function(AIRTIME) {
|
|||
btn.element = buttonElement; //Save this guy in case you need it later.
|
||||
//Bind event handlers to each button
|
||||
$.each(btn.eventHandlers, function(eventName, eventCallback) {
|
||||
$(buttonElement).on(eventName, eventCallback);
|
||||
$(buttonElement).on(eventName, function () {
|
||||
if ($(buttonElement).find("button").is(':disabled')) { return; }
|
||||
eventCallback();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue