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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@6834 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-10-30 07:13:02 +00:00
parent 3090531790
commit bee94f9f1a
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;
}