From: Alexander Ebert Date: Sat, 4 May 2013 13:41:29 +0000 (+0200) Subject: Max width for dialogs set to 800px/80% X-Git-Tag: 2.0.0_Beta_1~259^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=845f9d84b34accbb6b19a18cceadaaa959037b5f;p=GitHub%2FWoltLab%2FWCF.git Max width for dialogs set to 800px/80% --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index a3aadabbea..c74923d217 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -8173,8 +8173,16 @@ $.widget('ui.wcfDialog', { this._content.removeClass('dialogForm').css({ marginBottom: '0px' }); } - // calculate dimensions + // force 800px or 80% width var $windowDimensions = $(window).getDimensions(); + if ($windowDimensions.width * 0.8 > 800) { + this._content.css('maxWidth', '800px'); + } + else { + this._content.css('maxWidth', '80%'); + } + + // calculate dimensions var $containerDimensions = this._container.getDimensions('outer'); var $contentDimensions = this._content.getDimensions();