From c4fa61023f8caa1c97c73060282cee4850ffa27c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 8 Mar 2013 17:55:47 -0800 Subject: [PATCH] Split Profile and Size into their own folders --- .../QualityProfileCollectionTemplate.html | 0 .../Profile/QualityProfileCollectionView.js | 21 ++++++++++++++++++ .../{ => Profile}/QualityProfileTemplate.html | 0 .../{ => Profile}/QualityProfileView.js | 4 ++-- .../Settings/Quality/QualityLayout.js | 8 +++---- .../Quality/QualityProfileCollectionView.js | 21 ------------------ .../Quality/QualitySizeCollectionView.js | 22 ------------------- .../QualitySizeCollectionTemplate.html | 0 .../Quality/Size/QualitySizeCollectionView.js | 22 +++++++++++++++++++ .../{ => Size}/QualitySizeTemplate.html | 0 .../Quality/{ => Size}/QualitySizeView.js | 4 ++-- NzbDrone.Backbone/app.js | 2 ++ 12 files changed, 53 insertions(+), 51 deletions(-) rename NzbDrone.Backbone/Settings/Quality/{ => Profile}/QualityProfileCollectionTemplate.html (100%) create mode 100644 NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileCollectionView.js rename NzbDrone.Backbone/Settings/Quality/{ => Profile}/QualityProfileTemplate.html (100%) rename NzbDrone.Backbone/Settings/Quality/{ => Profile}/QualityProfileView.js (85%) delete mode 100644 NzbDrone.Backbone/Settings/Quality/QualityProfileCollectionView.js delete mode 100644 NzbDrone.Backbone/Settings/Quality/QualitySizeCollectionView.js rename NzbDrone.Backbone/Settings/Quality/{ => Size}/QualitySizeCollectionTemplate.html (100%) create mode 100644 NzbDrone.Backbone/Settings/Quality/Size/QualitySizeCollectionView.js rename NzbDrone.Backbone/Settings/Quality/{ => Size}/QualitySizeTemplate.html (100%) rename NzbDrone.Backbone/Settings/Quality/{ => Size}/QualitySizeView.js (88%) diff --git a/NzbDrone.Backbone/Settings/Quality/QualityProfileCollectionTemplate.html b/NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileCollectionTemplate.html similarity index 100% rename from NzbDrone.Backbone/Settings/Quality/QualityProfileCollectionTemplate.html rename to NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileCollectionTemplate.html diff --git a/NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileCollectionView.js b/NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileCollectionView.js new file mode 100644 index 000000000..fe9788a44 --- /dev/null +++ b/NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileCollectionView.js @@ -0,0 +1,21 @@ +'use strict'; + +define(['app', 'Settings/Quality/Profile/QualityProfileView'], function (app) { + NzbDrone.Settings.Quality.Profile.QualityProfileCollectionView = Backbone.Marionette.CompositeView.extend({ + itemView: NzbDrone.Settings.Quality.Profile.QualityProfileView, + itemViewContainer: 'tbody', + template: 'Settings/Quality/Profile/QualityProfileCollectionTemplate', + + initialize: function (options) { + }, + + ui:{ + + }, + + onCompositeCollectionRendered: function() + { + + } + }); +}); \ No newline at end of file diff --git a/NzbDrone.Backbone/Settings/Quality/QualityProfileTemplate.html b/NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileTemplate.html similarity index 100% rename from NzbDrone.Backbone/Settings/Quality/QualityProfileTemplate.html rename to NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileTemplate.html diff --git a/NzbDrone.Backbone/Settings/Quality/QualityProfileView.js b/NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileView.js similarity index 85% rename from NzbDrone.Backbone/Settings/Quality/QualityProfileView.js rename to NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileView.js index 108e023b5..8d72a8910 100644 --- a/NzbDrone.Backbone/Settings/Quality/QualityProfileView.js +++ b/NzbDrone.Backbone/Settings/Quality/Profile/QualityProfileView.js @@ -6,8 +6,8 @@ define([ ], function () { - NzbDrone.Settings.Quality.QualityProfileView = Backbone.Marionette.ItemView.extend({ - template: 'Settings/Quality/QualityProfileTemplate', + NzbDrone.Settings.Quality.Profile.QualityProfileView = Backbone.Marionette.ItemView.extend({ + template: 'Settings/Quality/Profile/QualityProfileTemplate', tagName: 'tr', ui: { diff --git a/NzbDrone.Backbone/Settings/Quality/QualityLayout.js b/NzbDrone.Backbone/Settings/Quality/QualityLayout.js index c8dc7c5db..a9da207fb 100644 --- a/NzbDrone.Backbone/Settings/Quality/QualityLayout.js +++ b/NzbDrone.Backbone/Settings/Quality/QualityLayout.js @@ -3,8 +3,8 @@ 'Quality/QualityProfileCollection', 'Quality/QualitySizeCollection', 'Settings/Quality/QualityView', - 'Settings/Quality/QualityProfileCollectionView', - 'Settings/Quality/QualitySizeCollectionView' + 'Settings/Quality/Profile/QualityProfileCollectionView', + 'Settings/Quality/Size/QualitySizeCollectionView' ], function (app, qualityProfileCollection) { NzbDrone.Settings.Quality.QualityLayout = Backbone.Marionette.Layout.extend({ @@ -33,8 +33,8 @@ onRender: function () { this.qualityStandard.show(new NzbDrone.Settings.Quality.QualityView({model: this.settings, qualityProfiles: qualityProfileCollection})); - this.qualityProfile.show(new NzbDrone.Settings.Quality.QualityProfileCollectionView({collection: qualityProfileCollection})); - this.qualitySize.show(new NzbDrone.Settings.Quality.QualitySizeCollectionView({collection: this.qualitySizeCollection})); + this.qualityProfile.show(new NzbDrone.Settings.Quality.Profile.QualityProfileCollectionView({collection: qualityProfileCollection})); + this.qualitySize.show(new NzbDrone.Settings.Quality.Size.QualitySizeCollectionView({collection: this.qualitySizeCollection})); } }); }); diff --git a/NzbDrone.Backbone/Settings/Quality/QualityProfileCollectionView.js b/NzbDrone.Backbone/Settings/Quality/QualityProfileCollectionView.js deleted file mode 100644 index f98b3f926..000000000 --- a/NzbDrone.Backbone/Settings/Quality/QualityProfileCollectionView.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -define(['app', 'Settings/Quality/QualityProfileView'], function (app) { - NzbDrone.Settings.Quality.QualityProfileCollectionView = Backbone.Marionette.CompositeView.extend({ - itemView: NzbDrone.Settings.Quality.QualityProfileView, - itemViewContainer: 'tbody', - template: 'Settings/Quality/QualityProfileCollectionTemplate', - - initialize: function (options) { - }, - - ui:{ - - }, - - onCompositeCollectionRendered: function() - { - - } - }); -}); \ No newline at end of file diff --git a/NzbDrone.Backbone/Settings/Quality/QualitySizeCollectionView.js b/NzbDrone.Backbone/Settings/Quality/QualitySizeCollectionView.js deleted file mode 100644 index 8c7491f88..000000000 --- a/NzbDrone.Backbone/Settings/Quality/QualitySizeCollectionView.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -define(['app', 'Settings/Quality/QualitySizeView'], function (app) { - NzbDrone.Settings.Quality.QualitySizeCollectionView = Backbone.Marionette.CompositeView.extend({ - itemView: NzbDrone.Settings.Quality.QualitySizeView, - itemViewContainer: '#quality-sizes-container', - template: 'Settings/Quality/QualitySizeCollectionTemplate', - - initialize: function () { - var test = 1; - }, - - ui:{ - - }, - - onCompositeCollectionRendered: function() - { - - } - }); -}); \ No newline at end of file diff --git a/NzbDrone.Backbone/Settings/Quality/QualitySizeCollectionTemplate.html b/NzbDrone.Backbone/Settings/Quality/Size/QualitySizeCollectionTemplate.html similarity index 100% rename from NzbDrone.Backbone/Settings/Quality/QualitySizeCollectionTemplate.html rename to NzbDrone.Backbone/Settings/Quality/Size/QualitySizeCollectionTemplate.html diff --git a/NzbDrone.Backbone/Settings/Quality/Size/QualitySizeCollectionView.js b/NzbDrone.Backbone/Settings/Quality/Size/QualitySizeCollectionView.js new file mode 100644 index 000000000..e9206fb76 --- /dev/null +++ b/NzbDrone.Backbone/Settings/Quality/Size/QualitySizeCollectionView.js @@ -0,0 +1,22 @@ +'use strict'; + +define(['app', 'Settings/Quality/Size/QualitySizeView'], function (app) { + NzbDrone.Settings.Quality.Size.QualitySizeCollectionView = Backbone.Marionette.CompositeView.extend({ + itemView: NzbDrone.Settings.Quality.Size.QualitySizeView, + itemViewContainer: '#quality-sizes-container', + template: 'Settings/Quality/Size/QualitySizeCollectionTemplate', + + initialize: function () { + var test = 1; + }, + + ui:{ + + }, + + onCompositeCollectionRendered: function() + { + + } + }); +}); \ No newline at end of file diff --git a/NzbDrone.Backbone/Settings/Quality/QualitySizeTemplate.html b/NzbDrone.Backbone/Settings/Quality/Size/QualitySizeTemplate.html similarity index 100% rename from NzbDrone.Backbone/Settings/Quality/QualitySizeTemplate.html rename to NzbDrone.Backbone/Settings/Quality/Size/QualitySizeTemplate.html diff --git a/NzbDrone.Backbone/Settings/Quality/QualitySizeView.js b/NzbDrone.Backbone/Settings/Quality/Size/QualitySizeView.js similarity index 88% rename from NzbDrone.Backbone/Settings/Quality/QualitySizeView.js rename to NzbDrone.Backbone/Settings/Quality/Size/QualitySizeView.js index 7639b74a6..ecbb13eaf 100644 --- a/NzbDrone.Backbone/Settings/Quality/QualitySizeView.js +++ b/NzbDrone.Backbone/Settings/Quality/Size/QualitySizeView.js @@ -6,8 +6,8 @@ define([ ], function () { - NzbDrone.Settings.Quality.QualitySizeView = Backbone.Marionette.ItemView.extend({ - template: 'Settings/Quality/QualitySizeTemplate', + NzbDrone.Settings.Quality.Size.QualitySizeView = Backbone.Marionette.ItemView.extend({ + template: 'Settings/Quality/Size/QualitySizeTemplate', className: 'quality-size-item', ui: { diff --git a/NzbDrone.Backbone/app.js b/NzbDrone.Backbone/app.js index c33eb31f3..c21c2465a 100644 --- a/NzbDrone.Backbone/app.js +++ b/NzbDrone.Backbone/app.js @@ -45,6 +45,8 @@ define('app', function () { window.NzbDrone.Settings = {}; window.NzbDrone.Settings.Naming = {}; window.NzbDrone.Settings.Quality = {}; + window.NzbDrone.Settings.Quality.Size = {}; + window.NzbDrone.Settings.Quality.Profile = {}; window.NzbDrone.Settings.Indexers = {}; window.NzbDrone.Settings.DownloadClient = {}; window.NzbDrone.Settings.Notifications = {};