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

Fix error in graph HTML output

This commit is contained in:
Ian Gray 2022-01-15 15:13:28 +00:00
parent 12a3fb6c80
commit fed603e219
3 changed files with 7 additions and 7 deletions

4
data/js/controls.js vendored
View File

@ -730,11 +730,11 @@ var addToHTML = function(data) {
} else {
//We are adding to an existing panel so we only need the HTML for the element
var parent = $("#id" + data.parentControl);
parent.append(elementHTML(data.type, data.id, data.value, elementStyle));
parent.append(elementHTML(data.type, data.id, data.value, data.label, elementStyle));
}
}
var elementHTML = function(type, id, value, elementStyle) {
var elementHTML = function(type, id, value, label, elementStyle) {
switch(type) {
case UI_LABEL:
return "<span id='l" + id + "' " + elementStyle +

View File

@ -57,8 +57,8 @@ colorClass(data.color)+"'><h5>"+data.label+"</h5><hr/>"+
elementHTML(data.type,data.id,data.value,elementStyle)+
"</div>";break;case UI_SEPARATOR:html="<div id='id"+data.id+"' "+panelStyle+" class='sectionbreak columns'>"+
"<h5>"+data.label+"</h5><hr/></div>";break;}
parent.append(html);}else{var parent=$("#id"+data.parentControl);parent.append(elementHTML(data.type,data.id,data.value,elementStyle));}}
var elementHTML=function(type,id,value,elementStyle){switch(type){case UI_LABEL:return"<span id='l"+id+"' "+elementStyle+
parent.append(html);}else{var parent=$("#id"+data.parentControl);parent.append(elementHTML(data.type,data.id,data.value,data.label,elementStyle));}}
var elementHTML=function(type,id,value,label,elementStyle){switch(type){case UI_LABEL:return"<span id='l"+id+"' "+elementStyle+
" class='label label-wrap'>"+value+"</span>";case UI_BUTTON:return"<button id='btn"+id+"' "+elementStyle+
" onmousedown='buttonclick("+id+", true)'"+
" onmouseup='buttonclick("+id+", false)'>"+

File diff suppressed because one or more lines are too long