You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/NzbDrone.Backbone/Calendar/CalendarCollectionView.js

36 lines
1.2 KiB

'use strict';
define(['app', 'Calendar/CalendarItemView'], function (app) {
NzbDrone.Calendar.CalendarCollectionView = Backbone.Marionette.CompositeView.extend({
itemView: NzbDrone.Calendar.CalendarItemView,
12 years ago
itemViewContainer: '#fakeContainer',
template: 'Calendar/CalendarCollectionTemplate',
ui: {
calendar: '#calendar'
},
12 years ago
initialize: function (context, collection) {
this.collection = collection;
},
12 years ago
onRender: function() {
$(this.ui.calendar).fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
12 years ago
right: 'month,basicWeek',
ignoreTimezone: false
},
12 years ago
buttonText: {
prev: '<i class="icon-arrow-left"></i>',
next: '<i class="icon-arrow-right"></i>'
}
});
12 years ago
$(this.ui.calendar).fullCalendar('addEventSource', this.collection.toJSON());
},
addAll: function(){
12 years ago
$(this.ui.calendar).fullCalendar('addEventSource', this.collection.toJSON());
}
});
});