From: Alexander Ebert Date: Mon, 28 Nov 2011 16:15:08 +0000 (+0100) Subject: Fixed dialog dimensions again X-Git-Tag: 2.0.0_Beta_1~1545^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7d9f722a9e41807cfd6607214ff91386453049a;p=GitHub%2FWoltLab%2FWCF.git Fixed dialog dimensions again Somehow getDimensions() (without any parameters) seems to be returning a usable value, rather than the values returned by inner/outer (maybe buggy?) --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index f2ee853af7..45df47cd3e 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -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; }