Fixed dropdowns
authorAlexander Ebert <ebert@woltlab.com>
Fri, 6 Jun 2014 10:40:42 +0000 (12:40 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 6 Jun 2014 10:40:42 +0000 (12:40 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js
wcfsetup/install/files/js/3rdParty/redactor/plugins/wfontcolor.js

index 2ec03941e9619cfc0dbebe42c5fe61c253d8f660..d03a6ee914d24bbf2dda4d940e6d54350fd8c54b 100644 (file)
@@ -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;
        },
        
        /**
index f2468f12b3f26b22c739aca2a5f8b2fe6ee403c2..610363ac1ad676a13539ca5a129ee25659075f9a 100644 (file)
@@ -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;
        },
        
        /**