CC-3174 : showbuilder
prevents scheduling outside a show.
This commit is contained in:
parent
31abc21aaa
commit
4386690b54
|
@ -193,7 +193,7 @@ class Application_Model_ShowBuilder {
|
||||||
private function makeFooterRow($p_item) {
|
private function makeFooterRow($p_item) {
|
||||||
|
|
||||||
$row = $this->defaultRowArray;
|
$row = $this->defaultRowArray;
|
||||||
$this->isAllowed($p_item, $row);
|
//$this->isAllowed($p_item, $row);
|
||||||
$row["footer"] = true;
|
$row["footer"] = true;
|
||||||
|
|
||||||
$showEndDT = new DateTime($p_item["si_ends"], new DateTimeZone("UTC"));
|
$showEndDT = new DateTime($p_item["si_ends"], new DateTimeZone("UTC"));
|
||||||
|
|
|
@ -287,6 +287,9 @@ $(document).ready(function() {
|
||||||
if (aData.allowed !== true) {
|
if (aData.allowed !== true) {
|
||||||
$(nRow).addClass("sb-not-allowed");
|
$(nRow).addClass("sb-not-allowed");
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$(nRow).addClass("sb-allowed");
|
||||||
|
}
|
||||||
|
|
||||||
//status used to colour tracks.
|
//status used to colour tracks.
|
||||||
if (aData.status === 1) {
|
if (aData.status === 1) {
|
||||||
|
@ -538,8 +541,8 @@ $(document).ready(function() {
|
||||||
var prev = ui.item.prev();
|
var prev = ui.item.prev();
|
||||||
|
|
||||||
//can't add items outside of shows.
|
//can't add items outside of shows.
|
||||||
if (prev.hasClass("sb-footer")) {
|
if (!prev.hasClass("sb-allowed")) {
|
||||||
alert("Cannot add an item outside a show.");
|
alert("Cannot schedule outside a show.");
|
||||||
ui.item.remove();
|
ui.item.remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue