fhemweb.js: remove "Connection lost" messages on iOS when changing the room

git-svn-id: https://svn.fhem.de/fhem/trunk@8928 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-07-09 13:53:11 +00:00
parent 844a12db86
commit 063c0537cc

View File

@@ -349,9 +349,19 @@ FW_replaceLink(el)
attr = attr.replace(/^location.href='/,'');
attr = attr.replace(/'$/,'');
}
var ma = attr.match(/^(.*\?)(cmd[^=]*=.*)$/);
if(ma == null || ma.length == 0 || !ma[2].match(/=(save|set)/))
if(ma == null || ma.length == 0 || !ma[2].match(/=(save|set)/)) {
ma = attr.match(new RegExp("^"+FW_root)); // Avoid "Connection lost" @iOS
if(ma) {
$(el).click(function() {
FW_leaving = 1;
location.href = attr;
});
}
return;
}
$(el).removeAttr("href");
$(el).removeAttr("onclick");
$(el).click(function() {