mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
a8ca517c54
closes #3222 - implementing server-side pagination for /users API - passing /users?limit=none will return all users - passing /users?status=invited will filter base on user status - creating 3 mixins (route, controller and view) to keep pagination logic DRY - updating route, controller and view for Posts to use new mixing - implementing infinite scrolling for Users Management screen (using new mixins) - Users Management screen displays all invited users, but paginates active users
19 lines
530 B
JavaScript
19 lines
530 B
JavaScript
import setScrollClassName from 'ghost/utils/set-scroll-classname';
|
|
import PaginationViewMixin from 'ghost/mixins/pagination-view-infinite-scroll';
|
|
|
|
|
|
var PostsListView = Ember.View.extend(PaginationViewMixin, {
|
|
classNames: ['content-list-content'],
|
|
|
|
didInsertElement: function () {
|
|
this._super();
|
|
var el = this.$();
|
|
el.on('scroll', Ember.run.bind(el, setScrollClassName, {
|
|
target: el.closest('.content-list'),
|
|
offset: 10
|
|
}));
|
|
}
|
|
});
|
|
|
|
export default PostsListView;
|