Sha256: 376dfac0b6603fab807e56a5fd595532d0f58cc6c7dbfc1b5e9ca0107cd1a1bd
Contents?: true
Size: 1.05 KB
Versions: 90
Compression:
Stored size: 1.05 KB
Contents
/* globals Heroku */ //= require utils Heroku.SearchResultsPaginator = function () { function SearchResultsPaginator(_ref) { var more = _ref.more; var less = _ref.less; var helper = _ref.helper; _classCallCheck(this, SearchResultsPaginator); this.$more = $(more); this.$less = $(less); this.helper = helper; this.$more.on('click', this.handleMoreClick.bind(this)); this.$less.on('click', this.handleLessClick.bind(this)); } _createClass(SearchResultsPaginator, [{ key: 'handleMoreClick', value: function handleMoreClick(e) { e.preventDefault(); this.searchWithNewPage(this.helper.getPage() + 1); } }, { key: 'handleLessClick', value: function handleLessClick(e) { e.preventDefault(); this.searchWithNewPage(this.helper.getPage() - 1); } }, { key: 'searchWithNewPage', value: function searchWithNewPage(pageNum) { $(window).scrollTop($('#search-form').offset().top); this.helper.setPage(pageNum).search(); } }]); return SearchResultsPaginator; }();
Version data entries
90 entries across 90 versions & 1 rubygems