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
20822425
Commit
20822425
authored
Mar 23, 2015
by
Randall Leeds
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2073 from hypothesis/remove-dead-code
Removed some dead code
parents
a5c9417f
35c612e3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
17 deletions
+1
-17
annotation-ui-service.coffee
h/static/scripts/annotation-ui-service.coffee
+0
-4
annotation-ui-sync.coffee
h/static/scripts/annotation-ui-sync.coffee
+0
-7
controllers.coffee
h/static/scripts/controllers.coffee
+1
-5
host.coffee
h/static/scripts/host.coffee
+0
-1
No files found.
h/static/scripts/annotation-ui-service.coffee
View file @
20822425
...
...
@@ -6,10 +6,6 @@ createAnnotationUI = ->
if
Object
.
keys
(
selection
).
length
then
selection
else
null
{
TOOL_COMMENT
:
'comment'
TOOL_HIGHLIGHT
:
'highlight'
tool
:
'comment'
visibleHighlights
:
false
...
...
h/static/scripts/annotation-ui-sync.coffee
View file @
20822425
...
...
@@ -27,9 +27,6 @@ class AnnotationUISync
toggleAnnotationSelection
:
(
ctx
,
tags
=
[])
->
annotations
=
getAnnotationsByTags
(
tags
)
annotationUI
.
xorSelectedAnnotations
(
annotations
)
setTool
:
(
ctx
,
name
)
->
annotationUI
.
tool
=
name
bridge
.
notify
(
method
:
'setTool'
,
params
:
name
)
setVisibleHighlights
:
(
ctx
,
state
)
->
annotationUI
.
visibleHighlights
=
Boolean
(
state
)
bridge
.
notify
(
method
:
'setVisibleHighlights'
,
params
:
state
)
...
...
@@ -48,10 +45,6 @@ class AnnotationUISync
onConnect
=
(
channel
,
source
)
->
# Allow the host to define its own state
unless
source
is
$window
.
parent
channel
.
notify
method
:
'setTool'
params
:
annotationUI
.
tool
channel
.
notify
method
:
'setVisibleHighlights'
params
:
annotationUI
.
visibleHighlights
...
...
h/static/scripts/controllers.coffee
View file @
20822425
...
...
@@ -66,12 +66,8 @@ class AppController
cleanupAnnotations
=
->
# Clean up any annotations that need to be unloaded.
for
id
,
container
of
$scope
.
threading
.
idTable
when
container
.
message
# Remove annotations not belonging to this user when highlighting.
if
annotationUI
.
tool
is
'highlight'
and
annotation
.
user
!=
auth
.
user
$scope
.
$emit
(
'annotationDeleted'
,
container
.
message
)
drafts
.
remove
annotation
# Remove annotations the user is not authorized to view.
else
if
not
permissions
.
permits
'read'
,
container
.
message
,
auth
.
user
if
not
permissions
.
permits
'read'
,
container
.
message
,
auth
.
user
$scope
.
$emit
(
'annotationDeleted'
,
container
.
message
)
drafts
.
remove
container
.
message
...
...
h/static/scripts/host.coffee
View file @
20822425
...
...
@@ -46,7 +46,6 @@ module.exports = class Annotator.Host extends Annotator.Guest
# Guest is designed to respond to events rather than direct method
# calls. If we call set directly the other plugins will never recieve
# these events and the UI will be out of sync.
this
.
publish
(
'setTool'
,
'comment'
)
this
.
publish
(
'setVisibleHighlights'
,
!!
options
.
showHighlights
)
if
@
plugins
.
BucketBar
?
...
...
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