From be985b391270bb9c06ffe60e3ea5dc9e5c62130d Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 24 Jan 2022 14:10:49 +0100 Subject: [PATCH] Message box button styling. --- assets/css/general.scss | 13 ++++++++----- assets/js/utils/message.js | 8 +++++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/assets/css/general.scss b/assets/css/general.scss index 786e165d..29778b99 100644 --- a/assets/css/general.scss +++ b/assets/css/general.scss @@ -39,7 +39,10 @@ body .ui-draggable .ui-dialog-titlebar { padding: 12px 10px; margin-bottom: 10px; border: none; - border-radius: 0; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } body .ui-dialog { @@ -54,10 +57,6 @@ body .ui-dialog .ui-dialog-buttonpane { border: none; } -body .ui-dialog .ui-dialog-buttonpane .btn { - min-width: 120px; -} - body .ui-button .ui-icon, body .ui-button:hover .ui-icon { background-image: url('../ext/jquery-ui/images/ui-icons_222222_256x240.png'); @@ -72,6 +71,10 @@ body .ui-widget.ui-widget-content { padding: 0; } +body .ui-dialog-buttons { + border-radius: 0.25rem; +} + body #ui-datepicker-div { margin-top: 5px; z-index: 1100 !important; diff --git a/assets/js/utils/message.js b/assets/js/utils/message.js index 82ebec30..10fb8e77 100644 --- a/assets/js/utils/message.js +++ b/assets/js/utils/message.js @@ -66,7 +66,13 @@ window.App.Utils.Message = (function () { $messageBox.dialog('open'); - $('.ui-dialog .ui-dialog-buttonset button').addClass('btn btn-outline-secondary'); + $('.ui-dialog .ui-dialog-buttonset button:not(:last)').addClass('btn btn-secondary'); + $('.ui-dialog .ui-dialog-buttonset button:last').addClass('btn btn-primary').focus(); + $('.ui-dialog .ui-dialog-buttonset button:last').prepend( + $('', { + 'class': 'fas fa-check-square me-2' + }) + ); $('#message-box .ui-dialog-titlebar-close').hide(); }