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