From: Luzifr Date: Thu, 27 Oct 2011 10:21:23 +0000 (+0200) Subject: Overlay dialogues X-Git-Tag: 2.0.0_Beta_1~1648 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e5b8376f2f73947e3c7145b830847c646dc6f55f;p=GitHub%2FWoltLab%2FWCF.git Overlay dialogues Re-implemented the centering script due to CSS changes; optimized overlay position & look. --- diff --git a/wcfsetup/install/files/acp/style/style.css b/wcfsetup/install/files/acp/style/style.css index 8c78976438..0970fce89a 100644 --- a/wcfsetup/install/files/acp/style/style.css +++ b/wcfsetup/install/files/acp/style/style.css @@ -2205,12 +2205,10 @@ div#ajaxExceptionStacktrace { border-radius: 15px; margin-right: auto !important; margin-left: auto !important; - display: block !important; - width: auto !important; - min-width: 80px !important; - max-width: 770px !important; - top: -350px !important; - left: auto !important; + position: fixed !important; + min-width: 500px !important; + max-width: 780px !important; + top: 150px !important; -webkit-box-shadow: 0 1px 23px rgba(0, 0, 0, 1); -moz-box-shadow: 0 1px 23px rgba(0, 0, 0, 1); @@ -2253,7 +2251,7 @@ a.ui-dialog-titlebar-close span { div.ui-widget-overlay { background-color: #000; - opacity: .7; + opacity: .5; position: fixed; width: 100% !important; top: 0; diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 5503d63877..3767d2740d 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2803,6 +2803,11 @@ $.widget('ui.wcfDialog', $.ui.dialog, { this.options.width = 'auto'; $.ui.dialog.prototype._init.apply(this, arguments); + + // center dialog on resize + $(window).resize($.proxy(function() { + this.option('position', 'center'); + }, this)); } }); @@ -2872,6 +2877,11 @@ $.widget('ui.wcfAJAXDialog', $.ui.dialog, { this.element.parent('.ui-dialog').find('a.ui-dialog-titlebar-close').empty().remove(); } } + + // center dialog on window resize + $(window).resize($.proxy(function() { + this.option('position', 'center'); + }, this)); }, /**