Adjusts the height of multilingual input fields
authorMatthias Schmidt <gravatronics@live.com>
Thu, 1 Nov 2012 23:34:16 +0000 (00:34 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 1 Nov 2012 23:34:16 +0000 (00:34 +0100)
This way, button and input field have the same height which looks way better than if the input field isn't high enough.

wcfsetup/install/files/js/WCF.js

index 7cb00fdef91f39df49735a4db31a488657ee6041..ab78fe235114d576afdbee91334379bdc0437819 100755 (executable)
@@ -2315,8 +2315,7 @@ WCF.Language = {
  * @param      object          values
  * @param      object          availableLanguages
  */
-WCF.MultipleLanguageInput = function(elementID, forceSelection, values, availableLanguages) { this.init(elementID, forceSelection, values, availableLanguages); };
-WCF.MultipleLanguageInput.prototype = {
+WCF.MultipleLanguageInput = Class.extend({
        /**
         * list of available languages
         * @var object
@@ -2426,6 +2425,7 @@ WCF.MultipleLanguageInput.prototype = {
                }
                else {
                        $button.addClass('dropdownCaption');
+                       $button.next().css('height', $button.outerHeight());
                }
                
                // insert list
@@ -2627,7 +2627,7 @@ WCF.MultipleLanguageInput.prototype = {
                // remove name attribute to prevent conflict with i18n values
                this._element.removeAttr('name');
        }
-};
+});
 
 /**
  * Icon collection used across all JavaScript classes.