mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
02_RSS: new attribute noscroll
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@9821 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1e7bf8d1f8
commit
270ebb8e35
1
CHANGED
1
CHANGED
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 02_RSS: new attribute noscroll
|
||||||
- feature: 98_help: replace anchor links in help output with a working
|
- feature: 98_help: replace anchor links in help output with a working
|
||||||
link to local commandref or fhem.de
|
link to local commandref or fhem.de
|
||||||
- bugfix: 70_XBMC: reworked RPC ID generation
|
- bugfix: 70_XBMC: reworked RPC ID generation
|
||||||
|
@ -56,7 +56,7 @@ RSS_Initialize($) {
|
|||||||
$hash->{DefFn} = "RSS_Define";
|
$hash->{DefFn} = "RSS_Define";
|
||||||
$hash->{UndefFn} = "RSS_Undefine";
|
$hash->{UndefFn} = "RSS_Undefine";
|
||||||
#$hash->{AttrFn} = "RSS_Attr";
|
#$hash->{AttrFn} = "RSS_Attr";
|
||||||
$hash->{AttrList} = "size bg bgcolor tmin refresh areas autoreread:1,0 viewport";
|
$hash->{AttrList} = "size bg bgcolor tmin refresh areas autoreread:1,0 viewport noscroll";
|
||||||
$hash->{SetFn} = "RSS_Set";
|
$hash->{SetFn} = "RSS_Set";
|
||||||
$hash->{NotifyFn} = "RSS_Notify";
|
$hash->{NotifyFn} = "RSS_Notify";
|
||||||
|
|
||||||
@ -299,11 +299,13 @@ RSS_returnHTML($) {
|
|||||||
my $type = $defs{$name}{fhem}{style};
|
my $type = $defs{$name}{fhem}{style};
|
||||||
my $img= "$url/rss/$name.$type";
|
my $img= "$url/rss/$name.$type";
|
||||||
my $refresh= AttrVal($name, 'refresh', 60);
|
my $refresh= AttrVal($name, 'refresh', 60);
|
||||||
|
my $noscroll= AttrVal($name, 'noscroll', 0);
|
||||||
|
my $overflow= $noscroll ? " style=\"overflow:hidden\"" : "";
|
||||||
my $areas= AttrVal($name, 'areas', "");
|
my $areas= AttrVal($name, 'areas', "");
|
||||||
my $embed= $defs{$name}{".embed"};
|
my $embed= $defs{$name}{".embed"};
|
||||||
my $r= (defined($refresh) && ($refresh> 0)) ? " onload=\"setTimeout(function(){reloadImage(\'img0\')},$refresh*1000);\"" : "";
|
my $r= (defined($refresh) && ($refresh> 0)) ? " onload=\"setTimeout(function(){reloadImage(\'img0\')},$refresh*1000);\"" : "";
|
||||||
my $code= RSS_HTMLHead($name, $refresh) .
|
my $code= RSS_HTMLHead($name, $refresh) .
|
||||||
"<body topmargin=\"0\" leftmargin=\"0\" margin=\"0\" padding=\"0\">\n" .
|
"<body topmargin=\"0\" leftmargin=\"0\" margin=\"0\" padding=\"0\"$overflow>\n" .
|
||||||
"<div id=\"rss_$name\" style=\"z-index:1;\" >\n" .
|
"<div id=\"rss_$name\" style=\"z-index:1;\" >\n" .
|
||||||
"<img id=\"img0\" src=\"$img\" usemap=\"#map\"$r/>\n" .
|
"<img id=\"img0\" src=\"$img\" usemap=\"#map\"$r/>\n" .
|
||||||
"<map name=\"map\" id=\"map\">\n$areas\n</map>\n" .
|
"<map name=\"map\" id=\"map\">\n$areas\n</map>\n" .
|
||||||
@ -1006,6 +1008,8 @@ plotFromUrl(@)
|
|||||||
Example: <code>attr FrameRSS viewport width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0</code><br>
|
Example: <code>attr FrameRSS viewport width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0</code><br>
|
||||||
This scales the image to fit to the browser's viewport and inhibits zooming in or out on tablets.
|
This scales the image to fit to the browser's viewport and inhibits zooming in or out on tablets.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
<li>noscroll</br>Suppresses scrollbars in browsers, if set to 1.
|
||||||
|
</li><br>
|
||||||
<li>areas<br>HTML code that goes into the image map.<br>
|
<li>areas<br>HTML code that goes into the image map.<br>
|
||||||
Example: <code>attr FrameRSS areas <area shape="rect" coords="0,0,200,200" href="http://fhem.de"/><area shape="rect" coords="600,400,799,599" href="http://has:8083/fhem" target="_top"/></code>
|
Example: <code>attr FrameRSS areas <area shape="rect" coords="0,0,200,200" href="http://fhem.de"/><area shape="rect" coords="600,400,799,599" href="http://has:8083/fhem" target="_top"/></code>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user