You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
825 B
29 lines
825 B
var Marionette = require('marionette');
|
|
var Backgrid = require('backgrid');
|
|
var UpdateCollection = require('./UpdateCollection');
|
|
var UpdateCollectionView = require('./UpdateCollectionView');
|
|
var LoadingView = require('../../Shared/LoadingView');
|
|
|
|
module.exports = Marionette.Layout.extend({
|
|
template : 'System/Update/UpdateLayoutTemplate',
|
|
|
|
regions : {
|
|
updates : '#x-updates'
|
|
},
|
|
|
|
initialize : function() {
|
|
this.updateCollection = new UpdateCollection();
|
|
|
|
this.listenTo(this.updateCollection, 'sync', this._showUpdates);
|
|
},
|
|
|
|
onRender : function() {
|
|
this.updates.show(new LoadingView());
|
|
|
|
this.updateCollection.fetch();
|
|
},
|
|
|
|
_showUpdates : function() {
|
|
this.updates.show(new UpdateCollectionView({ collection : this.updateCollection }));
|
|
}
|
|
}); |