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:
Naomi Aro 2012-03-19 14:48:11 +01:00
parent 970c2fc47a
commit 8105c6571c
2 changed files with 8 additions and 2 deletions

View File

@ -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;

View File

@ -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");