mirror of
https://github.com/Lidarr/Lidarr
synced 2025-12-23 16:55:47 +01:00
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
'use strict';
|
|
define(
|
|
[
|
|
'AppLayout',
|
|
'marionette',
|
|
'Calendar/UpcomingCollectionView',
|
|
'Calendar/CalendarView',
|
|
'Calendar/CalendarFeedView'
|
|
], function (AppLayout, Marionette, UpcomingCollectionView, CalendarView, CalendarFeedView) {
|
|
return Marionette.Layout.extend({
|
|
template: 'Calendar/CalendarLayoutTemplate',
|
|
|
|
regions: {
|
|
upcoming: '#x-upcoming',
|
|
calendar: '#x-calendar'
|
|
},
|
|
|
|
events: {
|
|
'click .x-ical': '_showiCal'
|
|
},
|
|
|
|
onShow: function () {
|
|
this._showUpcoming();
|
|
this._showCalendar();
|
|
},
|
|
|
|
_showUpcoming: function () {
|
|
this.upcoming.show(new UpcomingCollectionView());
|
|
},
|
|
|
|
_showCalendar: function () {
|
|
this.calendar.show(new CalendarView());
|
|
},
|
|
|
|
_showiCal: function () {
|
|
var view = new CalendarFeedView();
|
|
AppLayout.modalRegion.show(view);
|
|
}
|
|
});
|
|
});
|