select with images
parent
35487f92e3
commit
ebc3ab6ce8
|
@ -598,7 +598,7 @@
|
||||||
console.log("onFontDropdownItemClick")
|
console.log("onFontDropdownItemClick")
|
||||||
|
|
||||||
const selectedVariant = event.currentTarget.getAttribute('data-value');
|
const selectedVariant = event.currentTarget.getAttribute('data-value');
|
||||||
customSelectedValue.innerText = selectedVariant;
|
document.getElementById('shx-custom-enhanced-dropdown-font-select-selected-value').innerText = selectedVariant;
|
||||||
|
|
||||||
// Set the selected option in the original select element
|
// Set the selected option in the original select element
|
||||||
selectElement.value = selectedVariant;
|
selectElement.value = selectedVariant;
|
||||||
|
@ -617,11 +617,11 @@
|
||||||
|
|
||||||
dropdownContent.style.display = 'none';
|
dropdownContent.style.display = 'none';
|
||||||
|
|
||||||
const currentTargetImage = event.currentTarget.querySelector("img")
|
// const currentTargetImage = event.currentTarget.querySelector("img")
|
||||||
|
|
||||||
if (currentTargetImage !== null && currentTargetImage.src !== null) {
|
// if (currentTargetImage !== null && currentTargetImage.src !== null) {
|
||||||
//document.getElementById("shx-custom-enhanced-dropdown-variant-selected-image").src = event.currentTarget.querySelector("img").src
|
//document.getElementById("shx-custom-enhanced-dropdown-variant-selected-image").src = event.currentTarget.querySelector("img").src
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
function SHX_IFC_genDropdownSelect(inputID, labelText, inputName, inputVal, options, section_id) {
|
function SHX_IFC_genDropdownSelect(inputID, labelText, inputName, inputVal, options, section_id) {
|
||||||
|
@ -641,7 +641,7 @@
|
||||||
<div class="shx-custom-enhanced-dropdown field custom">
|
<div class="shx-custom-enhanced-dropdown field custom">
|
||||||
<button class="shx-custom-enhanced-dropdown-dropbtn" onclick="toggleCustomEnhancedDropdownFont()">
|
<button class="shx-custom-enhanced-dropdown-dropbtn" onclick="toggleCustomEnhancedDropdownFont()">
|
||||||
<div style="display: flex; justify-content: space-between; align-items: center; pointer-events: none">
|
<div style="display: flex; justify-content: space-between; align-items: center; pointer-events: none">
|
||||||
<span>font</span>
|
<span id="shx-custom-enhanced-dropdown-font-select-selected-value">font</span>
|
||||||
|
|
||||||
<div style="display: flex; align-items: center; gap: 8px">
|
<div style="display: flex; align-items: center; gap: 8px">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#131213"><path d="M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#131213"><path d="M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"/></svg>
|
||||||
|
@ -690,8 +690,7 @@
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SHX_IFC_genColorSelect(inputID, labelText, inputName, _inputVal, colorWhiteList, section_id) {
|
function SHX_IFC_genColorSelect(inputID, labelText, inputName, _inputVal, colorWhiteList, section_id) {
|
||||||
|
|
||||||
let options = [];
|
let options = [];
|
||||||
|
|
||||||
let inputVal = _inputVal;
|
let inputVal = _inputVal;
|
||||||
|
|
Loading…
Reference in New Issue