diff --git a/airtime_mvc/application/models/ShowBuilder.php b/airtime_mvc/application/models/ShowBuilder.php index aab62d3f2..7b9f2cba6 100644 --- a/airtime_mvc/application/models/ShowBuilder.php +++ b/airtime_mvc/application/models/ShowBuilder.php @@ -250,6 +250,7 @@ class Application_Model_ShowBuilder { //show is empty or is a special kind of show (recording etc) else if (intval($p_item["si_record"]) === 1) { $row["record"] = true; + $row["instance"] = intval($p_item["si_id"]); } else { $row["empty"] = true; @@ -261,7 +262,7 @@ class Application_Model_ShowBuilder { $row["rebroadcast"] = true; } - if ($this->currentShow = true) { + if ($this->currentShow === true) { $row["currentShow"] = true; } @@ -297,7 +298,7 @@ class Application_Model_ShowBuilder { $row["refresh"] = floatval($showEndDT->format("U.u")) - $this->epoch_now; - if ($this->currentShow = true) { + if ($this->currentShow === true) { $row["currentShow"] = true; } diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index c2d6292b9..761e2662a 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -834,7 +834,8 @@ var AIRTIME = (function(AIRTIME){ $toolbar.find('.sb-button-cancel') .click(function() { var $tr, - data; + data, + msg = 'Cancel Current Show?'; if (AIRTIME.button.isDisabled('sb-button-cancel') === true) { return; @@ -845,7 +846,11 @@ var AIRTIME = (function(AIRTIME){ if ($tr.hasClass('sb-current-show')) { data = $tr.data("aData"); - if (confirm('Cancel Current Show?')) { + if (data.record === true) { + msg = 'Erase current show and stop recording?'; + } + + if (confirm(msg)) { var url = "/Schedule/cancel-current-show"; $.ajax({ url: url,