mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
updated history/missing layout to use collection sync events.
This commit is contained in:
parent
57540f9ecb
commit
2735e41098
@ -77,6 +77,13 @@ define(
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
initialize: function () {
|
||||
this.collection = new HistoryCollection();
|
||||
this.listenTo(this.collection, 'sync', this._showTable);
|
||||
},
|
||||
|
||||
|
||||
_showTable: function (collection) {
|
||||
|
||||
this.history.show(new Backgrid.Grid({
|
||||
@ -92,14 +99,8 @@ define(
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
var self = this;
|
||||
|
||||
this.history.show(new LoadingView());
|
||||
|
||||
var collection = new HistoryCollection();
|
||||
collection.fetch().done(function () {
|
||||
self._showTable(collection);
|
||||
});
|
||||
this.collection.fetch();
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -74,16 +74,17 @@ define(
|
||||
}));
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
var self = this;
|
||||
|
||||
this.missing.show(new LoadingView());
|
||||
|
||||
initialize: function () {
|
||||
this.missingCollection = new MissingCollection();
|
||||
this.missingCollection.fetch().done(function () {
|
||||
self._showTable();
|
||||
});
|
||||
|
||||
this.listenTo(this.missingCollection, 'sync', this._showTable);
|
||||
},
|
||||
|
||||
|
||||
onShow: function () {
|
||||
this.missing.show(new LoadingView());
|
||||
this.missingCollection.fetch();
|
||||
this._showToolbar();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user