2013-03-07 08:01:18 +00:00
|
|
|
|
define([
|
|
|
|
|
'app',
|
|
|
|
|
'Quality/QualityProfileCollection',
|
|
|
|
|
'Quality/QualitySizeCollection',
|
|
|
|
|
'Settings/Quality/QualityView',
|
2013-03-09 01:55:47 +00:00
|
|
|
|
'Settings/Quality/Profile/QualityProfileCollectionView',
|
|
|
|
|
'Settings/Quality/Size/QualitySizeCollectionView'
|
2013-03-07 08:01:18 +00:00
|
|
|
|
],
|
|
|
|
|
function (app, qualityProfileCollection) {
|
|
|
|
|
NzbDrone.Settings.Quality.QualityLayout = Backbone.Marionette.Layout.extend({
|
|
|
|
|
template: 'Settings/Quality/QualityLayoutTemplate',
|
|
|
|
|
|
|
|
|
|
regions: {
|
|
|
|
|
qualityStandard: '#quality-standard',
|
|
|
|
|
qualityProfile: '#quality-profile',
|
|
|
|
|
qualitySize: '#quality-size'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
ui: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
events: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
|
this.settings = options.settings;
|
|
|
|
|
qualityProfileCollection.fetch();
|
|
|
|
|
this.qualitySizeCollection = new NzbDrone.Quality.QualitySizeCollection();
|
|
|
|
|
this.qualitySizeCollection.fetch();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onRender: function () {
|
|
|
|
|
this.qualityStandard.show(new NzbDrone.Settings.Quality.QualityView({model: this.settings, qualityProfiles: qualityProfileCollection}));
|
2013-03-09 01:55:47 +00:00
|
|
|
|
this.qualityProfile.show(new NzbDrone.Settings.Quality.Profile.QualityProfileCollectionView({collection: qualityProfileCollection}));
|
|
|
|
|
this.qualitySize.show(new NzbDrone.Settings.Quality.Size.QualitySizeCollectionView({collection: this.qualitySizeCollection}));
|
2013-03-07 08:01:18 +00:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|