Overlay dialogues
authorLuzifr <szekely@woltlab.com>
Thu, 27 Oct 2011 10:21:23 +0000 (12:21 +0200)
committerLuzifr <szekely@woltlab.com>
Thu, 27 Oct 2011 10:21:23 +0000 (12:21 +0200)
Re-implemented the centering script due to CSS changes; optimized
overlay position & look.

wcfsetup/install/files/acp/style/style.css
wcfsetup/install/files/js/WCF.js

index 8c78976438c6fda93342a21037dc3e82768fc104..0970fce89a52fce83f41b8f2d34a800446e61e1d 100644 (file)
@@ -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;
index 5503d63877e97c50d860c7a378f2cf500295fb1e..3767d2740d12d3642c5c6e7cd25858fee0c046d3 100644 (file)
@@ -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));
        },
        
        /**