diff --git a/fhem/CHANGED b/fhem/CHANGED index b64361d06..69cc2b084 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII - SVN + - feature: longpoll in multiple browserwindows, some css ids changed to class - feature: fhem.pl: version command added - feature: LightScene: add html overview of all configured scenes in detail view. allow usage of overview in a weblink. diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm index 42f7d2ee3..686c13ca0 100755 --- a/fhem/FHEM/01_FHEMWEB.pm +++ b/fhem/FHEM/01_FHEMWEB.pm @@ -700,11 +700,9 @@ FW_makeTable($$$@) if($n eq "DEF" && !$FW_hiddenroom{input}) { FW_makeEdit($name, $n, $val); - } - else { - + } else { FW_pO "
$n
"; - if(ref($val)) {#handle readings + if(ref($val)) { #handle readings my ($v, $t) = ($val->{VAL}, $val->{TIME}); $v = FW_htmlEscape($v); if($FW_ss) { @@ -712,42 +710,43 @@ FW_makeTable($$$@) FW_pO "
$v$t
"; } else { $t = "" if(!$t); - FW_pO "
$v
"; - FW_pO "
$t
"; + FW_pO "
$v
"; + FW_pO "
$t
"; } - } - else { + } else { $val = FW_htmlEscape($val); - # if possible provide link to reference - if ($n eq "room"){ - my @tmp; + # if possible provide link to reference + if ($n eq "room"){ + my @tmp; push @tmp,FW_pH("room=$_" , $_ ,0,"",1,1)foreach(split(",",$val)); - FW_pO "
" + FW_pO "
" .join(",",@tmp) ."
"; - } - elsif ($n eq "webCmd"){ - my @tmp; + } elsif ($n eq "webCmd"){ + my @tmp; push @tmp,FW_pH("cmd.$name=set $name $_&detail=$name" , $_ ,0,"",1,1)foreach(split(":",$val)); - FW_pO "
" + FW_pO "
" .join(":",@tmp) ."
"; - } - elsif ($n =~ m/^fp_(.*)/ && $defs{$1}){#special for Floorplan - FW_pH "detail=$1", $val,1; - } - else{ - my @tmp; + } elsif ($n =~ m/^fp_(.*)/ && $defs{$1}){#special for Floorplan + FW_pH "detail=$1", $val,1; + + } else { + my @tmp; foreach(split(",",$val)){ - if ($defs{$_}){ push @tmp, FW_pH( "detail=$_", $_ ,0,"",1,1);} - else{ push @tmp, $_;} - } - FW_pO "
" + if($defs{$_}) { + push @tmp, FW_pH( "detail=$_", $_ ,0,"",1,1); + } else { + push @tmp, $_;} + } + FW_pO "
" .join(",",@tmp) ."
"; - } + } } + } + FW_pH "cmd.$name=$cmd $name $n&detail=$name", $cmd, 1 if($cmd && !$FW_ss); FW_pO ""; @@ -990,7 +989,7 @@ FW_roomOverview($) my ($l1, $l2) = ($list1[$idx], $list2[$idx]); if(!$l1) { FW_pO "" if($idx); - FW_pO "" + FW_pO "
" if($idx$txt"; + FW_pO ""; ###### @@ -1812,7 +1811,7 @@ FW_displayFileList($@) { my ($heading,@files)= @_; FW_pO "$heading
"; - FW_pO "
$txt
"; + FW_pO "
"; my $row = 0; foreach my $f (@files) { FW_pO ""; @@ -1871,7 +1870,7 @@ FW_style($$) } elsif($a[1] eq "select") { my @fl = grep { $_ !~ m/floorplan/ } FW_fileList("$FW_cssdir/.*style.css"); - FW_pO "$start
"; + FW_pO "$start
"; my $row = 0; foreach my $file (@fl) { next if($file =~ m/svg_/); diff --git a/fhem/www/pgm2/brightstyle.css b/fhem/www/pgm2/brightstyle.css index 30280fb12..afc8c7b1b 100644 --- a/fhem/www/pgm2/brightstyle.css +++ b/fhem/www/pgm2/brightstyle.css @@ -24,11 +24,11 @@ table.block tr.sel { background: #cac8cf; } table.block td {border: 0px solid none;} div#menu table { width:100%; } -table#room { background: #eee; width: 100%; border: 1px solid lightgray; border-radius:3px; border-spacing:0px;} -table#room td { border-top: 1px solid #fff; border-bottom: 1px solid #ddd; padding: 5px 10px 4px; font-weight:bold; font-size:1.2em} -table#room a { color: #455667; text-decoration: none; } -table#room a:hover { color: #1f1f1f; } -table#room tr.sel { background: #cac8cf; } +table.room { background: #eee; width: 100%; border: 1px solid lightgray; border-radius:3px; border-spacing:0px;} +table.room td { border-top: 1px solid #fff; border-bottom: 1px solid #ddd; padding: 5px 10px 4px; font-weight:bold; font-size:1.2em} +table.room a { color: #455667; text-decoration: none; } +table.room a:hover { color: #1f1f1f; } +table.room tr.sel { background: #cac8cf; } input { outline:none; border:1px solid white; color: #344556; padding:2px; border-radius:1px;} input:focus { border: 1px solid red; } @@ -70,4 +70,4 @@ g.on { fill:red; } div[id*="Kalender-"] { width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } div[id*="disp"] { width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } table.block tr.even a[onclick*="Javascript"], table.block tr.odd a[onclick*="Javascript"] { font-weight: bold; cursor: pointer } -div.dval { margin-left:10px; } \ No newline at end of file +div.dval { margin-left:10px; } diff --git a/fhem/www/pgm2/console.js b/fhem/www/pgm2/console.js index 7a491e6e4..cd5f3b828 100644 --- a/fhem/www/pgm2/console.js +++ b/fhem/www/pgm2/console.js @@ -25,7 +25,6 @@ consUpdate() p.parentElement.parentElement.scrollTop = p.scrollHeight; // html tag else p.parentElement.scrollTop = p.scrollHeight; // body tag - console.log("P4:"+p.scrollHeight); } } @@ -37,7 +36,10 @@ consFill() document.body.removeChild(errdiv); consConn = new XMLHttpRequest(); - consConn.open("GET", document.location.pathname+"?XHR=1&inform=console", true); + // Needed when using multiple FF windows + var timestamp = "×tamp="+new Date().getTime(); + var query = document.location.pathname+"?XHR=1&inform=console"+timestamp; + consConn.open("GET", query, true); consConn.onreadystatechange = consUpdate; consConn.send(null); } diff --git a/fhem/www/pgm2/darkstyle.css b/fhem/www/pgm2/darkstyle.css index 916b4f432..0fc2f2da1 100644 --- a/fhem/www/pgm2/darkstyle.css +++ b/fhem/www/pgm2/darkstyle.css @@ -15,10 +15,10 @@ table.block tr.sel { background: red; } table { border-radius:8px; border-spacing: 0px; padding-bottom: 6px; padding-top: 6px;} -table#room { background: #111111; width: 140px;} -table#room a { color: #CCCCCC; text-decoration: none; } -table#room a:hover { color: #ffffff; } -table#room tr.sel { background: red; } +table.room { background: #111111; width: 140px;} +table.room a { color: #CCCCCC; text-decoration: none; } +table.room a:hover { color: #ffffff; } +table.room tr.sel { background: red; } th {color:red; text-align: left; padding-left: 10px; font-weight: bold;} td {padding-left: 10px; padding-right: 10px; padding-top: 3px; padding-bottom: 3px;} input {outline:none; background-color: #111111; diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index dce693b25..f272ec52b 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -33,8 +33,10 @@ FW_doUpdate() var d = lines[i].split("<<", 3); // Complete arg if(d.length != 3) continue; - var el = document.getElementById(d[0]); - if(el) { + + var elArr = document.querySelectorAll("[informId="+d[0]+"]"); + for (var k=0; k