mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-28 23:16:32 -04:00
Series detials fixes
Fixed: Adding a new series and going to series details will show data after information is fetched Fixed: Series details won't reload view after update
This commit is contained in:
@@ -19,6 +19,27 @@ define(
|
||||
this.series = options.series;
|
||||
},
|
||||
|
||||
appendHtml: function(collectionView, itemView, index) {
|
||||
var childrenContainer = collectionView.itemViewContainer ? collectionView.$(collectionView.itemViewContainer) : collectionView.$el;
|
||||
var collection = collectionView.collection;
|
||||
|
||||
// If the index of the model is at the end of the collection append, else insert at proper index
|
||||
if (index >= collection.size() - 1) {
|
||||
childrenContainer.append(itemView.el);
|
||||
} else {
|
||||
var previousModel = collection.at(index + 1);
|
||||
var previousView = this.children.findByModel(previousModel);
|
||||
|
||||
if (previousView) {
|
||||
previousView.$el.before(itemView.$el);
|
||||
}
|
||||
|
||||
else {
|
||||
childrenContainer.append(itemView.el);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
itemViewOptions: function () {
|
||||
return {
|
||||
episodeCollection: this.episodeCollection,
|
||||
|
||||
Reference in New Issue
Block a user