1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 20:42:37 +01:00
Radarr/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
}
});
});