|
|
@ -2,10 +2,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
define(
|
|
|
|
define(
|
|
|
|
[
|
|
|
|
[
|
|
|
|
|
|
|
|
'app',
|
|
|
|
'marionette',
|
|
|
|
'marionette',
|
|
|
|
'Calendar/Collection',
|
|
|
|
'Calendar/Collection',
|
|
|
|
|
|
|
|
'Episode/Layout',
|
|
|
|
'fullcalendar'
|
|
|
|
'fullcalendar'
|
|
|
|
], function (Marionette, CalendarCollection) {
|
|
|
|
], function (App, Marionette, CalendarCollection, EpisodeLayout) {
|
|
|
|
|
|
|
|
|
|
|
|
var _instance;
|
|
|
|
var _instance;
|
|
|
|
|
|
|
|
|
|
|
@ -33,24 +35,10 @@ define(
|
|
|
|
eventRender : function (event, element) {
|
|
|
|
eventRender : function (event, element) {
|
|
|
|
$(element).addClass(event.statusLevel);
|
|
|
|
$(element).addClass(event.statusLevel);
|
|
|
|
$(element).children('.fc-event-inner').addClass(event.statusLevel);
|
|
|
|
$(element).children('.fc-event-inner').addClass(event.statusLevel);
|
|
|
|
|
|
|
|
|
|
|
|
element.popover({
|
|
|
|
|
|
|
|
title : '{seriesTitle} - {season}x{episode} - {episodeTitle}'.assign({
|
|
|
|
|
|
|
|
seriesTitle : event.title,
|
|
|
|
|
|
|
|
season : event.seasonNumber,
|
|
|
|
|
|
|
|
episode : event.episodeNumber.pad(2),
|
|
|
|
|
|
|
|
episodeTitle: event.episodeTitle
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
content : event.overview,
|
|
|
|
|
|
|
|
placement: 'bottom',
|
|
|
|
|
|
|
|
trigger : 'manual'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
eventMouseover: function () {
|
|
|
|
|
|
|
|
$(this).popover('show');
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
eventMouseout : function () {
|
|
|
|
eventClick : function (event) {
|
|
|
|
$(this).popover('hide');
|
|
|
|
var view = new EpisodeLayout({ model: event.model });
|
|
|
|
|
|
|
|
App.modalRegion.show(view);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -73,10 +61,14 @@ define(
|
|
|
|
var seriesTitle = element.get('series').get('title');
|
|
|
|
var seriesTitle = element.get('series').get('title');
|
|
|
|
var start = element.get('airDate');
|
|
|
|
var start = element.get('airDate');
|
|
|
|
|
|
|
|
|
|
|
|
element.set('title', seriesTitle);
|
|
|
|
element.set({
|
|
|
|
element.set('episodeTitle', episodeTitle);
|
|
|
|
'title': seriesTitle,
|
|
|
|
element.set('start', start);
|
|
|
|
episodeTitle: episodeTitle,
|
|
|
|
element.set('allDay', false);
|
|
|
|
start: start,
|
|
|
|
|
|
|
|
allDay: false
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
element.set('model', element);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
callback(calendarCollection.toJSON());
|
|
|
|
callback(calendarCollection.toJSON());
|
|
|
|