Commit b11a90ae authored by Randall Leeds's avatar Randall Leeds

fix some problems introduced by my twiddling

parent 81b4c3fb
......@@ -283,7 +283,7 @@ class Annotation
$scope.thread = threading.getContainer id
# Check if this is a brand new annotation
annotation = $scope.thread.message?.annotation
annotation = $scope.thread.message
if annotation? and drafts.contains annotation
$scope.editing = true
......@@ -300,7 +300,6 @@ class Annotation
$scope.shared = not $scope.shared
$element.find('.share-dialog').slideToggle()
console.log $scope.shared
class Editor
this.$inject = ['$location', '$routeParams', '$scope', 'annotator']
......@@ -380,7 +379,7 @@ class Viewer
if $routeParams.id? and annotator.threading.idTable[$routeParams.id]?
$scope.detail = true
$scope.thread = annotator.threading.getContainer $routeParams.id
$scope.focus $scope.thread.message?.annotation
$scope.focus $scope.thread.message?
else
$scope.detail = false
$scope.thread = null
......
......@@ -247,6 +247,7 @@ class Hypothesis extends Annotator
annotation
showViewer: (annotations=[]) =>
this.show()
@element.injector().invoke [
'$location', '$rootScope',
($location, $rootScope) ->
......@@ -254,10 +255,10 @@ class Hypothesis extends Annotator
$location.path('/viewer').replace()
$rootScope.$digest()
]
this.show()
this
showEditor: (annotation) =>
this.show()
@element.injector().invoke [
'$location', '$rootScope', '$route'
($location, $rootScope, $route) =>
......@@ -279,7 +280,6 @@ class Hypothesis extends Annotator
if $route.current.controller is 'EditorController'
$route.current.locals.$scope.$apply (s) -> s.annotation = annotation
]
this.show()
this
show: =>
......
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