From: Alexander Ebert Date: Thu, 5 Jan 2017 12:54:52 +0000 (+0100) Subject: Fixed active states X-Git-Tag: 3.0.0~45 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=102748f2434cecb3542d0c91ca11b5c40f6237d8;p=GitHub%2FWoltLab%2FWCF.git Fixed active states --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js index 807758d505..7f2e86d5d0 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js @@ -64,6 +64,17 @@ $.Redactor.prototype.WoltLabObserve = function() { this.button.enable('horizontalrule'); } + if (this.utils.isCurrentOrParent(['table', 'li'])) { + this.button.disable('code'); + this.button.disable('spoiler'); + this.button.disable('woltlabQuote'); + } + else { + this.button.enable('code'); + this.button.enable('spoiler'); + this.button.enable('woltlabQuote'); + } + // WoltLab modification: we know that there will be quite a few // active button states, so we'll simply check all ancestors one // by one instead of searching the DOM over and over again