From 0c38ee1532360861d58b523ace3fa91064020172 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Fri, 17 Sep 2021 18:12:24 +0200 Subject: [PATCH] chg: [genericTemplate:filters] Fixed some UI issues --- src/View/Helper/BootstrapHelper.php | 22 ++++++++++++---------- templates/genericTemplates/filters.php | 1 + webroot/css/main.css | 4 ++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/View/Helper/BootstrapHelper.php b/src/View/Helper/BootstrapHelper.php index f814160..2ea7a69 100644 --- a/src/View/Helper/BootstrapHelper.php +++ b/src/View/Helper/BootstrapHelper.php @@ -145,16 +145,16 @@ class BootstrapGeneric { public static $variants = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark', 'white', 'transparent']; public static $textClassByVariants = [ - 'primary' => 'text-white', - 'secondary' => 'text-white', - 'success' => 'text-white', - 'danger' => 'text-white', - 'warning' => 'text-black', - 'info' => 'text-white', - 'light' => 'text-black', - 'dark' => 'text-white', - 'white' => 'text-black', - 'transparent' => 'text-black' + 'primary' => 'text-light', + 'secondary' => 'text-light', + 'success' => 'text-light', + 'danger' => 'text-light', + 'warning' => 'text-dark', + 'info' => 'text-light', + 'light' => 'text-dark', + 'dark' => 'text-light', + 'white' => 'text-dark', + 'transparent' => 'text-dark' ]; protected $allowedOptionValues = []; protected $options = []; @@ -946,8 +946,10 @@ class BoostrapBadge extends BootstrapGeneric { { $html = $this->genNode('span', [ 'class' => array_merge($this->options['class'], [ + 'ms-1', 'badge', "bg-{$this->options['variant']}", + $this->getTextClassForVariant($this->options['variant']), $this->options['pill'] ? 'rounded-pill' : '', ]), 'title' => $this->options['title'] diff --git a/templates/genericTemplates/filters.php b/templates/genericTemplates/filters.php index b28fe9a..d51a0b2 100644 --- a/templates/genericTemplates/filters.php +++ b/templates/genericTemplates/filters.php @@ -27,6 +27,7 @@ if ($taggingEnabled) { $helpText = $this->Bootstrap->genNode('sup', [ 'class' => ['ms-1 fa fa-info'], 'title' => __('Supports negation matches (with the `!` character) and LIKE matches (with the `%` character). Example: `!exportable`, `%able`'), + 'data-bs-toggle' => 'tooltip', ]); $filteringTags = $this->Bootstrap->genNode('h5', [], __('Tags') . $helpText); $filteringTags .= $this->Tag->tags([], [ diff --git a/webroot/css/main.css b/webroot/css/main.css index 7c46c38..dcd9d20 100644 --- a/webroot/css/main.css +++ b/webroot/css/main.css @@ -168,3 +168,7 @@ input[type="checkbox"]:disabled.change-cursor { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; } + +.select2-container { + z-index: 1060; +} \ No newline at end of file