1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-18 23:48:35 +02:00
Sonarr/src/UI/Controller.js
2013-12-09 08:12:12 -08:00

87 lines
2.5 KiB
JavaScript

'use strict';
define(
[
'Shared/NzbDroneController',
'AppLayout',
'marionette',
'History/HistoryLayout',
'Settings/SettingsLayout',
'AddSeries/AddSeriesLayout',
'Missing/MissingLayout',
'Calendar/CalendarLayout',
'Release/ReleaseLayout',
'System/SystemLayout',
'SeasonPass/SeasonPassLayout',
'System/Update/UpdateLayout',
'Series/Editor/SeriesEditorLayout'
], function (NzbDroneController,
AppLayout,
Marionette,
HistoryLayout,
SettingsLayout,
AddSeriesLayout,
MissingLayout,
CalendarLayout,
ReleaseLayout,
SystemLayout,
SeasonPassLayout,
UpdateLayout,
SeriesEditorLayout) {
return NzbDroneController.extend({
addSeries: function (action) {
this.setTitle('Add Series');
this.showMainRegion(new AddSeriesLayout({action: action}));
},
calendar: function () {
this.setTitle('Calendar');
this.showMainRegion(new CalendarLayout());
},
settings: function (action) {
this.setTitle('Settings');
this.showMainRegion(new SettingsLayout({ action: action }));
},
missing: function () {
this.setTitle('Missing');
this.showMainRegion(new MissingLayout());
},
history: function (action) {
this.setTitle('History');
this.showMainRegion(new HistoryLayout({ action: action }));
},
rss: function () {
this.setTitle('RSS');
this.showMainRegion(new ReleaseLayout());
},
system: function (action) {
this.setTitle('System');
this.showMainRegion(new SystemLayout({ action: action }));
},
seasonPass: function () {
this.setTitle('Season Pass');
this.showMainRegion(new SeasonPassLayout());
},
update: function () {
this.setTitle('Updates');
this.showMainRegion(new UpdateLayout());
},
seriesEditor: function () {
this.setTitle('Series Editor');
this.showMainRegion(new SeriesEditorLayout());
}
});
});