Fix css multiseclect

This commit is contained in:
Laurent Destailleur 2023-02-10 17:54:07 +01:00
parent a3d32fc7eb
commit 0235e24e0e
3 changed files with 23 additions and 2 deletions

View File

@ -8408,8 +8408,13 @@ class Form
}
}
// Try also magic suggest
$out .= '<select id="'.$htmlname.'" class="multiselect'.($morecss ? ' '.$morecss : '').'" multiple name="'.$htmlname.'[]"'.($moreattrib ? ' '.$moreattrib : '').($width ? ' style="width: '.(preg_match('/%/', $width) ? $width : $width.'px').'"' : '').'>'."\n";
$useenhancedmultiselect = 0;
if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) {
$useenhancedmultiselect = 1;
}
// Output select component
$out .= '<select id="'.$htmlname.'" class="multiselect'.($useenhancedmultiselect ? ' multiselectononeline' : '').($morecss ? ' '.$morecss : '').'" multiple name="'.$htmlname.'[]"'.($moreattrib ? ' '.$moreattrib : '').($width ? ' style="width: '.(preg_match('/%/', $width) ? $width : $width.'px').'"' : '').'>'."\n";
if (is_array($array) && !empty($array)) {
if ($value_as_key) {
$array = array_combine($array, $array);

View File

@ -6514,6 +6514,14 @@ ul.select2-results__options li {
font-size: 0.95em;
}
select.multiselectononeline {
padding: 0;
vertical-align: middle;
height: 28px !important;
opacity: 0;
/* width: 1px !important; */
}
@media only screen and (min-width: 767px)
{
/* CSS to have the dropdown boxes larger that the input search area */

View File

@ -6421,6 +6421,14 @@ ul.select2-results__options li {
font-size: 0.95em;
}
select.multiselectononeline {
padding: 0;
vertical-align: middle;
height: 28px !important;
opacity: 0;
/* width: 1px !important; */
}
@media only screen and (min-width: 767px)
{
/* CSS to have the dropdown boxes larger that the input search area */