mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 04:36:02 +00:00
FHEMWEB: fix longpoll in smallscreen first room
git-svn-id: https://svn.fhem.de/fhem/trunk@5144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bacb31fe05
commit
c938c6e1f0
@ -1162,7 +1162,7 @@ FW_showRoom()
|
||||
|
||||
FW_pO "<form method=\"$FW_formmethod\" ".
|
||||
"action=\"$FW_ME\" autocomplete=\"off\">";
|
||||
FW_pO "<div id=\"content\">";
|
||||
FW_pO "<div id=\"content\" room=\"$FW_room\">";
|
||||
FW_pO "<table class=\"roomoverview\">"; # Need for equal width of subtables
|
||||
|
||||
my $rf = ($FW_room ? "&room=$FW_room" : ""); # stay in the room
|
||||
|
@ -4,6 +4,13 @@ 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
|
||||
log(txt)
|
||||
{
|
||||
if(typeof window.console != "undefined") // IE
|
||||
console.log(txt);
|
||||
}
|
||||
|
||||
function
|
||||
FW_cmd(arg) /* see also FW_devState */
|
||||
{
|
||||
@ -54,8 +61,10 @@ FW_doUpdate()
|
||||
lines.pop();
|
||||
var devs = new Array();
|
||||
for(var i=FW_curLine; i < lines.length; i++) {
|
||||
var d = lines[i].split("<<", 3); // Complete arg
|
||||
console.log("Got "+lines[i]);
|
||||
var l = lines[i];
|
||||
log("Longpoll: "+(l.length>132 ? l.substring(0,132)+"...("+l.length+")":l));
|
||||
var d = l.split("<<", 3); // Complete arg
|
||||
|
||||
if(d.length != 3)
|
||||
continue;
|
||||
var elArr = document.querySelectorAll("[informId='"+d[0]+"']");
|
||||
@ -129,6 +138,12 @@ FW_longpoll()
|
||||
name = name.substring(0,name.length-5);
|
||||
filter=".*;iconPath="+name;
|
||||
}
|
||||
if(filter == "") {
|
||||
var room = document.getElementById("content").getAttribute("room");
|
||||
if(room)
|
||||
filter="room="+room;
|
||||
}
|
||||
|
||||
var iP = document.body.getAttribute("iconPath");
|
||||
if(iP != null)
|
||||
filter = filter +";iconPath="+iP;
|
||||
|
Loading…
x
Reference in New Issue
Block a user