mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
FHEMWEB slider: avoid strange setting when just clicking on the slider
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@4262 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2a7b1b9134
commit
e9282fb762
@ -1,4 +1,5 @@
|
||||
/*************** SLIDER **************/
|
||||
|
||||
function
|
||||
FW_sliderUpdateLine(d)
|
||||
{
|
||||
@ -31,7 +32,7 @@ function
|
||||
FW_sliderCreate(slider, curr)
|
||||
{
|
||||
var sh = slider.firstChild;
|
||||
var lastX=-1, offX=0, maxX=0, val=-1;
|
||||
var lastX=-1, offX=0, maxX=0, val;
|
||||
var min = parseFloat(slider.getAttribute("min"));
|
||||
var stp = parseFloat(slider.getAttribute("stp"));
|
||||
var max = parseFloat(slider.getAttribute("max"));
|
||||
@ -93,10 +94,12 @@ FW_sliderCreate(slider, curr)
|
||||
document.ontouchmove = oldFn3; document.ontouchend = oldFn4;
|
||||
if(cmd) {
|
||||
if(cmd.substring(0,3) != "js:") {
|
||||
document.location = cmd.replace('%',val);
|
||||
if(typeof val != "undefined")
|
||||
document.location = cmd.replace('%',val);
|
||||
}
|
||||
} else {
|
||||
slider.nextSibling.setAttribute('value', val);
|
||||
if(typeof val != "undefined")
|
||||
slider.nextSibling.setAttribute('value', val);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user