Fixed dialog dimensions again
authorAlexander Ebert <ebert@woltlab.com>
Mon, 28 Nov 2011 16:15:08 +0000 (17:15 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 28 Nov 2011 16:15:08 +0000 (17:15 +0100)
Somehow getDimensions() (without any parameters) seems to be returning a usable value, rather than the values returned by inner/outer (maybe buggy?)

wcfsetup/install/files/js/WCF.js

index f2ee853af7f7659af335db818dc8bcc2a545de06..45df47cd3e1b4562f6f8dd5b609d8f2fcdfdb616 100644 (file)
@@ -3217,10 +3217,11 @@ $.widget('ui.wcfDialog', {
         * difference between inner and outer content width
         * @var object
         */
+       /*
        _dimensionDifferences: {
                height: 0,
                width: 0
-       },
+       },*/
 
        /**
         * rendering state
@@ -3356,6 +3357,7 @@ $.widget('ui.wcfDialog', {
                        }
                }
 
+               /*
                // caulculate dimensions differences
                this._container.show();
                var $contentInnerDimensions = this._content.getDimensions();
@@ -3365,6 +3367,7 @@ $.widget('ui.wcfDialog', {
                        height: ($contentOuterDimensions.height - $contentInnerDimensions.height),
                        width: ($contentOuterDimensions.width - $contentInnerDimensions.width)
                };
+               */
        },
        
        /**
@@ -3491,11 +3494,11 @@ $.widget('ui.wcfDialog', {
                // calculate dimensions
                var $windowDimensions = $(window).getDimensions();
                var $containerDimensions = this._container.getDimensions('outer');
-               var $contentDimensions = this._content.getDimensions('outer');
+               var $contentDimensions = this._content.getDimensions();
 
                // calculate maximum content height
                var $heightDifference = $containerDimensions.height - $contentDimensions.height;
-               var $maximumHeight = $windowDimensions.height - $heightDifference - (this._dimensionDifferences.height * 2);
+               var $maximumHeight = $windowDimensions.height - $heightDifference/* - (this._dimensionDifferences.height * 2)*/;
                this._content.css({ maxHeight: $maximumHeight + 'px' });
                
                // re-caculate values if container height was previously limited
@@ -3598,10 +3601,12 @@ $.widget('ui.wcfDialog', {
                }
                
                // fix dimensions
+               /*
                $contentDimensions = {
-                       height: $contentDimensions.height/* - this._dimensionDifferences.height*/,
+                       height: $contentDimensions.height*//* - this._dimensionDifferences.height*//*,
                        width: $contentDimensions.width - this._dimensionDifferences.width
                };
+               */
 
                return $contentDimensions;
        }