diff --git a/administrator/components/com_modules/layouts/joomla/form/field/modulespositionedit.php b/administrator/components/com_modules/layouts/joomla/form/field/modulespositionedit.php index 19fbc777b688e..c4e45d712b7a8 100644 --- a/administrator/components/com_modules/layouts/joomla/form/field/modulespositionedit.php +++ b/administrator/components/com_modules/layouts/joomla/form/field/modulespositionedit.php @@ -50,7 +50,7 @@ */ $attributes = array( - 'class="' . $class . '"', + 'class="moduleposition ' . $class . '"', ' allow-custom', ' search-placeholder="' . $this->escape(Text::_('JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS')) . '" ', ); diff --git a/administrator/templates/atum/images/select-bg-active-rtl.svg b/administrator/templates/atum/images/select-bg-active-rtl.svg deleted file mode 100644 index eae47aa83ead6..0000000000000 --- a/administrator/templates/atum/images/select-bg-active-rtl.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/templates/atum/images/select-bg-active.svg b/administrator/templates/atum/images/select-bg-active.svg deleted file mode 100644 index 19cd7866984c2..0000000000000 --- a/administrator/templates/atum/images/select-bg-active.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/templates/atum/images/select-bg-rtl.svg b/administrator/templates/atum/images/select-bg-rtl.svg deleted file mode 100644 index a1ae9a3e60bb1..0000000000000 --- a/administrator/templates/atum/images/select-bg-rtl.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/templates/atum/images/select-bg.svg b/administrator/templates/atum/images/select-bg.svg deleted file mode 100644 index e2fefccf30242..0000000000000 --- a/administrator/templates/atum/images/select-bg.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/administrator/templates/atum/scss/_variables.scss b/administrator/templates/atum/scss/_variables.scss index 8f889443fb872..51ad4b6a1fb95 100644 --- a/administrator/templates/atum/scss/_variables.scss +++ b/administrator/templates/atum/scss/_variables.scss @@ -216,22 +216,15 @@ $input-btn-padding-x-sm-submenu: 1.625rem; $input-btn-submenu-icon-distance: 1rem; // Custom form -$custom-select-indicator-padding: 3rem; -$custom-select-bg: var(--atum-bg-light); -$custom-select-bg-size: 116rem; -$custom-select-indicator: url(../images/select-bg.svg); -$custom-select-indicator-rtl: url(../images/select-bg-rtl.svg); -$custom-select-indicator-active: url(../../../images/select-bg.svg); -$custom-select-indicator-active-rtl: url(../../../images/select-bg-rtl.svg); -$custom-select-background: $custom-select-indicator no-repeat right center / $custom-select-bg-size; // Used so we can have multiple background elements (e.g., arrow and feedback icon) -$custom-select-background-rtl: $custom-select-indicator-rtl no-repeat left center / $custom-select-bg-size; // Used so we can have multiple background elements (e.g., arrow and feedback icon) -$custom-select-box-shadow: $atum-box-shadow; -$custom-select-bg-size-sm: 75rem; -$custom-select-multiple-padding-y: .3rem; +$custom-select-bg: var(--white-offset); +$custom-select-border-color: #6d7784; +$custom-select-box-shadow: $input-box-shadow; +$custom-select-multiple-padding-y: .3rem; +$custom-select-padding: .6rem 1.2rem; //input $input-padding: .6rem 1rem; -$input-border: solid 1px #c9c9c9; +$input-border: solid 1px #c9c9c9; // Modals $modal-header-height: 2.875rem; diff --git a/administrator/templates/atum/scss/vendor/bootstrap/_custom-forms.scss b/administrator/templates/atum/scss/vendor/bootstrap/_custom-forms.scss index de755e145c051..74f628883339a 100644 --- a/administrator/templates/atum/scss/vendor/bootstrap/_custom-forms.scss +++ b/administrator/templates/atum/scss/vendor/bootstrap/_custom-forms.scss @@ -1,19 +1,37 @@ // Custom Forms +.select-wrapper { + position: relative; + + &::before { + background-color: var(--atum-bg-light); + color: var(--atum-text-dark); + content: "\f107"; + font-family: "Font Awesome 5 Free"; + padding: $custom-select-padding; + pointer-events: none; + position: absolute; + top: 1px; + + [dir=ltr] & { + border-bottom-right-radius: $border-radius; + border-top-right-radius: $border-radius; + right: 1px; + } + + [dir=rtl] & { + border-bottom-left-radius: $border-radius; + border-top-left-radius: $border-radius; + left: 1px; + } + } +} .custom-select { max-width: $input-max-width; + min-width: 6rem; cursor: pointer; - background: $custom-select-background; - background-color: $custom-select-bg; - border: $input-border; - // var needed - box-shadow: $input-box-shadow; - - [dir=rtl] & { - padding: $custom-select-padding-y $custom-select-padding-x $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding); - background: $custom-select-background-rtl; - background-color: $custom-select-bg; - } + box-shadow: $custom-select-box-shadow; + background: $custom-select-bg; &[multiple] { padding: 0; @@ -28,34 +46,6 @@ background-color: var(--atum-bg-dark) !important; } } - - - - } - - &.custom-select-color-state { - - &.custom-select-success { - color: theme-color("success"); - background-color: theme-color("success"); - border-color: theme-color("success"); - - option { - color: $custom-select-color; - background-color: var(--white-offset); - } - } - - &.custom-select-danger { - color: theme-color("danger"); - background-color: theme-color("danger"); - border-color: theme-color("danger"); - - option { - color: $custom-select-color; - background-color: var(--white-offset); - } - } } &:focus { diff --git a/administrator/templates/atum/scss/vendor/choicesjs/choices.scss b/administrator/templates/atum/scss/vendor/choicesjs/choices.scss index 676c168c70322..967001a810ece 100644 --- a/administrator/templates/atum/scss/vendor/choicesjs/choices.scss +++ b/administrator/templates/atum/scss/vendor/choicesjs/choices.scss @@ -33,6 +33,37 @@ margin-bottom: 0; font-size: 1rem; + position: relative; + + &::before { + background-color: var(--atum-bg-light); + color: var(--atum-text-dark); + content: "\107"; + font-family: "Font Awesome 5 Free"; + padding: $custom-select-padding; + position: absolute; + pointer-events: none; + top: 1px; + + .moduleposition & { + background-color: theme-color("success"); + color: var(--atum-text-light); + content: "\f05b"; + } + + [dir=ltr] & { + right: 1px; + border-top-right-radius: $border-radius; + border-bottom-right-radius: $border-radius; + } + + [dir=rtl] & { + left: 1px; + border-top-left-radius: $border-radius; + border-bottom-left-radius: $border-radius; + } + } + .is-focused & { border-color: $focuscolor; } @@ -121,11 +152,6 @@ .choices[data-type*="select-multiple"] { .choices__inner { padding-inline-end: $custom-select-indicator-padding; - background: $custom-select-bg url("../../../images/select-bg.svg") no-repeat 100%/116rem; - - [dir="rtl"] & { - background: $custom-select-bg url("../../../images/select-bg-rtl.svg") no-repeat 0/116rem; - } } } diff --git a/libraries/src/HTML/Helpers/Select.php b/libraries/src/HTML/Helpers/Select.php index cf3335961cd08..879771df2905e 100644 --- a/libraries/src/HTML/Helpers/Select.php +++ b/libraries/src/HTML/Helpers/Select.php @@ -144,8 +144,8 @@ public static function genericlist($data, $name, $attribs = null, $optKey = 'val } $baseIndent = str_repeat($options['format.indent'], $options['format.depth']++); - $html = $baseIndent . '' . $options['format.eol'] - . static::options($data, $options) . $baseIndent . '' . $options['format.eol']; + $html = $baseIndent . '
' . $options['format.eol'] + . static::options($data, $options) . $baseIndent . '
' . $options['format.eol']; return $html; }