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
db43813a
Commit
db43813a
authored
Dec 16, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add CONST and one line a tag in pagination - add request to false in store handler
parent
211ee4b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
17 deletions
+13
-17
app/assets/javascripts/vue_pagination/index.js.es6
app/assets/javascripts/vue_pagination/index.js.es6
+3
-6
app/assets/javascripts/vue_pipelines_index/index.js.es6
app/assets/javascripts/vue_pipelines_index/index.js.es6
+6
-8
app/assets/javascripts/vue_pipelines_index/store.js.es6
app/assets/javascripts/vue_pipelines_index/store.js.es6
+4
-3
No files found.
app/assets/javascripts/vue_pagination/index.js.es6
View file @
db43813a
...
...
@@ -5,6 +5,7 @@
((gl) => {
const PAGINATION_UI_BUTTON_LIMIT = 4;
const UI_LIMIT = 6;
const SPREAD = '...';
const PREV = 'Prev';
const NEXT = 'Next';
...
...
@@ -104,7 +105,7 @@
items.push({ title: PREV, disabled: true });
}
if (page >
6
) items.push({ title: SPREAD, separator: true });
if (page >
UI_LIMIT
) items.push({ title: SPREAD, separator: true });
const start = Math.max(page - PAGINATION_UI_BUTTON_LIMIT, 1);
const end = Math.min(page + PAGINATION_UI_BUTTON_LIMIT, total);
...
...
@@ -139,11 +140,7 @@
disabled: item.disabled
}'
>
<a
@click="changePage($event)"
>
{{item.title}}
</a>
<a @click="changePage($event)">{{item.title}}</a>
</li>
</ul>
</div>
...
...
app/assets/javascripts/vue_pipelines_index/index.js.es6
View file @
db43813a
...
...
@@ -36,14 +36,12 @@
'vue-pipelines': gl.VuePipelines,
},
template: `
<div>
<vue-pipelines
:scope='scope'
:store='store'
:svgs='svgs'
>
</vue-pipelines>
</div>
<vue-pipelines
:scope='scope'
:store='store'
:svgs='svgs'
>
</vue-pipelines>
`,
});
}
...
...
app/assets/javascripts/vue_pipelines_index/store.js.es6
View file @
db43813a
...
...
@@ -34,9 +34,10 @@
updatePipelineNums(this.count);
this.pageRequest = false;
}, () => new Flash(
'Something went wrong on our end.',
));
}, () => {
this.pageRequest = false;
return new Flash('Something went wrong on our end.');
});
goFetch();
...
...
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