mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-24 02:10:55 +00:00
Fix error in graph HTML output
This commit is contained in:
parent
12a3fb6c80
commit
fed603e219
4
data/js/controls.js
vendored
4
data/js/controls.js
vendored
@ -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 +
|
||||
|
4
data/js/controls.min.js
vendored
4
data/js/controls.min.js
vendored
@ -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
Loading…
Reference in New Issue
Block a user