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
4037fad2
Commit
4037fad2
authored
Aug 19, 2014
by
Aron Carroll
Committed by
Randall Leeds
Aug 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add citation to the annotation cards
parent
076fbaa6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
controllers.coffee
h/static/scripts/controllers.coffee
+1
-1
annotation.coffee
h/static/scripts/directives/annotation.coffee
+17
-0
threads.scss
h/static/styles/threads.scss
+5
-0
No files found.
h/static/scripts/controllers.coffee
View file @
4037fad2
...
...
@@ -8,6 +8,7 @@ imports = [
'h.searchfilters'
]
class
App
this
.
$inject
=
[
'$element'
,
'$location'
,
'$q'
,
'$rootScope'
,
'$route'
,
'$scope'
,
'$timeout'
,
...
...
@@ -455,7 +456,6 @@ class App
$scope
.
socialView
=
annotator
.
socialView
class
Editor
this
.
$inject
=
[
'$location'
,
'$routeParams'
,
'$sce'
,
'$scope'
,
...
...
h/static/scripts/directives/annotation.coffee
View file @
4037fad2
...
...
@@ -5,6 +5,14 @@ imports = [
]
# Use an anchor tag to extract the
extractURIComponent
=
(
uri
,
component
)
->
unless
extractURIComponent
.
a
extractURIComponent
.
a
=
document
.
createElement
(
'a'
)
extractURIComponent
.
a
.
href
=
uri
extractURIComponent
.
a
[
component
]
class
Annotation
this
.
$inject
=
[
'$element'
,
'$location'
,
'$rootScope'
,
'$sce'
,
'$scope'
,
'$timeout'
,
...
...
@@ -16,10 +24,19 @@ class Annotation
$window
,
annotator
,
baseURI
,
drafts
)
->
model
=
$scope
.
model
{
plugins
,
threading
}
=
annotator
$scope
.
action
=
'create'
$scope
.
editing
=
false
if
model
.
document
and
model
.
target
.
length
domain
=
extractURIComponent
(
model
.
uri
,
'hostname'
)
$scope
.
document
=
uri
:
model
.
uri
domain
:
domain
title
:
model
.
document
.
title
or
domain
$scope
.
cancel
=
(
$event
)
->
$event
?
.
stopPropagation
()
$scope
.
editing
=
false
...
...
h/static/styles/threads.scss
View file @
4037fad2
...
...
@@ -108,3 +108,8 @@ $threadexp-width: .6em;
}
}
}
.annotation-citation-domain
{
color
:
$gray-light
;
font-style
:
italic
;
}
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