mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 20:24:36 +00:00
FHEWMWEB: Disable connecting warning when clicking on value
git-svn-id: https://svn.fhem.de/fhem/trunk@3454 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8f153f7a01
commit
6b2429fa07
@ -2,6 +2,7 @@
|
|||||||
var FW_pollConn;
|
var FW_pollConn;
|
||||||
var FW_curLine; // Number of the next line in FW_pollConn.responseText to parse
|
var FW_curLine; // Number of the next line in FW_pollConn.responseText to parse
|
||||||
var FW_widgets = new Object(); // to be filled by fhemweb_*.js
|
var FW_widgets = new Object(); // to be filled by fhemweb_*.js
|
||||||
|
var FW_leaving;
|
||||||
|
|
||||||
function
|
function
|
||||||
FW_cmd(arg) /* see also FW_devState */
|
FW_cmd(arg) /* see also FW_devState */
|
||||||
@ -14,7 +15,7 @@ FW_cmd(arg) /* see also FW_devState */
|
|||||||
function
|
function
|
||||||
FW_doUpdate()
|
FW_doUpdate()
|
||||||
{
|
{
|
||||||
if(FW_pollConn.readyState == 4) {
|
if(FW_pollConn.readyState == 4 && !FW_leaving) {
|
||||||
var errdiv = document.createElement('div');
|
var errdiv = document.createElement('div');
|
||||||
errdiv.innerHTML = "Connection lost, reconnecting in 5 seconds...";
|
errdiv.innerHTML = "Connection lost, reconnecting in 5 seconds...";
|
||||||
errdiv.setAttribute("id","connect_err");
|
errdiv.setAttribute("id","connect_err");
|
||||||
@ -200,3 +201,9 @@ FW_querySetSelected(el, val)
|
|||||||
if(el.options[j].value == val)
|
if(el.options[j].value == val)
|
||||||
el.selectedIndex = j;
|
el.selectedIndex = j;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.onbeforeunload = function(e)
|
||||||
|
{
|
||||||
|
FW_leaving = 1;
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user