From: Alexander Ebert Date: Fri, 28 Mar 2014 20:58:31 +0000 (+0100) Subject: Redactor now appears the same in WYSIWYG/source mode X-Git-Tag: 2.1.0_Alpha_1~937 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ed8e51541303ff831bc030b2332b4fd41a50d6d;p=GitHub%2FWoltLab%2FWCF.git Redactor now appears the same in WYSIWYG/source mode --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 48d53ec538..747f93df8a 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -107,10 +107,14 @@ RedactorPlugins.wbbcode = { if (this.opts.visual) { this.toggleCode(direct); this._convertFromHtml(); + + this.buttonGet('html').children('i').removeClass('fa-square-o').addClass('fa-square'); } else { this._convertToHtml(); this.toggleVisual(); + + this.buttonGet('html').children('i').removeClass('fa-square').addClass('fa-square-o'); } }, diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js index f251fa7d06..4f6bf590de 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js @@ -27,7 +27,7 @@ RedactorPlugins.wbutton = { var $faIcons = { 'alignment': 'align-left', 'deleted': 'strikethrough', - 'html': 'file-o', + 'html': 'square-o', 'image': 'picture-o', 'orderedlist': 'list-ol', 'smiley': 'smile-o', diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js index 1fedbef2b5..431c045a10 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js @@ -33,6 +33,15 @@ RedactorPlugins.wmonkeypatch = { $mpBuildEventKeydown.call(self, e); } }; + + var $mpToggleCode = this.toggleCode; + this.toggleCode = function(direct) { + var $height = self.normalize(self.$editor.css('height')); + + $mpToggleCode.call(self, direct); + + self.$source.height($height); + }; }, /** diff --git a/wcfsetup/install/files/style/icon.less b/wcfsetup/install/files/style/icon.less index 04575217d2..ee9061d529 100644 --- a/wcfsetup/install/files/style/icon.less +++ b/wcfsetup/install/files/style/icon.less @@ -700,8 +700,7 @@ a > span.fa:not(.pointer) { .icon-upload-alt:before, .fa-upload:before { content: @upload-alt; } .icon-lemon:before, .fa-lemon-o:before { content: @lemon; } .icon-phone:before, .fa-phone:before { content: @phone; } -.icon-unchecked:before, .fa-unchecked:before, -.icon-check-empty:before, .fa-square-o:before { content: @check-empty; } +.icon-unchecked:before, .fa-unchecked:before, .icon-check-empty:before { content: @check-empty; } .icon-bookmark-empty:before, .fa-bookmark-o:before { content: @bookmark-empty; } .icon-phone-sign:before, .fa-phone-square:before { content: @phone-sign; } .icon-twitter:before, .fa-twitter:before { content: @twitter; } @@ -813,7 +812,7 @@ a > span.fa:not(.pointer) { .icon-folder-close-alt:before, .fa-folder-close-o:before { content: @folder-close-alt; } .icon-folder-open-alt:before, .fa-folder-open-o:before { content: @folder-open-alt; } .icon-expand-alt:before, .fa-expand-o:before { content: @expand-alt; } -.icon-collapse-alt:before, .fa-square-o:before { content: @collapse-alt; } +.icon-collapse-alt:before, .fa-square-o:before { content: @check-empty; } .icon-smile:before, .fa-smile-o:before { content: @smile; } .icon-frown:before, .fa-frown-o:before { content: @frown; } .icon-meh:before, .fa-meh-o:before { content: @meh; } diff --git a/wcfsetup/install/files/style/message.less b/wcfsetup/install/files/style/message.less index cd0a64fada..383ad85302 100644 --- a/wcfsetup/install/files/style/message.less +++ b/wcfsetup/install/files/style/message.less @@ -905,6 +905,16 @@ li:nth-child(2n+1) .message { /* redactor fixes */ .redactor_editor { + padding: 10px !important; + + & + textarea { + background-color: rgba(255, 255, 255, 1) !important; + border: 1px solid rgba(238, 238, 238, 1) !important; + color: @wcfColor !important; + padding: 10px !important; + z-index: 1 !important; + } + ul, ol { .nativeList; @@ -938,11 +948,16 @@ li:nth-child(2n+1) .message { .textShadow(@wcfButtonBackgroundColor); - &> i:before { - color: rgba(51, 51, 51, 1) !important; + &> i { + height: 14px; + width: 12px; + + &:before { + color: rgba(51, 51, 51, 1) !important; + } } - &:hover { + &:not(.redactor_button_disabled):hover { background-color: rgba(204, 204, 204, 1) !important; color: rgba(51, 51, 51, 1) !important;