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
Boxiang Sun
gitlab-ce
Commits
6765a4e4
Commit
6765a4e4
authored
Mar 27, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stops triggering board sidebar when clicking avatar
parent
ad831ace
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
app/assets/javascripts/boards/components/board_card.js
app/assets/javascripts/boards/components/board_card.js
+1
-3
app/assets/javascripts/boards/components/issue_card_inner.js
app/assets/javascripts/boards/components/issue_card_inner.js
+3
-3
spec/javascripts/boards/board_card_spec.js
spec/javascripts/boards/board_card_spec.js
+19
-0
No files found.
app/assets/javascripts/boards/components/board_card.js
View file @
6765a4e4
...
@@ -50,9 +50,7 @@ export default {
...
@@ -50,9 +50,7 @@ export default {
this
.
showDetail
=
false
;
this
.
showDetail
=
false
;
},
},
showIssue
(
e
)
{
showIssue
(
e
)
{
const
targetTagName
=
e
.
target
.
tagName
.
toLowerCase
();
if
(
e
.
target
.
classList
.
contains
(
'
js-no-trigger
'
))
return
;
if
(
targetTagName
===
'
a
'
||
targetTagName
===
'
button
'
)
return
;
if
(
this
.
showDetail
)
{
if
(
this
.
showDetail
)
{
this
.
showDetail
=
false
;
this
.
showDetail
=
false
;
...
...
app/assets/javascripts/boards/components/issue_card_inner.js
View file @
6765a4e4
...
@@ -84,20 +84,20 @@ import eventHub from '../eventhub';
...
@@ -84,20 +84,20 @@ import eventHub from '../eventhub';
#{{ issue.id }}
#{{ issue.id }}
</span>
</span>
<a
<a
class="card-assignee has-tooltip"
class="card-assignee has-tooltip
js-no-trigger
"
:href="rootPath + issue.assignee.username"
:href="rootPath + issue.assignee.username"
:title="'Assigned to ' + issue.assignee.name"
:title="'Assigned to ' + issue.assignee.name"
v-if="issue.assignee"
v-if="issue.assignee"
data-container="body">
data-container="body">
<img
<img
class="avatar avatar-inline s20"
class="avatar avatar-inline s20
js-no-trigger
"
:src="issue.assignee.avatar"
:src="issue.assignee.avatar"
width="20"
width="20"
height="20"
height="20"
:alt="'Avatar for ' + issue.assignee.name" />
:alt="'Avatar for ' + issue.assignee.name" />
</a>
</a>
<button
<button
class="label color-label has-tooltip"
class="label color-label has-tooltip
js-no-trigger
"
v-for="label in issue.labels"
v-for="label in issue.labels"
type="button"
type="button"
v-if="showLabel(label)"
v-if="showLabel(label)"
...
...
spec/javascripts/boards/board_card_spec.js
View file @
6765a4e4
/* global List */
/* global List */
/* global ListUser */
/* global ListLabel */
/* global ListLabel */
/* global listObj */
/* global listObj */
/* global boardsMockInterceptor */
/* global boardsMockInterceptor */
/* global BoardService */
/* global BoardService */
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
'
~/boards/models/user
'
;
require
(
'
~/boards/models/list
'
);
require
(
'
~/boards/models/list
'
);
require
(
'
~/boards/models/label
'
);
require
(
'
~/boards/models/label
'
);
...
@@ -130,6 +132,23 @@ describe('Issue card', () => {
...
@@ -130,6 +132,23 @@ describe('Issue card', () => {
expect
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
).
toEqual
({});
expect
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
).
toEqual
({});
});
});
it
(
'
does not set detail issue if img is clicked
'
,
(
done
)
=>
{
vm
.
issue
.
assignee
=
new
ListUser
({
id
:
1
,
name
:
'
testing 123
'
,
username
:
'
test
'
,
avatar
:
'
test_image
'
,
});
Vue
.
nextTick
(()
=>
{
triggerEvent
(
'
mouseup
'
,
vm
.
$el
.
querySelector
(
'
img
'
));
expect
(
gl
.
issueBoards
.
BoardsStore
.
detail
.
issue
).
toEqual
({});
done
();
});
});
it
(
'
does not set detail issue if showDetail is false after mouseup
'
,
()
=>
{
it
(
'
does not set detail issue if showDetail is false after mouseup
'
,
()
=>
{
triggerEvent
(
'
mouseup
'
);
triggerEvent
(
'
mouseup
'
);
...
...
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