2014-06-07 23:07:25 +04:00
|
|
|
import setScrollClassName from 'ghost/utils/set-scroll-classname';
|
2014-07-20 20:42:03 +04:00
|
|
|
import PaginationViewMixin from 'ghost/mixins/pagination-view-infinite-scroll';
|
2014-06-07 23:07:25 +04:00
|
|
|
|
2014-05-24 07:25:20 +04:00
|
|
|
|
2014-07-20 20:42:03 +04:00
|
|
|
var PostsListView = Ember.View.extend(PaginationViewMixin, {
|
|
|
|
classNames: ['content-list-content'],
|
2014-05-24 07:25:20 +04:00
|
|
|
|
|
|
|
didInsertElement: function () {
|
2014-07-20 20:42:03 +04:00
|
|
|
this._super();
|
2014-05-24 07:25:20 +04:00
|
|
|
var el = this.$();
|
2014-06-07 23:07:25 +04:00
|
|
|
el.on('scroll', Ember.run.bind(el, setScrollClassName, {
|
|
|
|
target: el.closest('.content-list'),
|
|
|
|
offset: 10
|
|
|
|
}));
|
2014-05-24 07:25:20 +04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default PostsListView;
|