Max width for dialogs set to 800px/80%
authorAlexander Ebert <ebert@woltlab.com>
Sat, 4 May 2013 13:41:29 +0000 (15:41 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 4 May 2013 13:41:29 +0000 (15:41 +0200)
wcfsetup/install/files/js/WCF.js

index a3aadabbea9ca5b7f5d9d85bd927814c96dd0d2a..c74923d2178b1dd68bafe7635f6785ffbd8e0ed6 100755 (executable)
@@ -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();