mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
Add existing series, load more will only load 5 results at a time
This commit is contained in:
parent
47e7805cf9
commit
3559d35d92
4 changed files with 21 additions and 8 deletions
|
@ -11,8 +11,8 @@ define(
|
|||
itemView: SearchResultView,
|
||||
|
||||
initialize: function (options) {
|
||||
|
||||
this.isExisting = options.isExisting;
|
||||
this.showing = 1;
|
||||
},
|
||||
|
||||
showAll: function () {
|
||||
|
@ -20,11 +20,17 @@ define(
|
|||
this.render();
|
||||
},
|
||||
|
||||
showMore: function () {
|
||||
this.showing += 5;
|
||||
this.render();
|
||||
|
||||
return this.showing >= this.collection.length;
|
||||
},
|
||||
|
||||
appendHtml: function (collectionView, itemView, index) {
|
||||
if (!this.isExisting || this.showingAll || index === 0) {
|
||||
if (!this.isExisting || index < this.showing || index === 0) {
|
||||
collectionView.$el.append(itemView.el);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue