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
e3c473c1
Commit
e3c473c1
authored
Mar 24, 2015
by
csillag
Committed by
Randall Leeds
Mar 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide orphan annotations in the sidebar
parent
5b861c1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
3 deletions
+9
-3
monkey.coffee
h/static/scripts/annotator/monkey.coffee
+5
-1
cross-frame.coffee
h/static/scripts/cross-frame.coffee
+1
-1
widget-controller.coffee
h/static/scripts/widget-controller.coffee
+2
-0
viewer.html
h/templates/client/viewer.html
+1
-1
No files found.
h/static/scripts/annotator/monkey.coffee
View file @
e3c473c1
...
@@ -16,6 +16,7 @@ Annotator.prototype.setupAnnotation = (annotation) ->
...
@@ -16,6 +16,7 @@ Annotator.prototype.setupAnnotation = (annotation) ->
@
selectedTargets
=
[]
@
selectedTargets
=
[]
annotation
.
anchors
=
[]
annotation
.
anchors
=
[]
hasAnchor
=
false
for
t
in
annotation
.
target
?
[]
for
t
in
annotation
.
target
?
[]
try
try
...
@@ -27,13 +28,16 @@ Annotator.prototype.setupAnnotation = (annotation) ->
...
@@ -27,13 +28,16 @@ Annotator.prototype.setupAnnotation = (annotation) ->
if
anchor
?
if
anchor
?
t
.
diffHTML
=
anchor
.
diffHTML
t
.
diffHTML
=
anchor
.
diffHTML
t
.
diffCaseOnly
=
anchor
.
diffCaseOnly
t
.
diffCaseOnly
=
anchor
.
diffCaseOnly
hasAnchor
=
true
catch
exception
catch
exception
console
.
log
"Error in setupAnnotation for"
,
annotation
.
id
,
console
.
log
"Error in setupAnnotation for"
,
annotation
.
id
,
":"
,
exception
.
stack
?
exception
":"
,
exception
.
stack
?
exception
annotation
if
annotation
.
target
?
.
length
and
not
hasAnchor
annotation
.
$orphan
=
true
annotation
# Override deleteAnnotation to deal with anchors, not highlights.
# Override deleteAnnotation to deal with anchors, not highlights.
Annotator
.
prototype
.
deleteAnnotation
=
(
annotation
)
->
Annotator
.
prototype
.
deleteAnnotation
=
(
annotation
)
->
...
...
h/static/scripts/cross-frame.coffee
View file @
e3c473c1
...
@@ -20,7 +20,7 @@ module.exports = class CrossFrame
...
@@ -20,7 +20,7 @@ module.exports = class CrossFrame
new
Discovery
(
$window
,
options
)
new
Discovery
(
$window
,
options
)
createAnnotationSync
=
->
createAnnotationSync
=
->
whitelist
=
[
'$highlight'
,
'target'
,
'document'
,
'uri'
]
whitelist
=
[
'$highlight'
,
'
$orphan'
,
'
target'
,
'document'
,
'uri'
]
options
=
options
=
formatter
:
(
annotation
)
->
formatter
:
(
annotation
)
->
formatted
=
{}
formatted
=
{}
...
...
h/static/scripts/widget-controller.coffee
View file @
e3c473c1
...
@@ -70,3 +70,5 @@ module.exports = class WidgetController
...
@@ -70,3 +70,5 @@ module.exports = class WidgetController
$scope
.
hasFocus
=
(
annotation
)
->
$scope
.
hasFocus
=
(
annotation
)
->
!!
(
$scope
.
focusedAnnotations
?
{})[
annotation
?
.
$
$tag
]
!!
(
$scope
.
focusedAnnotations
?
{})[
annotation
?
.
$
$tag
]
$scope
.
notOrphan
=
(
container
)
->
!
container
?
.
message
?
.
$orphan
h/templates/client/viewer.html
View file @
e3c473c1
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
ng-mouseenter=
"focus(child.message)"
ng-mouseenter=
"focus(child.message)"
ng-click=
"scrollTo(child.message)"
ng-click=
"scrollTo(child.message)"
ng-mouseleave=
"focus()"
ng-mouseleave=
"focus()"
ng-repeat=
"child in threadRoot.children | orderBy : sort.predicate"
ng-repeat=
"child in threadRoot.children |
filter:notOrphan |
orderBy : sort.predicate"
ng-show=
"shouldShowThread(child) && (count('edit') || count('match') || !threadFilter.active())"
>
ng-show=
"shouldShowThread(child) && (count('edit') || count('match') || !threadFilter.active())"
>
</li>
</li>
</ul>
</ul>
...
...
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