From 2bfb4bc7f8981646e54d525b59fb1e1f1a6c9e91 Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Wed, 6 Nov 2024 23:56:19 +0000 Subject: [PATCH] - Reworked ui-popup default CSS --- asset/webcomponent/module/ui-popup.js | 5 +++-- asset/webcomponent/module/ui-tabs.js | 2 +- view/webcomponent/ui-popup.phtml | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/asset/webcomponent/module/ui-popup.js b/asset/webcomponent/module/ui-popup.js index d681924..0f3d82b 100644 --- a/asset/webcomponent/module/ui-popup.js +++ b/asset/webcomponent/module/ui-popup.js @@ -18,6 +18,7 @@ class UiPopup extends Webcomponent { this.init(); this.handleOptions(); } + handleOptions() { if ( this.options ) { if ( ! this.options['skip-keys'] ) { @@ -117,8 +118,8 @@ class UiPopup extends Webcomponent { case "ok": this.actionFollowLink(element) || this.actionClickButton(element) || - this.actionSendForm(this.trigger) || - this.actionSendForm(element); + this.actionSendForm(element) || + this.actionSendForm(this.trigger); case "cancel": case "no": diff --git a/asset/webcomponent/module/ui-tabs.js b/asset/webcomponent/module/ui-tabs.js index 8f65a1c..9ca69ce 100644 --- a/asset/webcomponent/module/ui-tabs.js +++ b/asset/webcomponent/module/ui-tabs.js @@ -47,4 +47,4 @@ class UiTabs extends Webcomponent { } } -export { UiTabs } +export { UiTabs }; diff --git a/view/webcomponent/ui-popup.phtml b/view/webcomponent/ui-popup.phtml index 6297bca..52ead62 100644 --- a/view/webcomponent/ui-popup.phtml +++ b/view/webcomponent/ui-popup.phtml @@ -3,10 +3,11 @@ ui-popup:not(.visible) {transform: translate(-50%, -100%);transition-timing-function: ease-in;translate(-50%, -100%);box-shadow:none;} ui-popup.modal.visible {display:flex} ui-popup > * {padding:1.5rem} - ui-popup .button-list {text-align:center;} + ui-popup .button-list {text-align:right;} ui-popup .button-list .button {padding: 0px 7%;} - ui-popup .message {background: transparent;padding:1.2rem 1.5rem!important} - ui-popup .title {font-size:1.5rem;display:flex;justify-content: space-between;background:rgba(120,120,120,0.15)} + ui-popup [slot="message"] {background: transparent;padding:1.2rem 1.5rem!important} + ui-popup [slot="title"] {font-size:1.5rem;display:flex;justify-content: space-between;background:rgba(120,120,120,0.12)} + ui-popup [slot="buttons"] {background:rgba(120,120,120,0.07)} ui-popup::before {left:0;right:0;top:0;bottom:0;background:rgba(0,0,0,0.1);content:" ";}