1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-12-23 05:50:49 +00:00

Fix small bug applying styles to input elements

This commit is contained in:
Ian Gray 2022-07-17 11:17:22 +01:00
parent e3debb9689
commit 86c469f5cb
3 changed files with 10 additions and 10 deletions

6
data/js/controls.js vendored
View File

@ -815,13 +815,13 @@ var elementHTML = function(data) {
elementStyle + " class='range-slider__range'><span class='range-slider__value'>" +
data.value + "</span></div>";
case UI_NUMBER:
return "<input style='color:black;' " + elementStyle + " id='num" + id +
return "<input style='color:black; " + data.elementStyle + "' id='num" + id +
"' type='number' value='" + data.value + "' onchange='numberchange(" + id + ")' />";
case UI_TEXT_INPUT:
return "<input " + inputType + "style='color:black;' " + elementStyle + " id='text" + id +
return "<input " + inputType + "style='color:black; " + data.elementStyle + "' id='text" + id +
"' value='" + data.value + "' onchange='textchange(" + id + ")' />";
case UI_SELECT:
return "<select style='color:black;' " + elementStyle + " id='select" + id +
return "<select style='color:black; " + data.elementStyle + "' id='select" + id +
"' onchange='selectchange(" + id + ")' />";
case UI_GRAPH:
return "<figure id='graph" + id + "'><figcaption>" + data.label + "</figcaption></figure>";

View File

@ -93,9 +93,9 @@ data.value+"</button>";case UI_SWITCHER:return"<label id='sl"+id+"' "+elementSty
"'>"+
"<input id='sl"+id+"' type='range' min='0' max='100' value='"+data.value+"' "+
elementStyle+" class='range-slider__range'><span class='range-slider__value'>"+
data.value+"</span></div>";case UI_NUMBER:return"<input style='color:black;' "+elementStyle+" id='num"+id+
"' type='number' value='"+data.value+"' onchange='numberchange("+id+")' />";case UI_TEXT_INPUT:return"<input "+inputType+"style='color:black;' "+elementStyle+" id='text"+id+
"' value='"+data.value+"' onchange='textchange("+id+")' />";case UI_SELECT:return"<select style='color:black;' "+elementStyle+" id='select"+id+
data.value+"</span></div>";case UI_NUMBER:return"<input style='color:black; "+data.elementStyle+"' id='num"+id+
"' type='number' value='"+data.value+"' onchange='numberchange("+id+")' />";case UI_TEXT_INPUT:return"<input "+inputType+"style='color:black; "+data.elementStyle+"' id='text"+id+
"' value='"+data.value+"' onchange='textchange("+id+")' />";case UI_SELECT:return"<select style='color:black; "+data.elementStyle+"' id='select"+id+
"' onchange='selectchange("+id+")' />";case UI_GRAPH:return"<figure id='graph"+id+"'><figcaption>"+data.label+"</figcaption></figure>";case UI_GAUGE:return"WILL BE A GAUGE <input style='color:black;' id='gauge"+id+
"' type='number' value='"+data.value+"' onchange='numberchange("+id+")' />";case UI_ACCEL:return"ACCEL // Not implemented fully!<div class='accelerometer' id='accel"+id+
"' ><div class='ball"+id+"'></div><pre class='accelerometeroutput"+id+"'></pre>";default:return"";}}

File diff suppressed because one or more lines are too long