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

29 lines
901 B
JavaScript
Raw Normal View History

2013-10-09 05:48:40 +00:00
'use strict';
define([
'marionette',
'Settings/Indexers/IndexerCollection',
'Settings/Indexers/IndexerCollectionView',
'Settings/Indexers/Options/IndexerOptionsView'
], function (Marionette, IndexerCollection, CollectionView, OptionsView) {
return Marionette.Layout.extend({
template: 'Settings/Indexers/IndexerLayoutTemplate',
regions: {
indexers : '#x-indexers-region',
indexerOptions : '#x-indexer-options-region'
},
initialize: function (options) {
this.indexersCollection = new IndexerCollection();
this.indexersCollection.fetch();
},
onShow: function () {
this.indexers.show(new CollectionView({ collection: this.indexersCollection }));
this.indexerOptions.show(new OptionsView({ model: this.model }));
}
});
});