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
Léo-Paul Géneau
gitlab-ce
Commits
ae5dc479
Commit
ae5dc479
authored
Jan 04, 2017
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pagination UI
parent
7c86c611
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
app/assets/javascripts/vue_pagination/index.js.es6
app/assets/javascripts/vue_pagination/index.js.es6
+12
-9
No files found.
app/assets/javascripts/vue_pagination/index.js.es6
View file @
ae5dc479
...
...
@@ -98,9 +98,9 @@
if (page > 1) items.push({ title: FIRST });
if (page > 1) {
items.push({ title: PREV });
items.push({ title: PREV
, prev: true
});
} else {
items.push({ title: PREV, disabled: true });
items.push({ title: PREV, disabled: true
, prev: true
});
}
if (page > UI_LIMIT) items.push({ title: SPREAD, separator: true });
...
...
@@ -110,29 +110,32 @@
for (let i = start; i <= end; i++) {
const isActive = i === page;
items.push({ title: i, active: isActive });
items.push({ title: i, active: isActive
, page: true
});
}
if (total - page > PAGINATION_UI_BUTTON_LIMIT) {
items.push({ title: SPREAD, separator: true });
items.push({ title: SPREAD, separator: true
, page: true
});
}
if (page === total) {
items.push({ title: NEXT, disabled: true });
items.push({ title: NEXT, disabled: true
, next: true
});
} else if (total - page >= 1) {
items.push({ title: NEXT });
items.push({ title: NEXT
, next: true
});
}
if (total - page >= 1) items.push({ title: LAST });
if (total - page >= 1) items.push({ title: LAST
, last: true
});
return items;
},
},
template: `
<div class="gl-pagination">
<ul class="pagination clearfix"
v-for='item in getItems'
>
<li
<ul class="pagination clearfix">
<li
v-for='item in getItems'
:class='{
page: item.page,
prev: item.prev,
next: item.next,
separator: item.separator,
active: item.active,
disabled: item.disabled
...
...
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