|
|
@ -55,23 +55,23 @@ define(
|
|
|
|
_instance.collection.fetch({
|
|
|
|
_instance.collection.fetch({
|
|
|
|
data : { start: startDate, end: endDate },
|
|
|
|
data : { start: startDate, end: endDate },
|
|
|
|
success: function (calendarCollection) {
|
|
|
|
success: function (calendarCollection) {
|
|
|
|
_.each(calendarCollection.models, function (element) {
|
|
|
|
calendarCollection.each(function (element) {
|
|
|
|
var episodeTitle = element.get('title');
|
|
|
|
var episodeTitle = element.get('title');
|
|
|
|
var seriesTitle = element.get('series').title;
|
|
|
|
var seriesTitle = element.get('series').title;
|
|
|
|
var start = element.get('airDateUtc');
|
|
|
|
var start = element.get('airDateUtc');
|
|
|
|
var statusLevel = _instance.getStatusLevel(element);
|
|
|
|
|
|
|
|
var runtime = element.get('series').runtime;
|
|
|
|
var runtime = element.get('series').runtime;
|
|
|
|
var end = Moment(start).add('minutes', runtime);
|
|
|
|
var end = Moment(start).add('minutes', runtime).toISOString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
element.set({
|
|
|
|
element.set({
|
|
|
|
title : seriesTitle,
|
|
|
|
title : seriesTitle,
|
|
|
|
episodeTitle: episodeTitle,
|
|
|
|
episodeTitle: episodeTitle,
|
|
|
|
start : start,
|
|
|
|
start : start,
|
|
|
|
end : end,
|
|
|
|
end : end,
|
|
|
|
allDay : false,
|
|
|
|
allDay : false
|
|
|
|
statusLevel : statusLevel
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
element.set('statusLevel', _instance.getStatusLevel(element));
|
|
|
|
element.set('model', element);
|
|
|
|
element.set('model', element);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -93,6 +93,10 @@ define(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
else if (currentTime.isAfter(start) && currentTime.isBefore(end)) {
|
|
|
|
else if (currentTime.isAfter(start) && currentTime.isBefore(end)) {
|
|
|
|
|
|
|
|
var s = start.toISOString();
|
|
|
|
|
|
|
|
var e = end.toISOString();
|
|
|
|
|
|
|
|
var c = currentTime.toISOString();
|
|
|
|
|
|
|
|
|
|
|
|
statusLevel = 'warning';
|
|
|
|
statusLevel = 'warning';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|