Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
*/

$attributes = array(
'class="' . $class . '"',
'class="moduleposition ' . $class . '"',
' allow-custom',
' search-placeholder="' . $this->escape(Text::_('JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS')) . '" ',
);
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion administrator/templates/atum/images/select-bg-active.svg

This file was deleted.

1 change: 0 additions & 1 deletion administrator/templates/atum/images/select-bg-rtl.svg

This file was deleted.

1 change: 0 additions & 1 deletion administrator/templates/atum/images/select-bg.svg

This file was deleted.

19 changes: 6 additions & 13 deletions administrator/templates/atum/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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 {
Expand Down
36 changes: 31 additions & 5 deletions administrator/templates/atum/scss/vendor/choicesjs/choices.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions libraries/src/HTML/Helpers/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 . '<select' . ($id !== '' ? ' id="' . $id . '"' : '') . ' name="' . $name . '"' . $attribs . '>' . $options['format.eol']
. static::options($data, $options) . $baseIndent . '</select>' . $options['format.eol'];
$html = $baseIndent . '<div class="select-wrapper"><select' . ($id !== '' ? ' id="' . $id . '"' : '') . ' name="' . $name . '"' . $attribs . '>' . $options['format.eol']
. static::options($data, $options) . $baseIndent . '</select></div>' . $options['format.eol'];

return $html;
}
Expand Down