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',
|
2014-10-28 04:37:35 +00:00
|
|
|
|
'Settings/Indexers/Options/IndexerOptionsView',
|
|
|
|
|
'Settings/Indexers/Restriction/RestrictionCollection',
|
|
|
|
|
'Settings/Indexers/Restriction/RestrictionCollectionView'
|
|
|
|
|
], function (Marionette, IndexerCollection, CollectionView, OptionsView, RestrictionCollection, RestrictionCollectionView) {
|
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: {
|
2014-10-28 04:37:35 +00:00
|
|
|
|
indexers : '#x-indexers-region',
|
|
|
|
|
indexerOptions : '#x-indexer-options-region',
|
|
|
|
|
restriction : '#x-restriction-region'
|
2014-04-19 15:09:22 +00:00
|
|
|
|
},
|
2013-07-05 04:52:20 +00:00
|
|
|
|
|
2014-10-28 04:37:35 +00:00
|
|
|
|
initialize: function () {
|
2014-04-19 15:09:22 +00:00
|
|
|
|
this.indexersCollection = new IndexerCollection();
|
|
|
|
|
this.indexersCollection.fetch();
|
2014-10-28 04:37:35 +00:00
|
|
|
|
|
|
|
|
|
this.restrictionCollection = new RestrictionCollection();
|
|
|
|
|
this.restrictionCollection.fetch();
|
2014-04-19 15:09:22 +00:00
|
|
|
|
},
|
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 }));
|
2014-10-28 04:37:35 +00:00
|
|
|
|
this.restriction.show(new RestrictionCollectionView({ collection: this.restrictionCollection }));
|
2014-04-19 15:09:22 +00:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|