CC-3355 : Timeline/Library: Select all in the library, drag to empty show --> nothing is added
if something is added after a footer, it will be added to the end of whatever is before the footer.
This commit is contained in:
parent
970c2fc47a
commit
8105c6571c
|
@ -196,6 +196,8 @@ class Application_Model_ShowBuilder {
|
|||
|
||||
$row = $this->defaultRowArray;
|
||||
$row["footer"] = true;
|
||||
$row["instance"] = intval($p_item["si_id"]);
|
||||
$this->getRowTimestamp($p_item, $row);
|
||||
|
||||
$showEndDT = new DateTime($p_item["si_ends"], new DateTimeZone("UTC"));
|
||||
$contentDT = $this->contentDT;
|
||||
|
|
|
@ -515,14 +515,18 @@ var AIRTIME = (function(AIRTIME){
|
|||
var prev = ui.item.prev();
|
||||
|
||||
//can't add items outside of shows.
|
||||
if (prev.hasClass("sb-footer")
|
||||
|| prev.find("td:first").hasClass("dataTables_empty")
|
||||
if (prev.find("td:first").hasClass("dataTables_empty")
|
||||
|| prev.length === 0) {
|
||||
alert("Cannot schedule outside a show.");
|
||||
ui.item.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
//if item is added after a footer, add the item after the last item in the show.
|
||||
if (prev.hasClass("sb-footer")) {
|
||||
prev = prev.prev();
|
||||
}
|
||||
|
||||
aItemData = [];
|
||||
oPrevData = prev.data("aData");
|
||||
|
||||
|
|
Loading…
Reference in New Issue