From 5660b5086c5d24a307df6a0e881a116b0faa00e2 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 28 May 2013 08:06:36 -0700 Subject: [PATCH] Cleaned up a bit --- NzbDrone.Core/Indexers/IndexerService.cs | 2 +- UI/Settings/Indexers/CollectionView.js | 6 +++--- UI/Settings/Notifications/CollectionView.js | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NzbDrone.Core/Indexers/IndexerService.cs b/NzbDrone.Core/Indexers/IndexerService.cs index 7e3456026..8b1097ac0 100644 --- a/NzbDrone.Core/Indexers/IndexerService.cs +++ b/NzbDrone.Core/Indexers/IndexerService.cs @@ -66,7 +66,7 @@ public List Schema() indexers.Add(newznab); - return indexers.OrderBy(n => n.Name).ToList(); + return indexers; } private Indexer ToIndexer(IndexerDefinition definition) diff --git a/UI/Settings/Indexers/CollectionView.js b/UI/Settings/Indexers/CollectionView.js index 6524b9294..fca20bfd1 100644 --- a/UI/Settings/Indexers/CollectionView.js +++ b/UI/Settings/Indexers/CollectionView.js @@ -14,9 +14,9 @@ define(['app', openSchemaModal: function () { //TODO: Is there a better way to deal with changing URLs? - var schema = new NzbDrone.Settings.Indexers.Collection(); - schema.url = '/api/indexer/schema'; - schema.fetch({ + var schemaCollection = new NzbDrone.Settings.Indexers.Collection(); + schemaCollection.url = '/api/indexer/schema'; + schemaCollection.fetch({ success: function (collection) { collection.url = '/api/indexer'; var model = _.first(collection.models); diff --git a/UI/Settings/Notifications/CollectionView.js b/UI/Settings/Notifications/CollectionView.js index 4b2b67d0f..a3232f405 100644 --- a/UI/Settings/Notifications/CollectionView.js +++ b/UI/Settings/Notifications/CollectionView.js @@ -10,11 +10,11 @@ define(['app', 'Settings/Notifications/ItemView', 'Settings/Notifications/AddVie }, openSchemaModal: function () { - var schema = new NzbDrone.Settings.Notifications.Collection(); - schema.url = '/api/notification/schema'; - schema.fetch(); + var schemaCollection = new NzbDrone.Settings.Notifications.Collection(); + schemaCollection.url = '/api/notification/schema'; + schemaCollection.fetch(); - var view = new NzbDrone.Settings.Notifications.AddView({ collection: schema}); + var view = new NzbDrone.Settings.Notifications.AddView({ collection: schemaCollection}); NzbDrone.modalRegion.show(view); } });