From 582a18742047f96d42b4d79437b3aa6a7680ae75 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 3 Apr 2012 15:08:05 +0200 Subject: [PATCH] Fixed confirmation dialog and enhanced color 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 | 8 ++++---- wcfsetup/install/files/style/dialog.less | 21 +++++---------------- wcfsetup/install/files/style/layout.less | 4 ++++ wcfsetup/install/files/style/variables.less | 1 + 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index d6d318c7fe..0f5ee8c888 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -4185,11 +4185,11 @@ WCF.System.Confirmation = { * Creates the confirmation dialog on first use. */ _createDialog: function() { - this._dialog = $('

').hide().appendTo(document.body); - var $formButtons = $('
').appendTo(this._dialog); + this._dialog = $('

').hide().appendTo(document.body); + var $formButtons = $('
').appendTo(this._dialog); + $('').data('action', 'confirm').click($.proxy(this._click, this)).appendTo($formButtons); $('').data('action', 'cancel').click($.proxy(this._click, this)).appendTo($formButtons); - $('').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(); } }; diff --git a/wcfsetup/install/files/style/dialog.less b/wcfsetup/install/files/style/dialog.less index 94870b33a8..207b1d0207 100644 --- a/wcfsetup/install/files/style/dialog.less +++ b/wcfsetup/install/files/style/dialog.less @@ -18,21 +18,6 @@ .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; @@ -124,4 +109,8 @@ img { margin-bottom: @wcfGapSmall; } +} + +.systemConfirmation p { + padding-top: @wcfGapSmall; } \ No newline at end of file diff --git a/wcfsetup/install/files/style/layout.less b/wcfsetup/install/files/style/layout.less index 8439d8e2a3..312393a58f 100644 --- a/wcfsetup/install/files/style/layout.less +++ b/wcfsetup/install/files/style/layout.less @@ -20,6 +20,10 @@ a { } } +:focus { + outline: 0; +} + #pageHeader { margin-top: 57px; z-index: 100; diff --git a/wcfsetup/install/files/style/variables.less b/wcfsetup/install/files/style/variables.less index 06e883eee3..49de615222 100644 --- a/wcfsetup/install/files/style/variables.less +++ b/wcfsetup/install/files/style/variables.less @@ -16,6 +16,7 @@ @wcfDimmedColor: lighten(@wcfColor, 15%); @wcfLabelColor: @wcfLinkColor; @wcfHeadlineColor: @wcfColor; +@wcfDialogColor: lighten(@wcfLinkColor, 20%); /* font */ @wcfBaseFontSize: 13px; -- 2.20.1