From: Alexander Ebert Date: Fri, 6 Jun 2014 12:58:14 +0000 (+0200) Subject: Fixed fontsize and color X-Git-Tag: 2.1.0_Alpha_1~744 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4477f5ef346e8caed8255b1ff8adcde3aff3dc79;p=GitHub%2FWoltLab%2FWCF.git Fixed fontsize and color --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js index 610363ac1a..7598404c4a 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js @@ -36,12 +36,12 @@ RedactorPlugins.wfontcolor = { for (var $i = 0, $length = $colors.length; $i < $length; $i++) { var $color = $colors[$i]; - var $swatch = $('').data('color', $color).css('background-color', $color); + var $swatch = $('').data('color', $color).css('background-color', $color); $dropdown.append($swatch); $swatch.click($.proxy(this._onColorPick, this)); } - var $elNone = $('').html(this.opts.curLang.none).data('color', 'none'); + var $elNone = $('').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 diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontsize.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontsize.js index 870465487b..a8144b3e67 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontsize.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontsize.js @@ -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'); } }; }