BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
59560758
Commit
59560758
authored
Nov 08, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
f4a52de3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
index.js.es6
app/assets/javascripts/vue_pagination/index.js.es6
+5
-13
No files found.
app/assets/javascripts/vue_pagination/index.js.es6
View file @
59560758
...
...
@@ -26,13 +26,11 @@
computed: {
last() { return Math.ceil(+this.count / 5); },
getItems() {
const total = +this.
coun
t;
const total = +this.
las
t;
const page = +this.pagenum;
const items = [];
if (page > 1) {
items.push({ title: '<< First', where: 1 });
}
if (page > 1) items.push({ title: '<< First', where: 1 });
if (page > 1) {
items.push({ title: 'Prev', where: page - 1 });
...
...
@@ -40,9 +38,7 @@
items.push({ title: 'Prev', where: page - 1, disabled: true });
}
if (page > 6) {
items.push({ title: '...', separator: true });
}
if (page > 6) items.push({ title: '...', separator: true });
const start = Math.max(page - 4, 1);
const end = Math.min(page + 4, total);
...
...
@@ -52,9 +48,7 @@
items.push({ title: i, active: isActive, where: i });
}
if (total - page > 4) {
items.push({ title: '...', separator: true });
}
if (total - page > 4) items.push({ title: '...', separator: true });
if (page === total) {
items.push({ title: 'Next', where: page + 1, disabled: true });
...
...
@@ -62,9 +56,7 @@
items.push({ title: 'Next', where: page + 1 });
}
if (total - page >= 1) {
items.push({ title: 'Last >>', where: total });
}
if (total - page >= 1) items.push({ title: 'Last >>', where: total });
return items;
},
...
...
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