mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-02-02 05:54:38 +00:00
rjs -> webpack
This commit is contained in:
@@ -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}));
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user