Fixed toolbar behavior in source mode
authorAlexander Ebert <ebert@woltlab.com>
Thu, 19 Jan 2017 10:10:15 +0000 (11:10 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 19 Jan 2017 10:16:35 +0000 (11:16 +0100)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js
wcfsetup/install/files/style/ui/redactor.scss

index 7f2e86d5d01d21f310867bc898778c40679f15ce..943eed8e4cd361c22f11ced58940af7c169b4042 100644 (file)
@@ -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');
index 2384b5adf6b838619a7eac671f7bc0dd73c0d698..f4e0526c06d412a593c42c86b0c15e141075abb6 100644 (file)
                                background-color: transparent !important;
                                color: $wcfButtonDisabledText !important;
                                cursor: default;
+                               pointer-events: none;
                        }
                        
                        &.redactor-act,