1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-06-11 02:30:39 +00:00

Adding all the rest for sliderfeature

This commit is contained in:
2017-11-29 11:32:07 +01:00
parent ac3b8795d4
commit 09e3a9c71b
5 changed files with 73 additions and 18 deletions

View File

@ -218,7 +218,7 @@ function start() {
break;
case UI_SLIDER:
$('#row').append(
"<div class='two columns card tcenter " + colorClass(data.color) + "'>" +
"<div class='two columns card tcenter card-slider " + colorClass(data.color) + "'>" +
"<h5 id='" + data.id + "'>" + data.label + "</h5><hr />" +
"<div id='sl" + data.id + "' class='rkmd-slider slider-discrete slider-" + colorClass(data.color) + "'>" +
"<input type='range' min='0' max='100' value='" + data.value + "'>" +
@ -233,7 +233,7 @@ function start() {
break;
case UPDATE_SLIDER:
slider(data.id, data.value);
slider_move($('#sl'+data.id), data.value ,'100', false);
break;
default:
console.error('Unknown type or event');
@ -274,10 +274,6 @@ function padclick(type, number, isdown) {
}
}
function slider(number, value) {
console.log('Should update slider: ' + value);
}
function switcher(number, state) {
if (state == null) {
if ($('#s' + number).is(':checked')) {