Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show delete button on items loaded by infinite scroll; closes #1089
Browse files Browse the repository at this point in the history
horak committed May 13, 2016
1 parent 2ae5c09 commit 42472e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions web/js/app/views/collections/jda.view.collection.results.js
Original file line number Diff line number Diff line change
@@ -245,8 +245,12 @@
_this.renderTags(response.tags);
_this.render();

if(_this.collection.length<parseInt(response["items_count"],10)) jda.app.killScroll = false; //to activate infinite scroll again
else jda.app.killScroll = true;
if(_this.collection.length<parseInt(response["items_count"],10)) {
jda.app.killScroll = false; //to activate infinite scroll again
if $('.btn.btn-success.btn-mini.save.hide').css('display' === 'block') { // if true, then we're in collection edit mode
$('.jda-delete-item').show(); // which means we should show all the delete buttons for items loaded by infite scroll
}
} else jda.app.killScroll = true;
$(_this.el).fadeTo(1000,1);
jda.app.isLoading = false; //to activate infinite scroll again

0 comments on commit 42472e2

Please sign in to comment.