mirror of
https://github.com/s00500/ESPUI.git
synced 2025-07-04 06:10:18 +00:00
Add support for wide panels.
Allows for panels to be displayed in single column mode, regardless of screen width. For more information, see updates to README.md
This commit is contained in:
3
data/js/controls.js
vendored
3
data/js/controls.js
vendored
@ -662,6 +662,7 @@ var rangeSlider = function (isDiscrete) {
|
||||
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) {
|
||||
//We add the control with its own panel
|
||||
@ -683,7 +684,7 @@ var addToHTML = function(data) {
|
||||
case UI_GRAPH:
|
||||
case UI_GAUGE:
|
||||
case UI_ACCEL:
|
||||
html = "<div id='id" + data.id + "' " + panelStyle + " class='two columns card tcenter " +
|
||||
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) +
|
||||
"</div>";
|
||||
|
Reference in New Issue
Block a user