2013-05-01 22:42:30 +00:00
|
|
|
|
"use strict";
|
|
|
|
|
define([
|
2013-03-07 08:01:18 +00:00
|
|
|
|
'app',
|
|
|
|
|
'Quality/QualityProfileCollection',
|
|
|
|
|
'Quality/QualitySizeCollection',
|
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',
|
2013-03-29 23:28:58 +00:00
|
|
|
|
qualityProfile : '#quality-profile',
|
|
|
|
|
qualitySize : '#quality-size'
|
2013-03-07 08:01:18 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
ui: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
events: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
|
this.settings = options.settings;
|
|
|
|
|
qualityProfileCollection.fetch();
|
|
|
|
|
this.qualitySizeCollection = new NzbDrone.Quality.QualitySizeCollection();
|
|
|
|
|
this.qualitySizeCollection.fetch();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onRender: function () {
|
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
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|