Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
da2e4c60
Commit
da2e4c60
authored
Feb 22, 2016
by
Nick Stenning
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2993 from hypothesis/fix-tag-links
Fix annotation tag links
parents
0958b019
04e92374
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
annotation-test.js
h/static/scripts/directive/test/annotation-test.js
+16
-0
annotation.html
h/templates/client/annotation.html
+1
-1
No files found.
h/static/scripts/directive/test/annotation-test.js
View file @
da2e4c60
...
@@ -1465,5 +1465,21 @@ describe('annotation', function() {
...
@@ -1465,5 +1465,21 @@ describe('annotation', function() {
});
});
});
});
});
});
describe
(
'tag display'
,
function
()
{
it
(
'displays annotation tags'
,
function
()
{
var
directive
=
createDirective
({
id
:
'1234'
,
tags
:
[
'atag'
]
});
var
links
=
[].
slice
.
apply
(
directive
.
element
[
0
].
querySelectorAll
(
'a'
));
var
tagLinks
=
links
.
filter
(
function
(
link
)
{
return
link
.
textContent
===
'atag'
;
});
assert
.
equal
(
tagLinks
.
length
,
1
);
assert
.
equal
(
tagLinks
[
0
].
href
,
'https://test.hypothes.is/stream?q=tag:atag'
);
});
});
});
});
});
});
h/templates/client/annotation.html
View file @
da2e4c60
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
ng-if=
"(vm.canCollapseBody || vm.form.tags.length) && !vm.editing()"
>
ng-if=
"(vm.canCollapseBody || vm.form.tags.length) && !vm.editing()"
>
<ul
class=
"tag-list"
>
<ul
class=
"tag-list"
>
<li
class=
"tag-item"
ng-repeat=
"tag in vm.form.tags"
>
<li
class=
"tag-item"
ng-repeat=
"tag in vm.form.tags"
>
<a
ng-href=
"
vm.tagStreamURL(tag.text)
"
target=
"_blank"
>
{{tag.text}}
</a>
<a
ng-href=
"
{{vm.tagStreamURL(tag.text)}}
"
target=
"_blank"
>
{{tag.text}}
</a>
</li>
</li>
</ul>
</ul>
<div
class=
"u-stretch"
></div>
<div
class=
"u-stretch"
></div>
...
...
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