CC-3407 : Timeline: Display if tracks are missing on disk
This commit is contained in:
parent
451b573c52
commit
296a5c583a
|
@ -369,7 +369,7 @@ class Application_Model_Schedule {
|
|||
sched.playout_status AS playout_status,
|
||||
|
||||
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, ft.file_exists AS file_exists
|
||||
|
||||
FROM
|
||||
((cc_schedule AS sched JOIN cc_files AS ft ON (sched.file_id = ft.id)
|
||||
|
|
|
@ -36,6 +36,7 @@ class Application_Model_ShowBuilder {
|
|||
"cueout" => "",
|
||||
"fadein" => "",
|
||||
"fadeout" => "",
|
||||
"image" => false,
|
||||
"color" => "", //in hex without the '#' sign.
|
||||
"backgroundColor"=> "", //in hex without the '#' sign.
|
||||
);
|
||||
|
@ -192,7 +193,7 @@ class Application_Model_ShowBuilder {
|
|||
$this->getScheduledStatus($startsEpoch, min($endsEpoch, $showEndEpoch), $row);
|
||||
|
||||
$row["id"] = intval($p_item["sched_id"]);
|
||||
$row["image"] = '<img src="/css/images/icon_audioclip.png">';
|
||||
$row["image"] = $p_item["file_exists"] ? true : false;
|
||||
$row["instance"] = intval($p_item["si_id"]);
|
||||
$row["starts"] = $schedStartDT->format("H:i:s");
|
||||
$row["ends"] = $schedEndDT->format("H:i:s");
|
||||
|
@ -214,14 +215,11 @@ class Application_Model_ShowBuilder {
|
|||
//show is empty or is a special kind of show (recording etc)
|
||||
else if (intval($p_item["si_record"]) === 1) {
|
||||
$row["record"] = true;
|
||||
$row["image"] = '';
|
||||
}
|
||||
else {
|
||||
|
||||
$row["empty"] = true;
|
||||
$row["id"] = 0 ;
|
||||
$row["instance"] = intval($p_item["si_id"]);
|
||||
$row["image"] = '';
|
||||
}
|
||||
|
||||
$this->getItemColor($p_item, $row);
|
||||
|
@ -246,7 +244,6 @@ class Application_Model_ShowBuilder {
|
|||
|
||||
$timeFilled = new TimeFilledFormatter($runtime);
|
||||
$row["fRuntime"] = $timeFilled->format();
|
||||
$row["image"] = '';
|
||||
|
||||
$showStartDT = new DateTime($p_item["si_starts"], new DateTimeZone("UTC"));
|
||||
$showStartDT->setTimezone(new DateTimeZone($this->timezone));
|
||||
|
|
|
@ -218,7 +218,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
cl="",
|
||||
//background-color to imitate calendar color.
|
||||
r,g,b,a,
|
||||
$nRow = $(nRow);
|
||||
$nRow = $(nRow),
|
||||
$image;
|
||||
|
||||
fnPrepareSeparatorRow = function(sRowContent, sClass, iNodeIndex) {
|
||||
|
||||
|
@ -292,6 +293,20 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
else {
|
||||
|
||||
//add the play function if the file exists on disk.
|
||||
$image = $(nRow).find('td.sb-image');
|
||||
//check if the file exists.
|
||||
if (aData.image === true) {
|
||||
$image.html('<img src="/css/images/icon_audioclip.png"></img>')
|
||||
.click(function() {
|
||||
open_show_preview(aData.instance, iDisplayIndex);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
else {
|
||||
$image.html('<span class="ui-icon ui-icon-alert"></span>');
|
||||
}
|
||||
|
||||
node = nRow.children[0];
|
||||
if (aData.allowed === true && aData.scheduled >= 1) {
|
||||
node.innerHTML = '<input type="checkbox" name="'+aData.id+'"></input>';
|
||||
|
@ -349,13 +364,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
else if (aData.status === 0) {
|
||||
$(nRow).addClass("sb-over");
|
||||
}
|
||||
|
||||
//add the play function
|
||||
$(nRow).find('td.sb-image').click(function(){
|
||||
open_show_preview(aData.instance, iDisplayIndex);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
//call the context menu so we can prevent the event from propagating.
|
||||
$(nRow).find('td:gt(1)').click(function(e){
|
||||
|
||||
|
|
Loading…
Reference in New Issue