From c947cf5f0b4529048bb4e2394e0075fc98f3abd6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 8 Feb 2017 16:18:22 +0100 Subject: [PATCH] Adjustments for renamed redactor editor class --- .../files/js/3rdParty/redactor2/plugins/WoltLabButton.js | 3 +++ wcfsetup/install/files/js/WCF.Message.js | 2 +- .../files/js/WoltLabSuite/Core/Ui/Message/InlineEditor.js | 2 +- wcfsetup/install/files/style/bbcode/code.scss | 2 +- wcfsetup/install/files/style/bbcode/spoiler.scss | 2 +- wcfsetup/install/files/style/ui/redactor.scss | 6 +++--- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js index 41370b0a07..a46c888a25 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js @@ -5,6 +5,9 @@ $.Redactor.prototype.WoltLabButton = function() { return { init: function() { + // tooltips are handled on our own + this.button.buildButtonTooltip = function () {}; + // add custom buttons var button, buttonName, i, length; //noinspection JSUnresolvedVariable diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index cdd5a38526..7fc5bfd961 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -1604,7 +1604,7 @@ WCF.Message.Quote.Manager = Class.extend({ */ _click: function() { var editor = document.activeElement; - if (editor.classList.contains('redactor-editor')) { + if (editor.classList.contains('redactor-layer')) { $('#' + elData(editor, 'element-id')).redactor('selection.save'); } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor.js index 8387330230..ae39c32867 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor.js @@ -649,7 +649,7 @@ define( _ajaxFailure: function(data) { var elementData = this._elements.get(this._activeElement); - var editor = elBySel('.redactor-editor', elementData.messageBodyEditor); + var editor = elBySel('.redactor-layer', elementData.messageBodyEditor); // handle errors occurring on editor load if (editor === null) { diff --git a/wcfsetup/install/files/style/bbcode/code.scss b/wcfsetup/install/files/style/bbcode/code.scss index c7d0c8c02f..9173260184 100644 --- a/wcfsetup/install/files/style/bbcode/code.scss +++ b/wcfsetup/install/files/style/bbcode/code.scss @@ -1,4 +1,4 @@ -.redactor-editor pre { +.redactor-layer pre { background-color: rgb(255, 255, 255) !important; box-shadow: 0 0 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24); border-radius: 2px; diff --git a/wcfsetup/install/files/style/bbcode/spoiler.scss b/wcfsetup/install/files/style/bbcode/spoiler.scss index 2aabf6715b..3cff791f03 100644 --- a/wcfsetup/install/files/style/bbcode/spoiler.scss +++ b/wcfsetup/install/files/style/bbcode/spoiler.scss @@ -1,4 +1,4 @@ -.redactor-editor woltlab-spoiler { +.redactor-layer woltlab-spoiler { background-color: $wcfContentBackground; box-shadow: 0 0 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24); border-radius: 2px; diff --git a/wcfsetup/install/files/style/ui/redactor.scss b/wcfsetup/install/files/style/ui/redactor.scss index f4e0526c06..87214daa51 100644 --- a/wcfsetup/install/files/style/ui/redactor.scss +++ b/wcfsetup/install/files/style/ui/redactor.scss @@ -23,7 +23,7 @@ } } -.redactor-editor { +.redactor-layer { border: 1px solid $wcfContentBorderInner; border-top-width: 0; max-height: 500px; @@ -145,7 +145,7 @@ /* disable auto zoom in mobile safari */ @include screen-md-down { - .redactor-editor { + .redactor-layer { font-size: 16px; max-height: 500px; } @@ -561,7 +561,7 @@ top: 0; z-index: 310; - .redactor-editor { + .redactor-layer { max-height: none !important; min-height: 0 !important; } -- 2.20.1