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
79f6e08c
Commit
79f6e08c
authored
Jan 06, 2017
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use switch for pagination
parent
6bf0bd0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
app/assets/javascripts/vue_pagination/index.js.es6
app/assets/javascripts/vue_pagination/index.js.es6
+18
-12
No files found.
app/assets/javascripts/vue_pagination/index.js.es6
View file @
79f6e08c
...
...
@@ -66,18 +66,24 @@
const text = e.target.innerText;
const { totalPages, nextPage, previousPage } = this.pageInfo;
if (text === SPREAD) {
return;
} else if (text === LAST) {
pageNum = totalPages;
} else if (text === NEXT) {
pageNum = nextPage;
} else if (text === PREV) {
pageNum = previousPage;
} else if (text === FIRST) {
pageNum = 1;
} else {
pageNum = +text;
switch (text) {
case SPREAD:
break;
case LAST:
pageNum = totalPages;
break;
case NEXT:
pageNum = nextPage;
break;
case PREV:
pageNum = previousPage;
break;
case FIRST:
pageNum = 1;
break;
default:
pageNum = +text;
break;
}
this.change(pageNum, apiScope);
...
...
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