Fixed confirmation dialog and enhanced color
authorAlexander Ebert <ebert@woltlab.com>
Tue, 3 Apr 2012 13:08:05 +0000 (15:08 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 3 Apr 2012 13:08:05 +0000 (15:08 +0200)
Additionally I've removed the outline property for all element being focused, sadly it is usually ugly as hell and ignores any CSS set to the specific element.

wcfsetup/install/files/js/WCF.js
wcfsetup/install/files/style/dialog.less
wcfsetup/install/files/style/layout.less
wcfsetup/install/files/style/variables.less

index d6d318c7fec6861d574c8a9074162b11b2fc7dae..0f5ee8c888a76cbfb8fa93b682bdc7538446d715 100644 (file)
@@ -4185,11 +4185,11 @@ WCF.System.Confirmation = {
         * Creates the confirmation dialog on first use.
         */
        _createDialog: function() {
-               this._dialog = $('<div id="wcfSystemConfirmation" class="wcf-systemConfirmation"><p></p></div>').hide().appendTo(document.body);
-               var $formButtons = $('<div class="wcf-formSubmit" />').appendTo(this._dialog);
+               this._dialog = $('<div id="wcfSystemConfirmation" class="systemConfirmation"><p></p></div>').hide().appendTo(document.body);
+               var $formButtons = $('<div class="formSubmit" />').appendTo(this._dialog);
                
+               $('<button class="buttonPrimary">' + WCF.Language.get('wcf.global.confirmation.confirm') + '</button>').data('action', 'confirm').click($.proxy(this._click, this)).appendTo($formButtons);
                $('<button>' + WCF.Language.get('wcf.global.confirmation.cancel') + '</button>').data('action', 'cancel').click($.proxy(this._click, this)).appendTo($formButtons);
-               $('<button class="default">' + WCF.Language.get('wcf.global.confirmation.confirm') + '</button>').data('action', 'confirm').click($.proxy(this._click, this)).appendTo($formButtons);
        },
        
        /**
@@ -4226,7 +4226,7 @@ WCF.System.Confirmation = {
         * Tries to set focus on confirm button.
         */
        _show: function() {
-               this._dialog.find('button:eq(0)').blur().focus();
+               this._dialog.find('button.buttonPrimary').blur().focus();
        }
 };
 
index 94870b33a85013ade77ba6eef3c3509c8d500348..207b1d020700ff2aa215598790dd4f0d04fe999b 100644 (file)
                        .textShadow(@wcfPageBackgroundColor);
                }
        }
-       
-       /*dl {
-               > .reversed {
-                       left: 170px;
-                       width: auto;
-               }
-               
-               > dd {
-                       margin-left: 150px;
-               }
-               
-               > dt {
-                       width: 130px;
-               }
-       }*/
 }
 
 .dialogTitlebar {
@@ -80,7 +65,7 @@
 
 .dialogContent {
        background-color: rgba(51, 51, 51, .9);
-       color: lighten(@wcfLabelColor, 10%);
+       color: @wcfDialogColor;
        overflow: auto;
        padding: 10px 20px 20px;
 
        img {
                margin-bottom: @wcfGapSmall;
        }
+}
+
+.systemConfirmation p {
+       padding-top: @wcfGapSmall;
 }
\ No newline at end of file
index 8439d8e2a383398860181b87a6ea70b5dcb07925..312393a58f8e7f965b09c9a8fab6125d4456893f 100644 (file)
@@ -20,6 +20,10 @@ a {
        }
 }
 
+:focus {
+       outline: 0;
+}
+
 #pageHeader {
        margin-top: 57px;
        z-index: 100;
index 06e883eee30a8ab0da3931f57b8675078c9e53cc..49de61522273ebec3b03a8e22799ba5b72ce26ed 100644 (file)
@@ -16,6 +16,7 @@
 @wcfDimmedColor: lighten(@wcfColor, 15%);
 @wcfLabelColor: @wcfLinkColor;
 @wcfHeadlineColor: @wcfColor;
+@wcfDialogColor: lighten(@wcfLinkColor, 20%);
 
 /* font */
 @wcfBaseFontSize: 13px;