close edit view when role changes

stable
Juanfran 2014-10-23 11:04:15 +02:00 committed by Xavier Julián
parent ebe5f4a4d6
commit b4bc65a00d
1 changed files with 4 additions and 0 deletions

View File

@ -154,6 +154,10 @@ EditRoleDirective = ($repo, $confirm) ->
else if event.keyCode == 27 # ESC key
toggleView()
$scope.$on "role:changed", ->
if $el.find('.edit-role').is(":visible")
toggleView()
$scope.$on "$destroy", ->
$el.off()