1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-20 21:54:58 -04:00

added quality profile support to add series.

This commit is contained in:
kay.one
2013-01-26 19:04:15 -08:00
parent 1024e0f83d
commit f3e601d4ed
14 changed files with 132 additions and 15 deletions
@@ -1,6 +1,7 @@
/// <reference path="../app.js" />
/// <reference path="AddNewSeries/AddNewSeriesView.js" />
/// <reference path="RootDir/RootDirView.js" />
/// <reference path="../Quality/qualityProfileCollection.js" />
/// <reference path="../Shared/SpinnerView.js" />
NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({
@@ -21,6 +22,7 @@ NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({
rootFolderCollection: new NzbDrone.AddSeries.RootDirCollection(),
qualityProfileCollection: new NzbDrone.Quality.QualityProfileCollection(),
onRender: function () {
this.$('#myTab a').click(function (e) {
@@ -28,7 +30,9 @@ NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({
$(this).tab('show');
});
this.addNew.show(new NzbDrone.AddSeries.AddNewSeriesView({ rootFolders: this.rootFolderCollection }));
this.qualityProfileCollection.fetch();
this.addNew.show(new NzbDrone.AddSeries.AddNewSeriesView({ rootFolders: this.rootFolderCollection, qualityProfiles: this.qualityProfileCollection }));
//this.importExisting.show(new NzbDrone.ImportExistingView());
this.rootFolders.show(new NzbDrone.AddSeries.RootDirView({ collection: this.rootFolderCollection }));
@@ -36,7 +40,7 @@ NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({
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();