htmlCode type for weblink added
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1311 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1681,7 +1681,12 @@ FW_showWeblink($$$$)
|
|||||||
my ($d, $v, $t, $buttons) = @_;
|
my ($d, $v, $t, $buttons) = @_;
|
||||||
|
|
||||||
my $attr = AttrVal($d, "htmlattr", "");
|
my $attr = AttrVal($d, "htmlattr", "");
|
||||||
if($t eq "link") {
|
|
||||||
|
if($t eq "htmlCode") {
|
||||||
|
$v = AnalyzePerlCommand(undef, $v) if($v =~ m/^{(.*)}$/);
|
||||||
|
FW_pO $v;
|
||||||
|
|
||||||
|
} elsif($t eq "link") {
|
||||||
FW_pO "<a href=\"$v\" $attr>$d</a>"; # no FW_pH, want to open extra browser
|
FW_pO "<a href=\"$v\" $attr>$d</a>"; # no FW_pH, want to open extra browser
|
||||||
|
|
||||||
} elsif($t eq "image") {
|
} elsif($t eq "image") {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ weblink_Define($$)
|
|||||||
{
|
{
|
||||||
my ($hash, $def) = @_;
|
my ($hash, $def) = @_;
|
||||||
my ($type, $name, $wltype, $link) = split("[ \t]+", $def, 4);
|
my ($type, $name, $wltype, $link) = split("[ \t]+", $def, 4);
|
||||||
my %thash = ( link=>1, fileplot=>1, image=>1, iframe=>1 );
|
my %thash = ( link=>1, fileplot=>1, image=>1, iframe=>1, htmlCode=>1 );
|
||||||
|
|
||||||
if(!$link || !$thash{$wltype}) {
|
if(!$link || !$thash{$wltype}) {
|
||||||
return "Usage: define <name> weblink [" .
|
return "Usage: define <name> weblink [" .
|
||||||
|
|||||||
Reference in New Issue
Block a user