From: Alexander Ebert Date: Thu, 19 Jan 2017 10:10:15 +0000 (+0100) Subject: Fixed toolbar behavior in source mode X-Git-Tag: 3.0.1~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=357b5f0b2ee30bd2fbc90cdddd1a7c6c4b8d54d2;p=GitHub%2FWoltLab%2FWCF.git Fixed toolbar behavior in source mode --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js index 7f2e86d5d0..943eed8e4c 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js @@ -54,12 +54,14 @@ $.Redactor.prototype.WoltLabObserve = function() { return; } + var isSource = this.WoltLabSource.isActive(); + // disable line if (this.utils.isCurrentOrParentHeader() || this.utils.isCurrentOrParent(['table', 'pre', 'blockquote', 'li'])) { this.button.disable('horizontalrule'); } - else + else if (!isSource) { this.button.enable('horizontalrule'); } @@ -69,7 +71,7 @@ $.Redactor.prototype.WoltLabObserve = function() { this.button.disable('spoiler'); this.button.disable('woltlabQuote'); } - else { + else if (!isSource) { this.button.enable('code'); this.button.enable('spoiler'); this.button.enable('woltlabQuote'); diff --git a/wcfsetup/install/files/style/ui/redactor.scss b/wcfsetup/install/files/style/ui/redactor.scss index 2384b5adf6..f4e0526c06 100644 --- a/wcfsetup/install/files/style/ui/redactor.scss +++ b/wcfsetup/install/files/style/ui/redactor.scss @@ -172,6 +172,7 @@ background-color: transparent !important; color: $wcfButtonDisabledText !important; cursor: default; + pointer-events: none; } &.redactor-act,