CC-3174 : showbuilder
using the new status column in cc_schedule to colour boundary/overbooked tracks.
This commit is contained in:
parent
0f9800a6bd
commit
3bfbe036c7
|
@ -237,6 +237,7 @@ class Application_Model_Schedule {
|
||||||
sched.starts AS sched_starts, sched.ends AS sched_ends, sched.id AS sched_id,
|
sched.starts AS sched_starts, sched.ends AS sched_ends, sched.id AS sched_id,
|
||||||
sched.cue_in AS cue_in, sched.cue_out AS cue_out,
|
sched.cue_in AS cue_in, sched.cue_out AS cue_out,
|
||||||
sched.fade_in AS fade_in, sched.fade_out AS fade_out,
|
sched.fade_in AS fade_in, sched.fade_out AS fade_out,
|
||||||
|
sched.status AS sched_status,
|
||||||
|
|
||||||
ft.track_title AS file_track_title, ft.artist_name AS file_artist_name,
|
ft.track_title AS file_track_title, ft.artist_name AS file_artist_name,
|
||||||
ft.album_title AS file_album_title, ft.length AS file_length
|
ft.album_title AS file_album_title, ft.length AS file_length
|
||||||
|
|
|
@ -86,27 +86,10 @@ class Application_Model_ShowBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//information about whether a track is inside|boundary|outside a show.
|
||||||
private function getItemStatus($p_item, &$row) {
|
private function getItemStatus($p_item, &$row) {
|
||||||
|
|
||||||
$showEndDT = new DateTime($p_item["si_ends"]);
|
$row["status"] = intval($p_item["sched_status"]);
|
||||||
$schedStartDT = new DateTime($p_item["sched_starts"]);
|
|
||||||
$schedEndDT = new DateTime($p_item["sched_ends"]);
|
|
||||||
|
|
||||||
$showEndEpoch = intval($showEndDT->format("U"));
|
|
||||||
$schedStartEpoch = intval($schedStartDT->format("U"));
|
|
||||||
$schedEndEpoch = intval($schedEndDT->format("U"));
|
|
||||||
|
|
||||||
if ($schedEndEpoch < $showEndEpoch) {
|
|
||||||
$status = 0; //item will playout in full
|
|
||||||
}
|
|
||||||
else if ($schedStartEpoch < $showEndEpoch && $schedEndEpoch > $showEndEpoch) {
|
|
||||||
$status = 1; //item is on boundry
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$status = 2; //item is overscheduled won't play.
|
|
||||||
}
|
|
||||||
|
|
||||||
$row["status"] = $status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getRowTimestamp($p_item, &$row) {
|
private function getRowTimestamp($p_item, &$row) {
|
||||||
|
|
|
@ -191,10 +191,10 @@ var AIRTIME = (function(AIRTIME){
|
||||||
}
|
}
|
||||||
|
|
||||||
//status used to colour tracks.
|
//status used to colour tracks.
|
||||||
if (aData.status === 1) {
|
if (aData.status === 2) {
|
||||||
$(nRow).addClass("sb-boundry");
|
$(nRow).addClass("sb-boundry");
|
||||||
}
|
}
|
||||||
else if (aData.status === 2) {
|
else if (aData.status === 0) {
|
||||||
$(nRow).addClass("sb-over");
|
$(nRow).addClass("sb-over");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue