1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-27 10:07:10 +00:00
Lidarr/NzbDrone.Backbone/Calendar/CalendarCollectionView.js
Mark McDowall 6296e425d3 Added toastr, fullcalendar, start of API for Calendar.
Sending headers for DownloadString and DownloadFile in addition to DownloadStream.
2013-02-23 15:08:44 -08:00

35 lines
No EOL
1.1 KiB
JavaScript

'use strict';
define(['app', 'Calendar/CalendarItemView'], function (app) {
NzbDrone.Calendar.CalendarCollectionView = Backbone.Marionette.CompositeView.extend({
itemView: NzbDrone.Calendar.CalendarItemView,
template: 'Calendar/CalendarCollectionTemplate',
itemViewContainer: 'table',
ui: {
calendar: '#calendar'
},
initialize: function () {
this.collection = new NzbDrone.Calendar.CalendarCollection();
this.collection.fetch();
this.collection.bind('reset', this.addAll);
},
render: function() {
this.ui.calendar.fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay',
ignoreTimezone: false
},
selectable: true,
selectHelper: true,
editable: true
});
},
addAll: function(){
this.el.fullCalendar('addEventSource', this.collection.toJSON());
}
});
});