Redactor now appears the same in WYSIWYG/source mode
authorAlexander Ebert <ebert@woltlab.com>
Fri, 28 Mar 2014 20:58:31 +0000 (21:58 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 28 Mar 2014 20:58:31 +0000 (21:58 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js
wcfsetup/install/files/style/icon.less
wcfsetup/install/files/style/message.less

index 48d53ec53895ff740e6d7b609713b2f12764b2bd..747f93df8a59e847e5af1fc313219346df0ad086 100644 (file)
@@ -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');
                }
        },
        
index f251fa7d06cc7b1389f7c28831037f73c6f070f1..4f6bf590decde792632693828a689c5452b03b8d 100644 (file)
@@ -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',
index 1fedbef2b5e34bdc950cd02dd7729cf78ef83725..431c045a10005c12c00add6f7e61581ac2373184 100644 (file)
@@ -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);
+               };
        },
        
        /**
index 04575217d2bf10b1e221e9e59db6afbc5d6274d5..ee9061d5292bcc7defd0d12ba4034166d4c73918 100644 (file)
@@ -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; }
index cd0a64fadae0d64024d2ce2107ca7cdcbc614f86..383ad85302ded68f4125bb22993e6890e67b8c17 100644 (file)
@@ -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;