From 70e538ebb4281fe5336faf69e9c58b36c1bb7e8b Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Tue, 29 Sep 2015 16:39:54 -0400 Subject: [PATCH] SAAS-1069 - disable add button when track metadata tab is open --- .../public/js/airtime/library/events/library_showbuilder.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js index 7aea7a7f7..f30323714 100644 --- a/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js +++ b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js @@ -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) {