mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
More Calendar!
This commit is contained in:
parent
334d4d1e9b
commit
ed3a503342
21 changed files with 72 additions and 54 deletions
|
@ -3,33 +3,34 @@
|
|||
define(['app', 'Calendar/CalendarItemView'], function (app) {
|
||||
NzbDrone.Calendar.CalendarCollectionView = Backbone.Marionette.CompositeView.extend({
|
||||
itemView: NzbDrone.Calendar.CalendarItemView,
|
||||
itemViewContainer: '#fakeContainer',
|
||||
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);
|
||||
initialize: function (context, collection) {
|
||||
this.collection = collection;
|
||||
},
|
||||
render: function() {
|
||||
this.ui.calendar.fullCalendar({
|
||||
onRender: function() {
|
||||
$(this.ui.calendar).fullCalendar({
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'month,basicWeek,basicDay',
|
||||
right: 'month,basicWeek',
|
||||
ignoreTimezone: false
|
||||
},
|
||||
selectable: true,
|
||||
selectHelper: true,
|
||||
editable: true
|
||||
buttonText: {
|
||||
prev: '<i class="icon-arrow-left"></i>',
|
||||
next: '<i class="icon-arrow-right"></i>'
|
||||
}
|
||||
});
|
||||
|
||||
$(this.ui.calendar).fullCalendar('addEventSource', this.collection.toJSON());
|
||||
},
|
||||
addAll: function(){
|
||||
this.el.fullCalendar('addEventSource', this.collection.toJSON());
|
||||
$(this.ui.calendar).fullCalendar('addEventSource', this.collection.toJSON());
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue