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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
acc3ec6f
Commit
acc3ec6f
authored
Jan 12, 2017
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue - description in function (check diff)
parent
2f1701c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
app/assets/javascripts/vue_pipelines_index/stage.js.es6
app/assets/javascripts/vue_pipelines_index/stage.js.es6
+23
-3
No files found.
app/assets/javascripts/vue_pipelines_index/stage.js.es6
View file @
acc3ec6f
...
@@ -12,7 +12,27 @@
...
@@ -12,7 +12,27 @@
},
},
props: ['stage', 'svgs', 'match'],
props: ['stage', 'svgs', 'match'],
methods: {
methods: {
fetchBuilds() {
fetchBuilds(e) {
/**
This is a very interesting UI problem
Essentially we have to clear builds on blur no matter what
This was preventing turbolinks to make the request to the link clicked
Vue will always look at the VDOM element which is the button
It has a special attribute 'aria-describedby' which will not exist:
- once the build link is clicked
- when someone clicks outside of the dropdown
In order for this to work:
- here we setTimeout to give enough time to initialize the request
- but short enough that a subsequent click will reset that state
*/
if (!e.currentTarget.attributes['aria-describedby']) {
setTimeout(() => {
this.request = false;
}, 100);
return null;
}
if (this.request) return this.clearBuilds();
if (this.request) return this.clearBuilds();
return this.$http.get(this.stage.dropdown_path)
return this.$http.get(this.stage.dropdown_path)
...
@@ -56,8 +76,8 @@
...
@@ -56,8 +76,8 @@
template: `
template: `
<div>
<div>
<button
<button
@click='fetchBuilds'
@click='fetchBuilds
($event)
'
@blur='fetchBuilds'
@blur='fetchBuilds
($event)
'
:class="triggerButtonClass"
:class="triggerButtonClass"
:title='stage.title'
:title='stage.title'
data-placement="top"
data-placement="top"
...
...
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