2013-06-25 02:41:59 +03:00
|
|
|
'use strict';
|
|
|
|
define(
|
|
|
|
[
|
|
|
|
'marionette',
|
|
|
|
'Quality/QualityProfileCollection',
|
|
|
|
'Settings/Quality/Profile/QualityProfileCollectionView',
|
|
|
|
'Quality/QualitySizeCollection',
|
|
|
|
'Settings/Quality/Size/QualitySizeCollectionView'
|
|
|
|
], function (Marionette, QualityProfileCollection, QualityProfileCollectionView, QualitySizeCollection, QualitySizeCollectionView) {
|
2013-06-19 04:02:23 +03:00
|
|
|
return Marionette.Layout.extend({
|
2013-03-07 11:01:18 +03:00
|
|
|
template: 'Settings/Quality/QualityLayoutTemplate',
|
|
|
|
|
|
|
|
regions: {
|
|
|
|
qualityStandard: '#quality-standard',
|
2013-03-30 02:28:58 +03:00
|
|
|
qualityProfile : '#quality-profile',
|
|
|
|
qualitySize : '#quality-size'
|
2013-03-07 11:01:18 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
this.settings = options.settings;
|
2013-06-19 04:02:23 +03:00
|
|
|
QualityProfileCollection.fetch();
|
|
|
|
this.qualitySizeCollection = new QualitySizeCollection();
|
2013-03-07 11:01:18 +03:00
|
|
|
this.qualitySizeCollection.fetch();
|
|
|
|
},
|
|
|
|
|
|
|
|
onRender: function () {
|
2013-06-19 04:02:23 +03:00
|
|
|
this.qualityProfile.show(new QualityProfileCollectionView({collection: QualityProfileCollection}));
|
|
|
|
this.qualitySize.show(new QualitySizeCollectionView({collection: this.qualitySizeCollection}));
|
2013-03-07 11:01:18 +03:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|