JSDialog: Select: Fix font and reuse jquery ui

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1d2b76ae479e00e39e3596014a10ffd1c28252d9
This commit is contained in:
Pedro Pinto Silva 2020-12-10 15:45:52 +01:00 committed by pedropintosilva
parent 19a238e540
commit 8ef0d05727
2 changed files with 31 additions and 1 deletions

View file

@ -236,9 +236,37 @@ td.jsdialog > [id^='table-box'] {
}
/* listbox */
.jsdialog.ui-listbox {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
min-width: 100px;
height: 32px;
line-height: normal;
font-size: 14px;
font-family: var(--jquery-ui-font);
border: 1px solid #CCC;
border-radius: 3px;
padding-right: 2em;
padding-left: 0.4em;
background-color: #F1F1F1;
}
.ui-listbox::-ms-expand {
display: none;
}
.ui-listbox-arrow {
content: '';
background: url('images/jquery-ui-lightness/ui-icons_222222_256x240.png') no-repeat #F1F1F1;
background-position: -67px -18px;
display: inline-block;
width: 11px;
height: 11px;
position: relative;
top: 1px;
left: -18px;
cursor: pointer;
}
/* Autofilter dropdown */

View file

@ -1551,7 +1551,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
title = builder._cleanText(title);
var listbox = L.DomUtil.create('select', builder.options.cssClass + ' ui-listbox ', parentContainer);
var listboxArrow = L.DomUtil.create('span', builder.options.cssClass + ' ui-listbox-arrow', parentContainer);
listbox.id = data.id;
listboxArrow.id = 'listbox-arrow-' + data.id;
if (data.enabled === false || data.enabled === 'false')
listbox.disabled = 'disabled';