<div class="js-list"></div>
-<div class="search-navigator-workspace-list-more js-more">
- <i class="spinner"></i>
+<div class="search-navigator-workspace-list-more">
+ <span class="js-more"><i class="spinner"></i></span>
+ <div class="js-last-element-reached bordered-top note"> <br>{{t 'the_end'}}</div>
</div>
<div class="js-list"></div>
-<div class="search-navigator-workspace-list-more js-more">
- <i class="spinner"></i>
+<div class="search-navigator-workspace-list-more">
+ <span class="js-more"><i class="spinner"></i></span>
+ <div class="js-last-element-reached bordered-top note"> <br>{{t 'the_end'}}</div>
</div>
return Marionette.CompositeView.extend({
ui: {
- loadMore: '.js-more'
+ loadMore: '.js-more',
+ lastElementReached: '.js-last-element-reached'
},
childViewOptions: function () {
this.unbindShortcuts();
},
+ onRender: function () {
+ this.toggleLoadMore();
+ },
+
toggleLoadMore: function () {
- this.ui.loadMore.toggle(!this.options.app.state.get('maxResultsReached'));
+ var maxResultsReached = this.options.app.state.get('maxResultsReached');
+ this.ui.loadMore.toggle(!maxResultsReached);
+ this.ui.lastElementReached.toggle(maxResultsReached);
},
bindScrollEvents: function () {