This commit is contained in:
Duncan Sommerville 2015-06-26 15:12:52 -04:00
parent 5fe70754bd
commit c79e4fb9ea
2 changed files with 9 additions and 6 deletions

View File

@ -135,11 +135,14 @@ var AIRTIME = (function(AIRTIME){
mod.checkDeleteButton = function() {
var $selected = $sbTable.find("tbody").find("input:checkbox").filter(":checked");
var button = $("#show_builder").find(".icon-trash").parent(),
DISABLED_CLASS = 'ui-state-disabled';
if ($selected.length !== 0) {
AIRTIME.button.enableButton("icon-trash", true);
}
else {
AIRTIME.button.disableButton("icon-trash", true);
button.removeClass(DISABLED_CLASS);
button.removeAttr('disabled');
} else {
button.addClass(DISABLED_CLASS);
button.attr('disabled', 'disabled');
}
};