diff --git a/fhem/CHANGED b/fhem/CHANGED index 6ded46ee3..b65dc55a1 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,11 +1,13 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - change: 02_RSS: replaced refresh method by javascript DOM gymnastics - change: 59_Weather: removed empty header row from WeatherAsHtmlV - feature: 02_HTTPSRV: support tabletui (Forum #37232) - bugfix: SOMFY: Only send stop if position changed improved timing for position update fix typos (go-my instead of go_my) - - feature: ios6touchpadstyle: style adjustments for the Dashboard module version 3.0 + - feature: ios6touchpadstyle: style adjustments for the Dashboard + module version 3.0 - bugfix: 10_IT: Correct command parsing (forum id 38467) - bugfix: Dashboard: corrected version number - feature: SYSSTAT: added mibs attribute for snmp monitoring diff --git a/fhem/FHEM/02_RSS.pm b/fhem/FHEM/02_RSS.pm index f7003b3d6..7200586e6 100644 --- a/fhem/FHEM/02_RSS.pm +++ b/fhem/FHEM/02_RSS.pm @@ -45,6 +45,7 @@ RSS_addExtension($$$) { $data{FWEXT}{$url}{FUNC} = $func; $data{FWEXT}{$url}{LINK} = "+$link"; $data{FWEXT}{$url}{NAME} = $friendlyname; + $data{FWEXT}{$url}{SCRIPT} = "RSS.js"; $data{FWEXT}{$url}{FORKABLE} = 0; } @@ -255,8 +256,8 @@ RSS_returnRSS($) { sub RSS_getScript() { - my $scripts= ""; my $jsTemplate = ''; + my $scripts= ""; if(defined($data{FWEXT})) { foreach my $k (sort keys %{$data{FWEXT}}) { my $h = $data{FWEXT}{$k}; @@ -275,17 +276,11 @@ RSS_HTMLHead($$) { my $doctype= ''; my $xmlns= 'xmlns="http://www.w3.org/1999/xhtml"'; - my $r= (defined($refresh) && $refresh > 0) ? "\n" : ""; - # css and js header output should be coded only in one place - my $css= ""; - #my $cssTemplate = "\n"; - #$css= sprintf($cssTemplate, "pgm2/style.css"); - #$css.= sprintf($cssTemplate, "pgm2/jquery-ui.min.css"); - #map { $css.= sprintf($cssTemplate, $_); } split(" ", AttrVal($FW_wname, "CssFiles", "")); my $scripts= RSS_getScript(); - my $code= "$doctype\n\n\n$title\n$r$css$scripts\n"; + my $code= "$doctype\n\n\n$title\n$scripts\n"; } + sub RSS_HTMLTail() { return ""; @@ -301,9 +296,15 @@ RSS_returnHTML($) { my $refresh= AttrVal($name, 'refresh', 60); my $areas= AttrVal($name, 'areas', ""); my $embed= $defs{$name}{".embed"}; - $defs{$name}{".embed"} = undef; + my $r= (defined($refresh) && ($refresh> 0)) ? " onload=\"setTimeout(function(){reloadImage(\'img0\')},$refresh*1000);\"" : ""; my $code= RSS_HTMLHead($name, $refresh) . - "\n
\n\n\n$areas\n\n
\n$embed\n" . + "\n" . + "
\n" . + "\n" . + "\n$areas\n\n" . + "
\n" . + "$embed\n" . + "\n" . RSS_HTMLTail(); return ("text/html; charset=utf-8", $code); } @@ -531,6 +532,8 @@ RSS_evalLayout($$@) { $params{x}= 0; $params{y}= 0; + $defs{$name}{".embed"}= ""; + my ($x,$y,$z,$x1,$y1,$x2,$y2,$scale,$bgcolor,$boxwidth,$text,$imgtype,$srctype,$arg,$format); @@ -545,7 +548,7 @@ RSS_evalLayout($$@) { if($line=~ s/\\$//) { $cont= $line; undef $line; } next unless($line); $cont= ""; - #Debug "$name: evaluating >$line<"; + Debug "$name: evaluating >$line<"; # split line into command and definition my ($cmd, $def)= split("[ \t]+", $line, 2); #Debug "CMD= \"$cmd\", DEF= \"$def\""; @@ -680,6 +683,7 @@ RSS_evalLayout($$@) { $defs{$name}{".embed"} .= "
\n"; $defs{$name}{".embed"} .= $arg."\n"; $defs{$name}{".embed"} .= "
\n"; + main::Debug "SET EMBED=" . $defs{$name}{".embed"}; } else { Log3 $name, 2, "$name: Illegal command $cmd in layout definition."; }