2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 04:36:36 +00:00

fhemweb_time.js/fhemweb_slider.js: enable function for disabled longpoll from Hoschiq (Forum 26313)

git-svn-id: https://svn.fhem.de/fhem/trunk@6834 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-10-30 07:13:02 +00:00
parent ca0eb3d84e
commit b2b49c04c1
2 changed files with 12 additions and 4 deletions

View File

@ -96,8 +96,12 @@ FW_sliderCreate(slider, curr)
document.ontouchmove = oldFn3; document.ontouchend = oldFn4;
if(cmd) {
if(cmd.substring(0,3) != "js:")
if(typeof val != "undefined")
FW_cmd(cmd.replace('%',val)+"&XHR=1");
if(typeof val != "undefined") {
if(typeof FW_pollConn != "undefined")
FW_cmd(cmd.replace('%',val)+"&XHR=1");
else
window.location = addcsrf(cmd.replace('%',val));
}
} else {
if(typeof val != "undefined")
slider.nextSibling.setAttribute('value', val);

View File

@ -19,8 +19,12 @@ FW_timeCreate(el,cmd)
if(brOff > 0) {
par.innerHTML = par.innerHTML.substring(0, brOff).replace('"-"','"+"');
if(cmd)
FW_cmd(cmd.replace('%',v)+"&XHR=1");
if(cmd) {
if(typeof FW_pollConn != "undefined")
FW_cmd(cmd.replace('%',v)+"&XHR=1");
else
window.location = addcsrf(cmd.replace('%',v));
}
return;
}