fix #2369 - confirm cancel in wiki
parent
5eee1458c8
commit
3294f6833b
|
@ -239,9 +239,12 @@ EditableWikiContentDirective = ($window, $document, $repo, $confirm, $loading, $
|
||||||
cancelEdition = ->
|
cancelEdition = ->
|
||||||
return if not $model.$modelValue.id
|
return if not $model.$modelValue.id
|
||||||
|
|
||||||
|
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) ->
|
||||||
$model.$modelValue.revert()
|
$model.$modelValue.revert()
|
||||||
|
|
||||||
switchToReadMode()
|
switchToReadMode()
|
||||||
|
askResponse.finish()
|
||||||
|
|
||||||
getSelectedText = ->
|
getSelectedText = ->
|
||||||
if $window.getSelection
|
if $window.getSelection
|
||||||
|
|
Loading…
Reference in New Issue