mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +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_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_leaving;
|
||||
|
||||
function
|
||||
FW_cmd(arg) /* see also FW_devState */
|
||||
@ -14,7 +15,7 @@ FW_cmd(arg) /* see also FW_devState */
|
||||
function
|
||||
FW_doUpdate()
|
||||
{
|
||||
if(FW_pollConn.readyState == 4) {
|
||||
if(FW_pollConn.readyState == 4 && !FW_leaving) {
|
||||
var errdiv = document.createElement('div');
|
||||
errdiv.innerHTML = "Connection lost, reconnecting in 5 seconds...";
|
||||
errdiv.setAttribute("id","connect_err");
|
||||
@ -200,3 +201,9 @@ FW_querySetSelected(el, val)
|
||||
if(el.options[j].value == val)
|
||||
el.selectedIndex = j;
|
||||
}
|
||||
|
||||
window.onbeforeunload = function(e)
|
||||
{
|
||||
FW_leaving = 1;
|
||||
return undefined;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user