summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pager.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pager.js')
-rw-r--r--app/assets/javascripts/pager.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/pager.js b/app/assets/javascripts/pager.js
index 3b58c54b3f4..843f78c5fa9 100644
--- a/app/assets/javascripts/pager.js
+++ b/app/assets/javascripts/pager.js
@@ -7,14 +7,22 @@ const ENDLESS_SCROLL_BOTTOM_PX = 400;
const ENDLESS_SCROLL_FIRE_DELAY_MS = 1000;
export default {
- init(limit = 0, preload = false, disable = false, prepareData = $.noop, callback = $.noop) {
+ init(
+ limit = 0,
+ preload = false,
+ disable = false,
+ prepareData = $.noop,
+ callback = $.noop,
+ container = '',
+ ) {
this.url = $('.content_list').data('href') || removeParams(['limit', 'offset']);
this.limit = limit;
this.offset = parseInt(getParameterByName('offset'), 10) || this.limit;
this.disable = disable;
this.prepareData = prepareData;
this.callback = callback;
- this.loading = $('.loading').first();
+ this.container = container;
+ this.loading = $(`${container} .loading`).first();
if (preload) {
this.offset = 0;
this.getOld();