CC-3174 : showbuilder

prevents scheduling outside a show.
This commit is contained in:
Naomi Aro 2012-02-28 20:58:06 +01:00
parent 31abc21aaa
commit 4386690b54
2 changed files with 6 additions and 3 deletions

View File

@ -193,7 +193,7 @@ class Application_Model_ShowBuilder {
private function makeFooterRow($p_item) {
$row = $this->defaultRowArray;
$this->isAllowed($p_item, $row);
//$this->isAllowed($p_item, $row);
$row["footer"] = true;
$showEndDT = new DateTime($p_item["si_ends"], new DateTimeZone("UTC"));

View File

@ -287,6 +287,9 @@ $(document).ready(function() {
if (aData.allowed !== true) {
$(nRow).addClass("sb-not-allowed");
}
else {
$(nRow).addClass("sb-allowed");
}
//status used to colour tracks.
if (aData.status === 1) {
@ -538,8 +541,8 @@ $(document).ready(function() {
var prev = ui.item.prev();
//can't add items outside of shows.
if (prev.hasClass("sb-footer")) {
alert("Cannot add an item outside a show.");
if (!prev.hasClass("sb-allowed")) {
alert("Cannot schedule outside a show.");
ui.item.remove();
return;
}