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
869f97d4
Commit
869f97d4
authored
May 30, 2013
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #364
parent
93bc8be3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
controllers.coffee
h/js/controllers.coffee
+5
-0
host.coffee
h/js/host.coffee
+9
-0
services.coffee
h/js/services.coffee
+10
-1
No files found.
h/js/controllers.coffee
View file @
869f97d4
...
...
@@ -171,6 +171,11 @@ class App
delete
annotator
.
plugins
.
Store
annotator
.
addStore
Store
.
options
if
newValue
?
and
annotator
.
ongoing_edit
$timeout
=>
annotator
.
clickAdder
()
,
500
$scope
.
$watch
'frame.visible'
,
(
newValue
)
->
if
newValue
annotator
.
show
()
...
...
h/js/host.coffee
View file @
869f97d4
...
...
@@ -160,6 +160,10 @@ class Annotator.Host extends Annotator
@
drag
.
last
=
null
)
.
bind
(
'adderClick'
,
=>
@
onAdderClick
@
event
)
.
bind
(
'getDocumentInfo'
,
=>
return
{
uri
:
@
plugins
.
Document
.
uri
()
...
...
@@ -273,3 +277,8 @@ class Annotator.Host extends Annotator
@
api
.
notify
method
:
'addToken'
params
:
token
#Save the event for restarting edit
onAdderClick
:
(
event
)
=>
@
event
=
event
super
\ No newline at end of file
h/js/services.coffee
View file @
869f97d4
...
...
@@ -43,6 +43,7 @@ class Hypothesis extends Annotator
# Internal state
dragging
:
false
# * To enable dragging only when we really want to
ongoing_edit
:
false
# * Is there an interrupted edit by login
# Here as a noop just to make the Permissions plugin happy
# XXX: Change me when Annotator stops assuming things about viewers
...
...
@@ -239,6 +240,10 @@ class Hypothesis extends Annotator
]
this
clickAdder
:
=>
@
provider
.
notify
method
:
'adderClick'
showEditor
:
(
annotation
)
=>
this
.
show
()
@
element
.
injector
().
invoke
[
...
...
@@ -247,6 +252,8 @@ class Hypothesis extends Annotator
unless
this
.
plugins
.
Auth
?
and
this
.
plugins
.
Auth
.
haveValidToken
()
$route
.
current
.
locals
.
$scope
.
$apply
->
$route
.
current
.
locals
.
$scope
.
$emit
'showAuth'
,
true
@
provider
.
notify
method
:
'onEditorHide'
@
ongoing_edit
=
true
return
# Set the path
...
...
@@ -254,10 +261,12 @@ class Hypothesis extends Annotator
id
:
annotation
.
id
action
:
'create'
$location
.
path
(
'/editor'
).
search
(
search
)
# Digest the change
$rootScope
.
$digest
()
@
ongoing_edit
=
false
# Push the annotation into the editor scope
if
$route
.
current
.
controller
is
'EditorController'
$route
.
current
.
locals
.
$scope
.
$apply
(
s
)
->
s
.
annotation
=
annotation
...
...
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