Some minor dialog optimizations
authorMarcel Werk <burntime@woltlab.com>
Fri, 16 Nov 2012 01:22:45 +0000 (02:22 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 16 Nov 2012 01:22:45 +0000 (02:22 +0100)
wcfsetup/install/files/js/WCF.ColorPicker.js
wcfsetup/install/files/js/WCF.js
wcfsetup/install/files/style/dialog.less

index f5b4f0d90ae7f63343ee6e782ac75fab7e060bc1..8d478da30682f80ea4100aad247ee266a631da07 100644 (file)
@@ -245,7 +245,7 @@ WCF.ColorPicker = Class.extend({
                
                // submit button
                var $submitForm = $('<div class="formSubmit" />').appendTo(this._dialog);
-               $('<button>' + WCF.Language.get('wcf.global.button.submit') + '</button>').appendTo($submitForm).click($.proxy(this._submit, this));
+               $('<button class="buttonPrimary">' + WCF.Language.get('wcf.global.button.submit') + '</button>').appendTo($submitForm).click($.proxy(this._submit, this));
        },
        
        /**
index 417b6c1fbe59178286dc7c05da9a200ec0376c22..3d5ee543318cc399739b49e91ad61ccada10c500 100755 (executable)
@@ -7380,6 +7380,13 @@ $.widget('ui.wcfDialog', {
                        this._container.show().css('opacity', 1.0);
                }
                
+               if (this._content.find('.formSubmit').length) {
+                       this._content.addClass('dialogForm');
+               }
+               else {
+                       this._content.removeClass('dialogForm');
+               }
+               
                // calculate dimensions
                var $windowDimensions = $(window).getDimensions();
                var $containerDimensions = this._container.getDimensions('outer');
index 611f47819d39da5825cf4efdb08a8836cdfbde60..e6185a7c6e5faa8e001e25e868351499221fa0ed 100644 (file)
        color: @wcfColor;
        overflow: auto;
        padding: 10px 20px 20px;
-
-       .borderRadius(0, 7px);
+       
+       &.dialogForm {
+               margin-bottom: 49px;
+       }
+       
+       &:not(.dialogForm) {
+               .borderRadius(0, 7px);
+       }
        
        &.overlayLoading {
                background-image: url(../icon/spinner.svg);
                background-repeat: no-repeat;
                background-size: 32px;
        }
+       
+       dl:not(.plain) {
+               > dt {
+                       width: 170px;
+               }
+               
+               > dd {
+                       margin-left: 190px;
+               }
+       }
+       
+       .formSubmit {
+               background-color: @wcfContainerAccentBackgroundColor;
+               border-top: 1px solid @wcfContainerBorderColor;
+               bottom: 0;
+               left: 0;
+               padding: 10px 0;
+               position: absolute;
+               width: 100%;
+               
+               .borderRadius(0, 0, 7px, 7px);
+       }
 }
 
 .dialogOverlay {