CC-5410 : Now playing icon should not lag to show up on calendar
This commit is contained in:
parent
f91cb39e46
commit
73e5fa8a90
|
@ -1082,6 +1082,14 @@ SQL;
|
||||||
$event["rebroadcast"] = intval($show["rebroadcast"]);
|
$event["rebroadcast"] = intval($show["rebroadcast"]);
|
||||||
$event["soundcloud_id"] = is_null($show["soundcloud_id"])
|
$event["soundcloud_id"] = is_null($show["soundcloud_id"])
|
||||||
? -1 : $show["soundcloud_id"];
|
? -1 : $show["soundcloud_id"];
|
||||||
|
|
||||||
|
//for putting the now playing icon on the show.
|
||||||
|
if ($now > $startsDT && $now < $endsDT) {
|
||||||
|
$event["nowPlaying"] = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$event["nowPlaying"] = false;
|
||||||
|
}
|
||||||
|
|
||||||
//event colouring
|
//event colouring
|
||||||
if ($show["color"] != "") {
|
if ($show["color"] != "") {
|
||||||
|
|
|
@ -288,6 +288,21 @@ function eventRender(event, element, view) {
|
||||||
$(element).find(".fc-event-title").after('<span class="small-icon rebroadcast"></span>');
|
$(element).find(".fc-event-title").after('<span class="small-icon rebroadcast"></span>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//now playing icon.
|
||||||
|
var span = '<span class="small-icon now-playing"></span>';
|
||||||
|
|
||||||
|
if (event.nowPlaying === true) {
|
||||||
|
|
||||||
|
if (view_name === 'agendaDay' || view_name === 'agendaWeek') {
|
||||||
|
|
||||||
|
$(element).find(".fc-event-time").before(span);
|
||||||
|
}
|
||||||
|
else if (view_name === 'month') {
|
||||||
|
|
||||||
|
$(element).find(".fc-event-title").after(span);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function eventAfterRender( event, element, view ) {
|
function eventAfterRender( event, element, view ) {
|
||||||
|
|
Loading…
Reference in New Issue