|
|
@ -16,17 +16,18 @@ define(
|
|
|
|
|
|
|
|
|
|
|
|
initialize: function () {
|
|
|
|
initialize: function () {
|
|
|
|
this.updateCollection = new UpdateCollection();
|
|
|
|
this.updateCollection = new UpdateCollection();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.listenTo(this.updateCollection, 'sync', this._showUpdates);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
onRender: function () {
|
|
|
|
onRender: function () {
|
|
|
|
this.updates.show(new LoadingView());
|
|
|
|
this.updates.show(new LoadingView());
|
|
|
|
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
this.updateCollection.fetch();
|
|
|
|
var promise = this.updateCollection.fetch();
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
promise.done(function (){
|
|
|
|
_showUpdates: function () {
|
|
|
|
self.updates.show(new UpdateCollectionView({ collection: self.updateCollection }));
|
|
|
|
this.updates.show(new UpdateCollectionView({ collection: this.updateCollection }));
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|