mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
98_weblink.pm: add disable attributes (Forum #43857)
git-svn-id: https://svn.fhem.de/fhem/trunk@9861 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5e9a0065e9
commit
dda0b2e89c
@ -14,7 +14,8 @@ weblink_Initialize($)
|
|||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
|
|
||||||
$hash->{DefFn} = "weblink_Define";
|
$hash->{DefFn} = "weblink_Define";
|
||||||
$hash->{AttrList} = "htmlattr nodetaillink:1,0";
|
$hash->{AttrList} =
|
||||||
|
"disable:0,1 disabledForIntervals htmlattr nodetaillink:1,0";
|
||||||
$hash->{FW_summaryFn} = "weblink_FwFn";
|
$hash->{FW_summaryFn} = "weblink_FwFn";
|
||||||
$hash->{FW_detailFn} = "weblink_FwFn";
|
$hash->{FW_detailFn} = "weblink_FwFn";
|
||||||
$hash->{FW_atPageEnd} = 1;
|
$hash->{FW_atPageEnd} = 1;
|
||||||
@ -90,6 +91,7 @@ weblink_FwFn($$$$)
|
|||||||
my $wltype = $hash->{WLTYPE};
|
my $wltype = $hash->{WLTYPE};
|
||||||
my $ret = "";
|
my $ret = "";
|
||||||
|
|
||||||
|
return "" if(IsDisabled($d));
|
||||||
my $attr = AttrVal($d, "htmlattr", "");
|
my $attr = AttrVal($d, "htmlattr", "");
|
||||||
if($wltype eq "htmlCode") {
|
if($wltype eq "htmlCode") {
|
||||||
$link = AnalyzePerlCommand(undef, $link) if($link =~ m/^{(.*)}$/s);
|
$link = AnalyzePerlCommand(undef, $link) if($link =~ m/^{(.*)}$/s);
|
||||||
@ -186,7 +188,7 @@ weblink_FwFn($$$$)
|
|||||||
E.g.:<br>
|
E.g.:<br>
|
||||||
<ul>
|
<ul>
|
||||||
<code>
|
<code>
|
||||||
define yw weblink wl_im1 iframe http://weather.yahooapis.com/forecastrss?w=650272&u=c<br>
|
define yw weblink iframe http://weather.yahooapis.com/forecastrss?w=650272&u=c<br>
|
||||||
attr yw weblink htmlattr width="480" height="560"<br>
|
attr yw weblink htmlattr width="480" height="560"<br>
|
||||||
</code>
|
</code>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
@ -195,6 +197,9 @@ weblink_FwFn($$$$)
|
|||||||
<li>nodetaillink<br>
|
<li>nodetaillink<br>
|
||||||
Show no detail link for the types image and iframe.
|
Show no detail link for the types image and iframe.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li><a href="#disable">disable</a></li>
|
||||||
|
<li><a href="#disabledForIntervals">disabledForIntervals</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user