shx-3d-render
parent
7d5dc6a55b
commit
7166a584fd
|
@ -94,6 +94,23 @@
|
|||
|
||||
return html;
|
||||
}
|
||||
|
||||
function SHX_IFC_genColorSelect(inputID, labelText, inputName, inputVal, options, section_id) {
|
||||
let html = `
|
||||
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label>
|
||||
<div class="field custom">
|
||||
<section id="${inputID}" form="product-form-${section_id}" name="properties[${inputName}]" class="field__input" style="height: 40px">
|
||||
`;
|
||||
|
||||
for(let i = 0; i < options.length; i++) {
|
||||
html += `<div style="background-color: ${options[i]}; width: 40px; height: 40px; display: inline-block; margin-right: 10px; border-radius: 5px; ${inputVal === options[i] ? 'border: 2px solid #000' : ''}"></div>`;
|
||||
}
|
||||
html += `</section></div>`;
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -126,8 +143,9 @@
|
|||
"renderHTML": (section_id) => {
|
||||
let html = defaultStyle;
|
||||
|
||||
html += SHX_IFC_genTextInput('shx-text1', 'Custom Text 1', 'Text', globalInputFormsObjValues['test1']['text1'], section_id);
|
||||
html += SHX_IFC_genDropdownSelect('shx-font', 'Schriftart', 'Schriftart', globalInputFormsObjValues['test1']['font'], ['LT Beverage', "Rose", 'Arial'], section_id);
|
||||
html += SHX_IFC_genColorSelect('shx-color', 'Farbe', 'Farbe', globalInputFormsObjValues['TextOne']['color'], ['#000000', '#FFFFFF', '#FF0000', '#00FF00', '#0000FF'], section_id);
|
||||
html += SHX_IFC_genTextInput('shx-text1', 'Custom Text 1', 'Text', globalInputFormsObjValues['TextOne']['text1'], section_id);
|
||||
html += SHX_IFC_genDropdownSelect('shx-font', 'Schriftart', 'Schriftart', globalInputFormsObjValues['TextOne']['font'], ['LT Beverage', "Rose", 'Arial'], section_id);
|
||||
html += SHX_IFC_genRenderButton();
|
||||
|
||||
return html;
|
||||
|
|
Loading…
Reference in New Issue