From e552e10bb1799a7caaafa4dda5714287365105b3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 6 Jun 2014 12:40:42 +0200 Subject: [PATCH] Fixed dropdowns --- .../install/files/js/3rdParty/redactor/plugins/wbbcode.js | 6 ++++-- .../files/js/3rdParty/redactor/plugins/wfontcolor.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 2ec03941e9..d03a6ee914 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -12,12 +12,12 @@ RedactorPlugins.wbbcode = { * Initializes the RedactorPlugins.wbbcode plugin. */ init: function() { - this._createSmileyDropdown(); - + var $dropdown = this._createSmileyDropdown(); this.buttonReplace('smiley', 'wsmiley', 'Smiley', $.proxy(function(btnName, $button, btnObject, e) { this.dropdownShow(e, btnName); }, this)); + this.buttonGet('wsmiley').data('dropdown', $dropdown); this.buttonAwesome('wsmiley', 'fa-smile-o'); this.opts.initCallback = $.proxy(function() { @@ -44,6 +44,8 @@ RedactorPlugins.wbbcode = { } $(this.$toolbar).append($dropdown); + + return $dropdown; }, /** diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js index f2468f12b3..610363ac1a 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js @@ -12,12 +12,12 @@ RedactorPlugins.wfontcolor = { * Initializes the RedactorPlugins.wfontcolor plugin. */ init: function() { - this._createFontColorDropdown(); + var $dropdown = this._createFontColorDropdown(); this.buttonReplace('fontcolor', 'fontcolor', this.opts.curLang.fontcolor, $.proxy(function(btnName, $button, btnObject, e) { this.dropdownShow(e, btnName); }, this)); - //this.buttonAwesome('fontcolor', 'fa-font'); + this.buttonGet('fontcolor').data('dropdown', $dropdown); }, /** @@ -46,6 +46,8 @@ RedactorPlugins.wfontcolor = { $dropdown.append($elNone); $(this.$toolbar).append($dropdown); + + return $dropdown; }, /** -- 2.20.1