Commit abf9a13d authored by Randall Leeds's avatar Randall Leeds

remove dependency on $route for showEditor

parent 37fd797f
...@@ -355,13 +355,13 @@ class Hypothesis extends Annotator ...@@ -355,13 +355,13 @@ class Hypothesis extends Annotator
showEditor: (annotation) => showEditor: (annotation) =>
this.show() this.show()
@element.injector().invoke [ @element.injector().invoke [
'$location', '$rootScope', '$route', 'drafts' '$location', '$rootScope', 'drafts'
($location, $rootScope, $route, drafts) => ($location, $rootScope, drafts) =>
@ongoing_edit = annotation @ongoing_edit = annotation
unless this.plugins.Auth? and this.plugins.Auth.haveValidToken() unless this.plugins.Auth? and this.plugins.Auth.haveValidToken()
$route.current.locals.$scope.$apply -> $rootScope.$apply ->
$route.current.locals.$scope.$emit 'showAuth', true $rootScope.$broadcast 'showAuth', true
for p in @providers for p in @providers
p.channel.notify method: 'onEditorHide' p.channel.notify method: 'onEditorHide'
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment