1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 00:12:30 +01:00
Sonarr/UI/Calendar/CalendarLayout.js

38 lines
1.1 KiB
JavaScript
Raw Normal View History

2013-06-22 08:24:24 +02:00
'use strict';
define(
[
'marionette',
'Calendar/UpcomingCollection',
'Calendar/UpcomingCollectionView',
'Calendar/CalendarView',
], function (Marionette, UpcomingCollection, UpcomingCollectionView, CalendarView) {
return Marionette.Layout.extend({
2013-06-07 07:33:01 +02:00
template: 'Calendar/CalendarLayoutTemplate',
regions: {
upcoming: '#x-upcoming',
calendar: '#x-calendar'
},
initialize: function () {
this.upcomingCollection = new UpcomingCollection();
2013-06-07 07:33:01 +02:00
this.upcomingCollection.fetch();
},
onShow: function () {
this._showUpcoming();
this._showCalendar();
},
_showUpcoming: function () {
this.upcoming.show(new UpcomingCollectionView({
2013-06-07 07:33:01 +02:00
collection: this.upcomingCollection
}));
},
_showCalendar: function () {
this.calendar.show(new CalendarView());
2013-06-07 07:33:01 +02:00
}
});
});