Fixed fontsize and color
authorAlexander Ebert <ebert@woltlab.com>
Fri, 6 Jun 2014 12:58:14 +0000 (14:58 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 6 Jun 2014 12:58:14 +0000 (14:58 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js
wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontsize.js

index 610363ac1ad676a13539ca5a129ee25659075f9a..7598404c4a34ff56fc7db98d602195f87f526a38 100644 (file)
@@ -36,12 +36,12 @@ RedactorPlugins.wfontcolor = {
                for (var $i = 0, $length = $colors.length; $i < $length; $i++) {
                        var $color = $colors[$i];
                        
-                       var $swatch = $('<a />').data('color', $color).css('background-color', $color);
+                       var $swatch = $('<a href="#" />').data('color', $color).css('background-color', $color);
                        $dropdown.append($swatch);
                        $swatch.click($.proxy(this._onColorPick, this));
                }
                
-               var $elNone = $('<a />').html(this.opts.curLang.none).data('color', 'none');
+               var $elNone = $('<a href="#" />').html(this.opts.curLang.none).data('color', 'none');
                $elNone.click($.proxy(this._onColorPick, this));
                
                $dropdown.append($elNone);
@@ -58,10 +58,6 @@ RedactorPlugins.wfontcolor = {
        _onColorPick: function(event) {
                event.preventDefault();
                
-               //this.bufferSet();
-               
-               //this.$editor.focus();
-               
                var $color = $(event.currentTarget).data('color');
                if ($color === 'none') {
                        this.inlineRemoveStyle('color');
@@ -69,8 +65,5 @@ RedactorPlugins.wfontcolor = {
                else {
                        this.inlineSetStyle('color', $color);
                }
-               
-               /*if (this.opts.air) this.$air.fadeOut(100);
-               this.sync();*/
        }
 };
\ No newline at end of file
index 870465487bbd8b43589cc64f1a14f957625f0bd1..a8144b3e6730c85fd6e9f393e182eb349d4ba21f 100644 (file)
@@ -19,8 +19,9 @@ RedactorPlugins.wfontsize = {
                        $dropdown['fontSize' + $i] = {
                                title: $fontSize,
                                className: 'wfontsize-' + $fontSize,
-                               callback: function() {
-                                       self.inlineSetStyle('font-size', $fontSize + 'pt');
+                               fontSize: $fontSize,
+                               callback: function(name, button, object, event) {
+                                       self.inlineSetStyle('font-size', object.fontSize + 'pt');
                                }
                        };
                }