From 357b5f0b2ee30bd2fbc90cdddd1a7c6c4b8d54d2 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 19 Jan 2017 11:10:15 +0100 Subject: [PATCH] Fixed toolbar behavior in source mode --- .../files/js/3rdParty/redactor2/plugins/WoltLabObserve.js | 6 ++++-- wcfsetup/install/files/style/ui/redactor.scss | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) 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, -- 2.20.1