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
238ca048
Commit
238ca048
authored
Feb 20, 2017
by
Nur Rony
Committed by
Filipa Lacerda
Feb 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds mount function with prevent and removes keepGraph function
parent
4792eb7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
app/assets/javascripts/vue_pipelines_index/stage.js.es6
app/assets/javascripts/vue_pipelines_index/stage.js.es6
+16
-20
No files found.
app/assets/javascripts/vue_pipelines_index/stage.js.es6
View file @
238ca048
...
@@ -23,6 +23,19 @@
...
@@ -23,6 +23,19 @@
required: true,
required: true,
},
},
},
},
mounted() {
/**
* When the user right clicks or cmd/ctrl + click in the job name or action icon,
* the dropdown should not be closed and the link should open in another tab.
* If the target is a svg we stop propagation in order to prevent
* the default behavior of the dropdown.
*/
console.log('I am called');
$('.js-builds-dropdown-list').on('click', (e) => {
console.log('i am in event');
e.stopPropagation();
});
},
methods: {
methods: {
fetchBuilds(e) {
fetchBuilds(e) {
const areaExpanded = e.currentTarget.attributes['aria-expanded'];
const areaExpanded = e.currentTarget.attributes['aria-expanded'];
...
@@ -37,22 +50,6 @@
...
@@ -37,22 +50,6 @@
return flash;
return flash;
});
});
},
},
/**
* When the user right clicks or cmd/ctrl + click in the job name or action icon,
* the dropdown should not be closed and the link should open in another tab.
* If the target is a svg we stop propagation in order to prevent
* the default behavior of the dropdown.
*/
keepGraph(e) {
const { target } = e;
const svgClassName = target.getAttribute('class');
const svgParentClassName = target.parentElement && target.parentElement.getAttribute('class');
if (svgClassName && svgClassName.indexOf('js-ci-action-icon') >= 0) return null;
if (svgParentClassName && svgParentClassName.indexOf('js-ci-action-icon') >= 0) return null;
return e.stopPropagation();
},
},
},
computed: {
computed: {
buildsOrSpinner() {
buildsOrSpinner() {
...
@@ -80,13 +77,13 @@
...
@@ -80,13 +77,13 @@
template: `
template: `
<div>
<div>
<button
<button
@click=
'fetchBuilds($event)'
@click=
"fetchBuilds($event)"
:class="triggerButtonClass"
:class="triggerButtonClass"
:title=
'stage.title'
:title=
"stage.title"
data-placement="top"
data-placement="top"
data-toggle="dropdown"
data-toggle="dropdown"
type="button"
type="button"
:aria-label=
'stage.title'
:aria-label=
"stage.title"
>
>
<span v-html="svg" aria-hidden="true"></span>
<span v-html="svg" aria-hidden="true"></span>
<i class="fa fa-caret-down" aria-hidden="true"></i>
<i class="fa fa-caret-down" aria-hidden="true"></i>
...
@@ -94,7 +91,6 @@
...
@@ -94,7 +91,6 @@
<ul class="dropdown-menu mini-pipeline-graph-dropdown-menu js-builds-dropdown-container">
<ul class="dropdown-menu mini-pipeline-graph-dropdown-menu js-builds-dropdown-container">
<div class="arrow-up" aria-hidden="true"></div>
<div class="arrow-up" aria-hidden="true"></div>
<div
<div
@click='keepGraph($event)'
:class="dropdownClass"
:class="dropdownClass"
class="js-builds-dropdown-list scrollable-menu"
class="js-builds-dropdown-list scrollable-menu"
v-html="buildsOrSpinner"
v-html="buildsOrSpinner"
...
...
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