SAAS-1069 - disable add button when track metadata tab is open

This commit is contained in:
Duncan Sommerville 2015-09-29 16:39:54 -04:00
parent c08994a60b
commit 70e538ebb4
1 changed files with 4 additions and 1 deletions

View File

@ -18,6 +18,7 @@ var AIRTIME = (function(AIRTIME) {
check = true;
}
var sortable = $(".spl_sortable");
if ($("#show_builder_table").is(":visible")) {
if (shows.length === 0) {
check = false;
@ -28,13 +29,15 @@ var AIRTIME = (function(AIRTIME) {
} else if (current.length !== 0) {
btnText = $.i18n._('Add to current show');
}
} else {
} else if (sortable.length > 0 && sortable.is(":visible")) {
var objType = $('.active-tab .obj_type').val();
if (objType === 'block') {
btnText = $.i18n._('Add to current smart block');
} else {
btnText = $.i18n._('Add to current playlist');
}
} else {
check = false;
}
if (check) {