From 845f9d84b34accbb6b19a18cceadaaa959037b5f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 4 May 2013 15:41:29 +0200 Subject: [PATCH] Max width for dialogs set to 800px/80% --- wcfsetup/install/files/js/WCF.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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(); -- 2.20.1