CC-3944 : Now Playing -> Time Line view: Cannot cancel record show, cancel button is disabled
This commit is contained in:
parent
c2b2ea1d16
commit
bb3ffce071
2 changed files with 18 additions and 5 deletions
|
@ -332,6 +332,10 @@ class Application_Model_ShowBuilder
|
||||||
$this->getScheduledStatus($startsEpoch, $endsEpoch, $row);
|
$this->getScheduledStatus($startsEpoch, $endsEpoch, $row);
|
||||||
$this->isAllowed($p_item, $row);
|
$this->isAllowed($p_item, $row);
|
||||||
|
|
||||||
|
if (intval($p_item["si_record"]) === 1) {
|
||||||
|
$row["record"] = true;
|
||||||
|
}
|
||||||
|
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,16 +112,25 @@ var AIRTIME = (function(AIRTIME){
|
||||||
};
|
};
|
||||||
|
|
||||||
mod.checkCancelButton = function() {
|
mod.checkCancelButton = function() {
|
||||||
var $current = $sbTable.find(".sb-current-show.sb-allowed"),
|
|
||||||
|
var $current = $sbTable.find(".sb-current-show"),
|
||||||
//this user type should be refactored into a separate users module later
|
//this user type should be refactored into a separate users module later
|
||||||
//when there's more time and more JS will need to know user data.
|
//when there's more time and more JS will need to know user data.
|
||||||
userType = localStorage.getItem('user-type');
|
userType = localStorage.getItem('user-type'),
|
||||||
|
canCancel = false;
|
||||||
|
|
||||||
if ($current.length !== 0 && (userType === 'A' || userType === 'P')) {
|
if ($current.length !== 0 && $current.hasClass("sb-allowed")) {
|
||||||
AIRTIME.button.enableButton("icon-ban-circle", true);
|
canCancel = true;
|
||||||
|
}
|
||||||
|
else if ($current.length !== 0 && (userType === 'A' || userType === 'P')) {
|
||||||
|
canCancel = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canCancel === true) {
|
||||||
|
AIRTIME.button.enableButton("icon-ban-circle", true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
AIRTIME.button.disableButton("icon-ban-circle", true);
|
AIRTIME.button.disableButton("icon-ban-circle", true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue