mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Calendar moved to layout
This commit is contained in:
parent
60e28140ab
commit
c04dc9d5e9
14 changed files with 211 additions and 149 deletions
37
UI/Calendar/CalendarLayout.js
Normal file
37
UI/Calendar/CalendarLayout.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
"use strict";
|
||||
define([
|
||||
'app',
|
||||
'Calendar/UpcomingCollectionView',
|
||||
'Calendar/CalendarView',
|
||||
'Shared/Toolbar/ToolbarLayout'
|
||||
],
|
||||
function () {
|
||||
NzbDrone.Calendar.CalendarLayout = Backbone.Marionette.Layout.extend({
|
||||
template: 'Calendar/CalendarLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
upcoming: '#x-upcoming',
|
||||
calendar: '#x-calendar'
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.upcomingCollection = new NzbDrone.Calendar.UpcomingCollection();
|
||||
this.upcomingCollection.fetch();
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this._showUpcoming();
|
||||
this._showCalendar();
|
||||
},
|
||||
|
||||
_showUpcoming: function () {
|
||||
this.upcoming.show(new NzbDrone.Calendar.UpcomingCollectionView({
|
||||
collection: this.upcomingCollection
|
||||
}));
|
||||
},
|
||||
|
||||
_showCalendar: function () {
|
||||
this.calendar.show(new NzbDrone.Calendar.CalendarView());
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue