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