2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 13:26:02 +00:00

Set only the state slider in detail view

git-svn-id: https://svn.fhem.de/fhem/trunk@2796 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-02-24 16:47:03 +00:00
parent 7318407987
commit b8ec9e3a3d

View File

@ -48,10 +48,20 @@ FW_doUpdate()
} }
} }
el = document.getElementById("slider."+d[0]); el = document.getElementById("slider."+d[0]);
if(el) { if(el) {
var val = d[1].replace(/[^\d\.]/g, ""); // remove non numbers var doSet = 1; // Only set the "state" slider in the detail view
Slider(el, val); if(el.parentNode.getAttribute("name") == "val.set"+d[0]) {
var el2 = document.getElementsByName("arg.set"+d[0])[0];
if(el2.nodeName.toLowerCase() == "select" &&
el2.options[el2.selectedIndex].value != "state")
doSet = 0;
}
if(doSet) {
var val = d[1].replace(/[^\d\.]/g, ""); // remove non numbers
Slider(el, val);
}
} }
} }
//Next time, we continue at the next line //Next time, we continue at the next line