shx-3d-render

main
Jan Umbach 2024-06-23 10:33:51 +02:00
parent 7f11a8bfa1
commit d30b33269c
1 changed files with 11 additions and 11 deletions

View File

@ -302,17 +302,17 @@
};
function SHX_IFC_genTextInput(inputID, labelText, inputName, inputVal, section_id) {
document.querySelector('#${inputID}').addEventListener('input',(e)=>{
if(!document.querySelector('label[for="${inputID}-label"] span')){
const span = document.createElement("span");
span.style.marginLeft = '10px'
document.querySelector('label[for="${inputID}-label"]').appendChild(span)
}
document.querySelector('label[for="${inputID}-label"] span').style.display = 'inline'
document.querySelector('label[for="${inputID}-label"] span').textContent = e.target.value.length + ' | ' + 13
if(e.target.value.length==0){
document.querySelector('label[for="${inputID}-label"] span').style.display = 'none'
}});
document.querySelector(`#${inputID}`).addEventListener('input',(e)=>{
if(!document.querySelector(`label[for="${inputID}-label"] span`)){
const span = document.createElement("span");
span.style.marginLeft = `10px`
document.querySelector(`label[for="${inputID}-label"]`).appendChild(span)
}
document.querySelector(`label[for="${inputID}-label"] span`).style.display = `inline`
document.querySelector(`label[for="${inputID}-label"] span`).textContent = e.target.value.length + ` | ` + 13
if(e.target.value.length==0){
document.querySelector(`label[for="${inputID}-label"] span`).style.display = 'none'
}});
return `
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label>