sonarr-repo-only/src/UI/Settings/Indexers/IndexerLayout.js

30 lines
1.2 KiB
JavaScript
Raw Normal View History

2015-02-03 01:18:45 +00:00
var Marionette = require('marionette');
var IndexerCollection = require('./IndexerCollection');
var CollectionView = require('./IndexerCollectionView');
var OptionsView = require('./Options/IndexerOptionsView');
var RestrictionCollection = require('./Restriction/RestrictionCollection');
var RestrictionCollectionView = require('./Restriction/RestrictionCollectionView');
2015-02-03 01:18:45 +00:00
module.exports = Marionette.Layout.extend({
2015-02-13 23:37:11 +00:00
template : 'Settings/Indexers/IndexerLayoutTemplate',
regions : {
2015-02-03 01:18:45 +00:00
indexers : '#x-indexers-region',
indexerOptions : '#x-indexer-options-region',
restriction : '#x-restriction-region'
},
2015-02-13 23:37:11 +00:00
initialize : function() {
2015-02-03 01:18:45 +00:00
this.indexersCollection = new IndexerCollection();
this.indexersCollection.fetch();
2015-02-13 23:37:11 +00:00
2015-02-03 01:18:45 +00:00
this.restrictionCollection = new RestrictionCollection();
this.restrictionCollection.fetch();
},
2015-02-13 23:37:11 +00:00
onShow : function() {
this.indexers.show(new CollectionView({ collection : this.indexersCollection }));
this.indexerOptions.show(new OptionsView({ model : this.model }));
this.restriction.show(new RestrictionCollectionView({ collection : this.restrictionCollection }));
2015-02-03 01:18:45 +00:00
}
});