[Backport] Fix confirm on disabled edit mode lighbox in wiki pages
parent
2ad4c13b93
commit
6e0fce561f
|
@ -293,10 +293,11 @@ EditableWikiContentDirective = ($window, $document, $repo, $confirm, $loading, $
|
||||||
$scope.$apply(cancelEdition)
|
$scope.$apply(cancelEdition)
|
||||||
|
|
||||||
$el.on "keydown", "textarea", (event) ->
|
$el.on "keydown", "textarea", (event) ->
|
||||||
if event.keyCode == 27
|
return if event.keyCode != 27
|
||||||
$scope.$applyAsync () ->
|
$scope.$applyAsync () ->
|
||||||
confirmTitle = $translate.instant("COMMON.CONFIRM_CLOSE_EDIT_MODE")
|
title = $translate.instant("COMMON.CONFIRM_CLOSE_EDIT_MODE_TITLE")
|
||||||
$confirm.ask(confirmTitle).then (askResponse) ->
|
message = $translate.instant("COMMON.CONFIRM_CLOSE_EDIT_MODE_MESSAGE")
|
||||||
|
$confirm.ask(title, null, message).then (askResponse) ->
|
||||||
cancelEdition()
|
cancelEdition()
|
||||||
askResponse.finish()
|
askResponse.finish()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue