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
e95a2b15
Commit
e95a2b15
authored
Nov 07, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove use of spread operator - attempt render function
parent
b0e6d078
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
5 deletions
+32
-5
app/assets/javascripts/vue_pagination/index.js.es6
app/assets/javascripts/vue_pagination/index.js.es6
+32
-4
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
+0
-1
No files found.
app/assets/javascripts/vue_pagination/index.js.es6
View file @
e95a2b15
...
...
@@ -11,6 +11,7 @@
data() {
return {
nslice: +this.pagenum,
endcount: this.last,
};
},
methods: {
...
...
@@ -20,12 +21,15 @@
},
prevstatus() {
if (+this.pagenum > 1) return '';
return 'prev disabled';
return 'disabled';
},
createSection(n) {
return Array.from(Array(n)).map((e, i) => i);
},
},
computed: {
dynamicpage() {
const section =
[...Array(this.upcount).keys()]
;
const section =
this.createSection(this.upcount)
;
section.shift();
this.nslice = +this.pagenum;
this.endcount = +this.pagenum + 5;
...
...
@@ -38,7 +42,7 @@
},
paginationsection() {
if (this.last < 6 && this.pagenum < 6) {
const pageArray =
[...Array(6).keys()]
;
const pageArray =
this.createSection(6)
;
pageArray.shift();
return pageArray.slice(0, this.upcount);
}
...
...
@@ -81,7 +85,7 @@
class="next"
v-if='(n === upcount || n === endcount) && pagenum !== last'
>
<span @click='changepage($event,{where: +pagenum
+
1})'>Next</span>
<span @click='changepage($event,{where: +pagenum
+
1})'>Next</span>
</li>
<li
class="last"
...
...
@@ -92,5 +96,29 @@
</ul>
</div>
`,
// render(createElement) {
// return createElement('div', {
// class: {
// 'gl-pagination': true,
// },
// }, [createElement('ul', {
// class: {
// pagination: true,
// clearfix: true,
// },
// }, this.paginationsection.map((e, i) => {
// if (!i) return createElement('li', [createElement('span', {
// class: {
// prev: this.prevstatus,
// },
// }, 'Prev')]);
// if (i) {
// return createElement('li',
// [createElement('span', i)]
// );
// }
// })),
// ]);
// },
});
})(window.gl || (window.gl = {}));
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
View file @
e95a2b15
...
...
@@ -40,7 +40,6 @@
if (page.where) this.pagenum = +page.where;
if (page.where) this.pagenum = +page.where;
// use p instead of page to avoid making an actual request
window.history.pushState({}, null, `?p=${this.pagenum}`);
clearInterval(this.intervalId);
this.store.fetchDataLoop.call(this, Vue, this.pagenum);
...
...
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