mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-24 17:30:55 +00:00
Correct call to elementHTML
This commit is contained in:
parent
fed603e219
commit
bc6e2bb8af
2
data/js/controls.js
vendored
2
data/js/controls.js
vendored
@ -716,7 +716,7 @@ var addToHTML = function(data) {
|
||||
case UI_ACCEL:
|
||||
html = "<div id='id" + data.id + "' " + panelStyle + " class='two columns " + panelwide + " card tcenter " +
|
||||
colorClass(data.color) + "'><h5>" + data.label + "</h5><hr/>" +
|
||||
elementHTML(data.type, data.id, data.value, elementStyle) +
|
||||
elementHTML(data.type, data.id, data.value, data.label, elementStyle) +
|
||||
"</div>";
|
||||
break;
|
||||
case UI_SEPARATOR:
|
||||
|
2
data/js/controls.min.js
vendored
2
data/js/controls.min.js
vendored
@ -54,7 +54,7 @@ function switcher(number,state){if(state==null){if(!$("#sl"+number).hasClass("ch
|
||||
var rangeSlider=function(isDiscrete){var range=$(".range-slider__range");var slidercb=function(){sliderchange($(this).attr("id").replace(/^\D+/g,""));};range.on({input:function(){$(this).next().html(this.value)}});range.each(function(){$(this).next().html(this.value);if($(this).attr("callbackSet")!="true"){if(!isDiscrete){$(this).on({input:slidercb});}else{$(this).on({change:slidercb});}
|
||||
$(this).attr("callbackSet","true");}});};var addToHTML=function(data){panelStyle=data.hasOwnProperty('panelStyle')?" style='"+data.panelStyle+"' ":"";elementStyle=data.hasOwnProperty('elementStyle')?" style='"+data.elementStyle+"' ":"";panelwide=data.hasOwnProperty('wide')?"wide":"";if(!data.hasOwnProperty('parentControl')||$("#tab"+data.parentControl).length>0){var parent=data.hasOwnProperty('parentControl')?$("#tab"+data.parentControl):$("#row");var html="";switch(data.type){case UI_LABEL:case UI_BUTTON:case UI_SWITCHER:case UI_CPAD:case UI_PAD:case UI_SLIDER:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GRAPH:case UI_GAUGE:case UI_ACCEL:html="<div id='id"+data.id+"' "+panelStyle+" class='two columns "+panelwide+" card tcenter "+
|
||||
colorClass(data.color)+"'><h5>"+data.label+"</h5><hr/>"+
|
||||
elementHTML(data.type,data.id,data.value,elementStyle)+
|
||||
elementHTML(data.type,data.id,data.value,data.label,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,data.label,elementStyle));}}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user