CC-3753 : Cannot cancel record show on Timeline view

This commit is contained in:
Naomi Aro 2012-05-07 14:28:21 +02:00
parent 7f18f3b329
commit a4b949cc2f
2 changed files with 10 additions and 4 deletions

View File

@ -250,6 +250,7 @@ class Application_Model_ShowBuilder {
//show is empty or is a special kind of show (recording etc) //show is empty or is a special kind of show (recording etc)
else if (intval($p_item["si_record"]) === 1) { else if (intval($p_item["si_record"]) === 1) {
$row["record"] = true; $row["record"] = true;
$row["instance"] = intval($p_item["si_id"]);
} }
else { else {
$row["empty"] = true; $row["empty"] = true;
@ -261,7 +262,7 @@ class Application_Model_ShowBuilder {
$row["rebroadcast"] = true; $row["rebroadcast"] = true;
} }
if ($this->currentShow = true) { if ($this->currentShow === true) {
$row["currentShow"] = true; $row["currentShow"] = true;
} }
@ -297,7 +298,7 @@ class Application_Model_ShowBuilder {
$row["refresh"] = floatval($showEndDT->format("U.u")) - $this->epoch_now; $row["refresh"] = floatval($showEndDT->format("U.u")) - $this->epoch_now;
if ($this->currentShow = true) { if ($this->currentShow === true) {
$row["currentShow"] = true; $row["currentShow"] = true;
} }

View File

@ -834,7 +834,8 @@ var AIRTIME = (function(AIRTIME){
$toolbar.find('.sb-button-cancel') $toolbar.find('.sb-button-cancel')
.click(function() { .click(function() {
var $tr, var $tr,
data; data,
msg = 'Cancel Current Show?';
if (AIRTIME.button.isDisabled('sb-button-cancel') === true) { if (AIRTIME.button.isDisabled('sb-button-cancel') === true) {
return; return;
@ -845,7 +846,11 @@ var AIRTIME = (function(AIRTIME){
if ($tr.hasClass('sb-current-show')) { if ($tr.hasClass('sb-current-show')) {
data = $tr.data("aData"); 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"; var url = "/Schedule/cancel-current-show";
$.ajax({ $.ajax({
url: url, url: url,