You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Prowlarr/UI/AddSeries/AddSeriesLayout.js

46 lines
1.4 KiB

"use strict";
define([
12 years ago
'app',
'Quality/QualityProfileCollection',
'AddSeries/RootFolders/RootFolderCollection',
12 years ago
'AddSeries/RootFolders/RootFolderView',
'AddSeries/AddSeriesView',
12 years ago
'AddSeries/Existing/ImportSeriesView'
],
function (app, qualityProfileCollection, rootFolderCollection) {
NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({
template: 'AddSeries/addSeriesLayoutTemplate',
regions: {
workspace: '#add-series-workspace'
},
events: {
'click .x-import': '_importSeries'
},
initialize: function () {
this.rootFolderLayout = new NzbDrone.AddSeries.RootFolders.Layout();
this.rootFolderLayout.on('folderSelected', this._folderSelected, this);
},
_folderSelected: function (options) {
NzbDrone.modalRegion.closeModal();
this.workspace.show(new NzbDrone.AddSeries.Existing.ListView({model: options.model}));
},
onRender: function () {
qualityProfileCollection.fetch();
rootFolderCollection.fetch();
this.workspace.show(new NzbDrone.AddSeries.AddSeriesView());
},
_importSeries: function () {
NzbDrone.modalRegion.show(this.rootFolderLayout);
}
});
});