Commit 29b98048 authored by Gergely Ujvari's avatar Gergely Ujvari

AppController listens to 'beforeAnnotationCreated'

By doing that it catches newly created annotations and clear the current
selection/search result for the newly created card to be visible.

Fix #1979
parent ecf40206
...@@ -20,13 +20,15 @@ class AnnotationUIController ...@@ -20,13 +20,15 @@ class AnnotationUIController
class AppController class AppController
this.$inject = [ this.$inject = [
'$controller', '$document', '$location', '$route', '$scope', '$window', '$controller', '$document', '$location', '$rootScope', '$route', '$scope',
'$window',
'auth', 'drafts', 'identity', 'auth', 'drafts', 'identity',
'permissions', 'streamer', 'annotationUI', 'permissions', 'streamer', 'annotationUI',
'annotationMapper', 'threading' 'annotationMapper', 'threading'
] ]
constructor: ( constructor: (
$controller, $document, $location, $route, $scope, $window, $controller, $document, $location, $rootScope, $route, $scope,
$window,
auth, drafts, identity, auth, drafts, identity,
permissions, streamer, annotationUI, permissions, streamer, annotationUI,
annotationMapper, threading annotationMapper, threading
...@@ -103,6 +105,9 @@ class AppController ...@@ -103,6 +105,9 @@ class AppController
# Reload the view. # Reload the view.
$route.reload() $route.reload()
$rootScope.$on 'beforeAnnotationCreated', ->
$scope.clearSelection()
$scope.login = -> $scope.login = ->
$scope.dialog.visible = true $scope.dialog.visible = true
identity.request {oncancel} identity.request {oncancel}
......
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