Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
283bca3a
Commit
283bca3a
authored
8 years ago
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use param defaults and add spacing for readability
parent
32448265
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
app/assets/javascripts/pager.js.es6
app/assets/javascripts/pager.js.es6
+7
-4
No files found.
app/assets/javascripts/pager.js.es6
View file @
283bca3a
(() => {
const Pager = {
init(limit
, preload, disable, callback
) {
this.limit = limit
!= null ? limit : 0
;
this.disable = disable
!= null ? disable : false
;
this.callback = callback
!= null ? callback : $.noop
;
init(limit
= 0, preload = false, disable = false, callback = $.noop
) {
this.limit = limit;
this.disable = disable;
this.callback = callback;
this.loading = $('.loading').first();
if (preload) {
this.offset = 0;
...
...
@@ -13,6 +13,7 @@
}
this.initLoadMore();
},
getOld() {
this.loading.show();
$.ajax({
...
...
@@ -27,6 +28,7 @@
dataType: 'json',
});
},
append(count, html) {
$('.content_list').append(html);
if (count > 0) {
...
...
@@ -35,6 +37,7 @@
this.disable = true;
}
},
initLoadMore() {
$(document).unbind('scroll');
$(document).endlessScroll({
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment