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
0fd2fcff
Commit
0fd2fcff
authored
Oct 23, 2013
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always pass edits via ongoing_edit
parent
51c56980
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
controllers.coffee
h/js/controllers.coffee
+5
-0
services.coffee
h/js/services.coffee
+2
-2
No files found.
h/js/controllers.coffee
View file @
0fd2fcff
...
...
@@ -652,6 +652,7 @@ class Editor
this
.
$inject
=
[
'$location'
,
'$routeParams'
,
'$scope'
,
'annotator'
]
constructor
:
(
$location
,
$routeParams
,
$scope
,
annotator
)
->
{
providers
}
=
annotator
save
=
->
$location
.
path
(
'/viewer'
).
search
(
'id'
,
$scope
.
annotation
.
id
).
replace
()
for
p
in
providers
...
...
@@ -679,6 +680,10 @@ class Editor
annotator
.
unsubscribe
'annotationCreated'
,
save
annotator
.
unsubscribe
'annotationDeleted'
,
cancel
$scope
.
annotation
=
annotator
.
ongoing_edit
annotator
.
ongoing_edit
=
null
class
Viewer
this
.
$inject
=
[
...
...
h/js/services.coffee
View file @
0fd2fcff
...
...
@@ -320,12 +320,13 @@ class Hypothesis extends Annotator
@
element
.
injector
().
invoke
[
'$location'
,
'$rootScope'
,
'$route'
,
'drafts'
(
$location
,
$rootScope
,
$route
,
drafts
)
=>
@
ongoing_edit
=
annotation
unless
this
.
plugins
.
Auth
?
and
this
.
plugins
.
Auth
.
haveValidToken
()
$route
.
current
.
locals
.
$scope
.
$apply
->
$route
.
current
.
locals
.
$scope
.
$emit
'showAuth'
,
true
for
p
in
@
providers
p
.
channel
.
notify
method
:
'onEditorHide'
@
ongoing_edit
=
annotation
return
# Set the path
...
...
@@ -338,7 +339,6 @@ class Hypothesis extends Annotator
drafts
.
add
annotation
# Digest the change
$rootScope
.
annotation
=
annotation
$rootScope
.
$digest
()
]
this
...
...
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