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
b0e6d078
Commit
b0e6d078
authored
Nov 07, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
end dot logic complete
parent
31af345b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
app/assets/javascripts/vue_pagination/index.js.es6
app/assets/javascripts/vue_pagination/index.js.es6
+15
-11
app/assets/javascripts/vue_pipelines_index/index.js.es6
app/assets/javascripts/vue_pipelines_index/index.js.es6
+1
-1
No files found.
app/assets/javascripts/vue_pagination/index.js.es6
View file @
b0e6d078
...
...
@@ -29,7 +29,12 @@
section.shift();
this.nslice = +this.pagenum;
this.endcount = +this.pagenum + 5;
if (+this.pagenum + 5 <= this.last) {
return section.slice(+this.pagenum, +this.pagenum + 5);
}
if (+this.pagenum + 5 > this.last) {
return section.slice(this.last - 5, this.last);
}
},
paginationsection() {
if (this.last < 6 && this.pagenum < 6) {
...
...
@@ -46,7 +51,7 @@
return +this.last + 1;
},
endspread() {
if (+this.pagenum < this.last
&& +this.pagenum > 5
) return true;
if (+this.pagenum < this.last) return true;
return false;
},
begspread() {
...
...
@@ -57,17 +62,19 @@
template: `
<div class="gl-pagination">
<ul class="pagination clearfix" v-for='n in paginationsection'>
<li :class='prevstatus(n)' v-if='n - 1 === 1'>
<li
:class='prevstatus(n)'
v-if='n - 1 === 1 || n - 1 === nslice || n - 1 === this.last - 5'
>
<span @click='changepage($event, {where: pagenum - 1})'>Prev</span>
</li>
<li v-if='n - 1 === last && upcount > 4 && begspread'>
<span class="gap">…</span>
</li>
<li :class='pagenumberstatus(n)' v-if='n >= 2'>
<span @click='changepage($event)'>{{(n - 1)}}</span>
</li>
<!--
if at end make dots dissapear
if in second slice or more make dots appear in the front
-->
<li v-if='n === upcount && upcount > 4 && begspread'>
<li v-if='(n === upcount || n === endcount) && +pagenum + 5 !== last'>
<span class="gap">…</span>
</li>
<li
...
...
@@ -76,9 +83,6 @@
>
<span @click='changepage($event,{where: +pagenum+1})'>Next</span>
</li>
<li v-if='n === upcount && upcount > 4 && endspread'>
<span class="gap">…</span>
</li>
<li
class="last"
v-if='(n === upcount || n === endcount) && +pagenum !== last'
...
...
app/assets/javascripts/vue_pipelines_index/index.js.es6
View file @
b0e6d078
...
...
@@ -34,7 +34,7 @@
<vue-pipelines
:scope='scope'
:store='store'
:count='
count
'
:count='
90
'
>
</vue-pipelines>
</div>
...
...
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