code to support import existing series.

This commit is contained in:
Keivan Beigi
2013-01-28 17:59:18 -08:00
committed by kay.one
parent fa224cc59c
commit 13aa79d5f9
15 changed files with 175 additions and 109 deletions

View File

@@ -3,6 +3,7 @@
/// <reference path="RootDir/RootDirView.js" />
/// <reference path="../Quality/qualityProfileCollection.js" />
/// <reference path="../Shared/SpinnerView.js" />
/// <reference path="ImportExistingSeries/ImportSeriesView.js" />
NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({
template: "AddSeries/addSeriesLayoutTemplate",
@@ -33,14 +34,14 @@ NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({
this.qualityProfileCollection.fetch();
this.addNew.show(new NzbDrone.AddSeries.AddNewSeriesView({ rootFolders: this.rootFolderCollection, qualityProfiles: this.qualityProfileCollection }));
//this.importExisting.show(new NzbDrone.ImportExistingView());
this.importExisting.show(new NzbDrone.AddSeries.ExistingFolderListView({ collection: this.rootFolderCollection }));
this.rootFolders.show(new NzbDrone.AddSeries.RootDirView({ collection: this.rootFolderCollection }));
NzbDrone.vent.listenTo(this.rootFolderCollection, 'add', this.evaluateActions, this);
NzbDrone.vent.listenTo(this.rootFolderCollection, 'remove', this.evaluateActions, this);
NzbDrone.vent.listenTo(this.rootFolderCollection, 'reset', this.evaluateActions, this);
},
evaluateActions: function () {
if (this.rootFolderCollection.length == 0) {
this.ui.addNewTab.hide();