Fix confirm on disabled edit mode lighbox in wiki pages

stable
David Barragán Merino 2016-05-10 09:36:02 +02:00
parent c20ff9d368
commit bdb4eab44a
1 changed files with 7 additions and 6 deletions

View File

@ -292,10 +292,11 @@ EditableWikiContentDirective = ($window, $document, $repo, $confirm, $loading, $
$scope.$apply(cancelEdition)
$el.on "keydown", "textarea", (event) ->
if event.keyCode == 27
return if event.keyCode != 27
$scope.$applyAsync () ->
confirmTitle = $translate.instant("COMMON.CONFIRM_CLOSE_EDIT_MODE")
$confirm.ask(confirmTitle).then (askResponse) ->
title = $translate.instant("COMMON.CONFIRM_CLOSE_EDIT_MODE_TITLE")
message = $translate.instant("COMMON.CONFIRM_CLOSE_EDIT_MODE_MESSAGE")
$confirm.ask(title, null, message).then (askResponse) ->
cancelEdition()
askResponse.finish()