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
fd315c20
Commit
fd315c20
authored
Jun 14, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove href link from pending references with a empty path
parent
0269d05c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
app/assets/javascripts/issuable/related_issues/components/issue_token.vue
...cripts/issuable/related_issues/components/issue_token.vue
+10
-3
app/assets/stylesheets/pages/issues.scss
app/assets/stylesheets/pages/issues.scss
+6
-0
spec/javascripts/issuable/related_issues/components/issue_token_spec.js
...ts/issuable/related_issues/components/issue_token_spec.js
+6
-1
No files found.
app/assets/javascripts/issuable/related_issues/components/issue_token.vue
View file @
fd315c20
...
...
@@ -50,6 +50,12 @@ export default {
hasTitle
()
{
return
this
.
title
.
length
>
0
;
},
computedLinkElementType
()
{
return
this
.
path
.
length
>
0
?
'
a
'
:
'
span
'
;
},
computedPath
()
{
return
this
.
path
.
length
?
this
.
path
:
null
;
},
},
methods
:
{
...
...
@@ -79,10 +85,11 @@ export default {
<
template
>
<div
class=
"issue-token"
>
<a
<component
:is=
"this.computedLinkElementType"
ref=
"link"
class=
"issue-token-link"
:href=
"
p
ath"
:href=
"
computedP
ath"
:title=
"title"
data-toggle=
"tooltip"
data-placement=
"top"
>
...
...
@@ -110,7 +117,7 @@ export default {
{{
title
}}
</span>
</span>
</
a
>
</
component
>
<button
ref=
"removeButton"
v-if=
"canRemove"
...
...
app/assets/stylesheets/pages/issues.scss
View file @
fd315c20
...
...
@@ -292,6 +292,12 @@ ul.related-merge-requests > li {
display
:
inline-flex
;
min-width
:
0
;
color
:
$gl-text-color-secondary
;
&
[
href
]
{
color
:
$gl-link-color
;
}
&
:hover
,
&
:focus
{
outline
:
none
;
...
...
spec/javascripts/issuable/related_issues/components/issue_token_spec.js
View file @
fd315c20
...
...
@@ -3,7 +3,7 @@ import eventHub from '~/issuable/related_issues/event_hub';
import
issueToken
from
'
~/issuable/related_issues/components/issue_token.vue
'
;
describe
(
'
IssueToken
'
,
()
=>
{
const
idKey
=
'
200
'
;
const
idKey
=
200
;
const
displayReference
=
'
foo/bar#123
'
;
const
title
=
'
some title
'
;
let
IssueToken
;
...
...
@@ -32,6 +32,11 @@ describe('IssueToken', () => {
it
(
'
shows reference
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
displayReference
);
});
it
(
'
does not link without path specified
'
,
()
=>
{
expect
(
vm
.
$refs
.
link
.
tagName
.
toLowerCase
()).
toEqual
(
'
span
'
);
expect
(
vm
.
$refs
.
link
.
getAttribute
(
'
href
'
)).
toBeNull
();
});
});
describe
(
'
with reference and title supplied
'
,
()
=>
{
...
...
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