Fixed dropdown menu rendering of i18n input fields
authorAlexander Ebert <ebert@woltlab.com>
Sun, 18 Nov 2012 22:44:54 +0000 (23:44 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 18 Nov 2012 22:44:54 +0000 (23:44 +0100)
Fixes #907

wcfsetup/install/files/js/WCF.js

index 3d5ee543318cc399739b49e91ad61ccada10c500..6ac986746c297c021efe76d466af7ea12626e181 100755 (executable)
@@ -2453,7 +2453,7 @@ WCF.MultipleLanguageInput = Class.extend({
                this._element.wrap('<div class="dropdown preInput" />');
                var $wrapper = this._element.parent();
                var $button = $('<p class="button dropdownToggle"><span>' + WCF.Language.get('wcf.global.button.disabledI18n') + '</span></p>').prependTo($wrapper);
-               $button.data('toggle', $wrapper.wcfIdentify()).click($.proxy(this._enable, this));
+               $button.data('target', $wrapper.wcfIdentify()).click($.proxy(this._enable, this));
                
                // insert list
                this._list = $('<ul class="dropdownMenu"></ul>').insertAfter($button);
@@ -2464,7 +2464,7 @@ WCF.MultipleLanguageInput = Class.extend({
                }
                else {
                        $button.addClass('dropdownCaption');
-                       this._element.css('height', $button.outerHeight());
+                       this._element.css('height', $wrapper.outerHeight());
                }
                
                // insert available languages
@@ -2516,11 +2516,9 @@ WCF.MultipleLanguageInput = Class.extend({
        _enable: function(event) {
                if (!this._isEnabled) {
                        var $button = $(event.currentTarget);
-                       if ($button.hasClass('dropdownCaptionTextarea')) {
-                               $button.next('.dropdownMenu').css({
-                                       top: ($button.outerHeight() - 1) + 'px'
-                               });
-                       }
+                       $button.next('.dropdownMenu').css({
+                               top: ($button.outerHeight() - 1) + 'px'
+                       });
                        
                        if ($button.getTagName() === 'p') {
                                $button = $button.children('span:eq(0)');