Fix broken delete button
This commit is contained in:
parent
4be34ea94b
commit
19fb67c8d6
|
@ -12,7 +12,8 @@ var AIRTIME = (function(AIRTIME){
|
||||||
cursors = [],
|
cursors = [],
|
||||||
cursorIds = [],
|
cursorIds = [],
|
||||||
showInstanceIds = [],
|
showInstanceIds = [],
|
||||||
headerFooter = [];
|
headerFooter = [],
|
||||||
|
DISABLED_CLASS = 'ui-state-disabled';
|
||||||
|
|
||||||
if (AIRTIME.showbuilder === undefined) {
|
if (AIRTIME.showbuilder === undefined) {
|
||||||
AIRTIME.showbuilder = {};
|
AIRTIME.showbuilder = {};
|
||||||
|
@ -135,8 +136,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
mod.checkDeleteButton = function() {
|
mod.checkDeleteButton = function() {
|
||||||
var $selected = $sbTable.find("tbody").find("input:checkbox").filter(":checked");
|
var $selected = $sbTable.find("tbody").find("input:checkbox").filter(":checked");
|
||||||
|
|
||||||
var button = $("#show_builder").find(".icon-trash").parent(),
|
var button = $("#show_builder").find(".icon-trash").parent();
|
||||||
DISABLED_CLASS = 'ui-state-disabled';
|
|
||||||
if ($selected.length !== 0) {
|
if ($selected.length !== 0) {
|
||||||
button.removeClass(DISABLED_CLASS);
|
button.removeClass(DISABLED_CLASS);
|
||||||
button.removeAttr('disabled');
|
button.removeAttr('disabled');
|
||||||
|
@ -535,9 +535,6 @@ var AIRTIME = (function(AIRTIME){
|
||||||
cl = 'sb-header';
|
cl = 'sb-header';
|
||||||
|
|
||||||
if (aData.record === true) {
|
if (aData.record === true) {
|
||||||
|
|
||||||
//headerIcon = (aData.soundcloud_id > 0) ? "soundcloud" : "recording";
|
|
||||||
|
|
||||||
$div = $("<div/>", {
|
$div = $("<div/>", {
|
||||||
"class": "small-icon " + headerIcon
|
"class": "small-icon " + headerIcon
|
||||||
});
|
});
|
||||||
|
@ -1192,7 +1189,9 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$toolbar.find('.icon-trash').parent()
|
$toolbar.find('.icon-trash').parent()
|
||||||
.click(function() {
|
.click(function() {
|
||||||
|
|
||||||
if (AIRTIME.button.isDisabled('icon-trash', true) === true) {
|
var button = $("#show_builder").find(".icon-trash").parent();
|
||||||
|
|
||||||
|
if (button.hasClass(DISABLED_CLASS)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue