rjs -> webpack

This commit is contained in:
Keivan Beigi
2015-02-02 17:18:45 -08:00
parent 344f3d66ef
commit 428a1439e5
399 changed files with 11591 additions and 16139 deletions

View File

@@ -1,33 +1,21 @@
'use strict';
define(
[
'marionette',
'backgrid',
'System/Update/UpdateCollection',
'System/Update/UpdateCollectionView',
'Shared/LoadingView'
], function (Marionette, Backgrid, UpdateCollection, UpdateCollectionView, LoadingView) {
return Marionette.Layout.extend({
template: 'System/Update/UpdateLayoutTemplate',
var Marionette = require('marionette');
var Backgrid = require('backgrid');
var UpdateCollection = require('./UpdateCollection');
var UpdateCollectionView = require('./UpdateCollectionView');
var LoadingView = require('../../Shared/LoadingView');
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 }));
}
});
});
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}));
}
});