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
+46 -63
View File
@@ -1,64 +1,47 @@
'use strict';
define(
[
'marionette',
'backgrid',
'Health/HealthCollection',
'System/Info/Health/HealthCell',
'System/Info/Health/HealthWikiCell',
'System/Info/Health/HealthOkView'
], function (Marionette, Backgrid, HealthCollection, HealthCell, HealthWikiCell, HealthOkView) {
return Marionette.Layout.extend({
template: 'System/Info/Health/HealthLayoutTemplate',
var Marionette = require('marionette');
var Backgrid = require('backgrid');
var HealthCollection = require('../../../Health/HealthCollection');
var HealthCell = require('./HealthCell');
var HealthWikiCell = require('./HealthWikiCell');
var HealthOkView = require('./HealthOkView');
regions: {
grid: '#x-health-grid'
},
columns:
[
{
name: 'type',
label: '',
cell: HealthCell,
sortable: false
},
{
name: 'message',
label: 'Message',
cell: 'string',
sortable: false
},
{
name: 'wikiUrl',
label: '',
cell: HealthWikiCell,
sortable: false
}
],
initialize: function () {
this.listenTo(HealthCollection, 'sync', this.render);
HealthCollection.fetch();
},
onRender : function() {
if (HealthCollection.length === 0) {
this.grid.show(new HealthOkView());
}
else {
this._showTable();
}
},
_showTable: function() {
this.grid.show(new Backgrid.Grid({
row: Backgrid.Row,
columns: this.columns,
collection: HealthCollection,
className:'table table-hover'
}));
}
});
});
module.exports = Marionette.Layout.extend({
template : 'System/Info/Health/HealthLayoutTemplate',
regions : {grid : '#x-health-grid'},
columns : [{
name : 'type',
label : '',
cell : HealthCell,
sortable : false
}, {
name : 'message',
label : 'Message',
cell : 'string',
sortable : false
}, {
name : 'wikiUrl',
label : '',
cell : HealthWikiCell,
sortable : false
}],
initialize : function(){
this.listenTo(HealthCollection, 'sync', this.render);
HealthCollection.fetch();
},
onRender : function(){
if(HealthCollection.length === 0) {
this.grid.show(new HealthOkView());
}
else {
this._showTable();
}
},
_showTable : function(){
this.grid.show(new Backgrid.Grid({
row : Backgrid.Row,
columns : this.columns,
collection : HealthCollection,
className : 'table table-hover'
}));
}
});