fix #2369 - confirm cancel in wiki

stable
Juanfran 2016-07-04 13:38:34 +02:00
parent 5eee1458c8
commit 3294f6833b
1 changed files with 6 additions and 3 deletions

View File

@ -239,9 +239,12 @@ EditableWikiContentDirective = ($window, $document, $repo, $confirm, $loading, $
cancelEdition = ->
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()
switchToReadMode()
askResponse.finish()
getSelectedText = ->
if $window.getSelection