select with images

main
alexanderroese 2024-07-17 22:58:55 +02:00
parent 10dd58b811
commit 5c7562de64
3 changed files with 5 additions and 7 deletions

View File

@ -3676,7 +3676,7 @@ img {
background-color: #ededed;
}
.shx-custom-enhanced-dropdown-dropbtn {
.shx-custom-enhanced-dropdown-button {
width: 100%;
padding: 4px 14px 4px 24px;
font-size: 16px;
@ -3686,7 +3686,7 @@ img {
color: rgb(var(--color-foreground));
}
.shx-custom-enhanced-dropdown-dropbtn:focus {
.shx-custom-enhanced-dropdown-button:focus {
outline: none;
}

View File

@ -119,7 +119,7 @@
{% endfor %}
</select>
<button class="shx-custom-enhanced-dropdown-dropbtn" id="shx-custom-enhanced-dropdown-variant-select-button">
<button class="shx-custom-enhanced-dropdown-button" id="shx-custom-enhanced-dropdown-variant-select-button">
<div style="display: flex; justify-content: space-between; align-items: center; pointer-events: none">
<span id="shx-custom-enhanced-dropdown-variant-select-selected-value">{{ option.selected_value }}</span>

View File

@ -588,8 +588,6 @@
}
function onFontDropdownItemClick(event) {
console.log("onFontDropdownItemClick")
const selectedVariant = event.currentTarget.getAttribute('data-value');
document.getElementById('shx-custom-enhanced-dropdown-font-select-selected-value').innerText = selectedVariant;
@ -624,7 +622,7 @@
let html = `
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label>
<div class="field custom">
<select id="${inputID}" form="product-form-${section_id}" name="properties[${inputName}]" class="field__input shx-custom-enhanced-dropdown-font-hide-dummy-select" style="height: 40px" onchange="document.querySelector('shx-input-forms').renderView(500)">
<select id="${inputID}" form="product-form-${section_id}" name="properties[${inputName}]" class="field__input shx-custom-enhanced-dropdown-hide-dummy-select shx-custom-enhanced-dropdown-font-hide-dummy-select" style="height: 40px" onchange="document.querySelector('shx-input-forms').renderView(500)">
`;
let isInputShxFont = inputID === "shx-font"
@ -633,7 +631,7 @@
if (isInputShxFont) {
customDropdownHtml += `
<div class="shx-custom-enhanced-dropdown field custom">
<button class="shx-custom-enhanced-dropdown-dropbtn" onclick="toggleCustomEnhancedDropdownFont()">
<button class="shx-custom-enhanced-dropdown-button" onclick="toggleCustomEnhancedDropdownFont()">
<div style="display: flex; justify-content: space-between; align-items: center; pointer-events: none">
<span id="shx-custom-enhanced-dropdown-font-select-selected-value">lade...</span>