prevent wrong call to editableInput in wysiwyg

stable
Juanfran 2017-03-30 08:41:41 +02:00
parent 3af251f081
commit 96057d2ba3
2 changed files with 5 additions and 5 deletions

View File

@ -255,7 +255,7 @@ $qqueue, $repo, $analytics, wikiHistoryService) ->
return if not value
$scope.item = value
$scope.version = value.version
$scope.storageKey = $scope.project.id + "-" + value.id + "-" + $attrs.type
$scope.storageKey = $scope.project.id + "-" + value.id + "-wiki"
$scope.$watch 'project', (project) ->
return if !project

View File

@ -56,7 +56,7 @@ Medium = ($translate, $confirm, $storage, wysiwygService, animationFrame, tgLoad
pre.parentNode.replaceChild(p, pre)
mediumInstance.checkContentChanged(mediumInstance.elements[0])
addCodeBlockAndHightlight = (range, elm) ->
addCodeBlockAndHightlight = (range, mediumInstance) ->
pre = document.createElement('pre')
code = document.createElement('code')
@ -73,7 +73,8 @@ Medium = ($translate, $confirm, $storage, wysiwygService, animationFrame, tgLoad
start.parentNode.insertBefore(pre, start)
refreshCodeBlocks(elm)
refreshCodeBlocks(mediumInstance)
mediumInstance.checkContentChanged(mediumInstance.elements[0])
refreshCodeBlocks = (mediumInstance) ->
return if !mediumInstance
@ -104,8 +105,6 @@ Medium = ($translate, $confirm, $storage, wysiwygService, animationFrame, tgLoad
pre.parentNode.insertBefore(p, pre.nextSibling)
mediumInstance.checkContentChanged(mediumInstance.elements[0])
AlignRightButton = MediumEditor.extensions.button.extend({
name: 'rtl',
init: () ->
@ -297,6 +296,7 @@ Medium = ($translate, $confirm, $storage, wysiwygService, animationFrame, tgLoad
discardLocalStorage()
mediumInstance.trigger('blur', {}, editorMedium[0])
$scope.outdated = false
refreshCodeBlocks(mediumInstance)
$scope.onCancel()