2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +00:00

htmlCode type for weblink added

git-svn-id: https://svn.fhem.de/fhem/trunk@1311 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-03-04 09:20:26 +00:00
parent 2b945f677b
commit c74b6afb18
2 changed files with 7 additions and 2 deletions

View File

@ -1681,7 +1681,12 @@ FW_showWeblink($$$$)
my ($d, $v, $t, $buttons) = @_;
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
} elsif($t eq "image") {

View File

@ -22,7 +22,7 @@ weblink_Define($$)
{
my ($hash, $def) = @_;
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}) {
return "Usage: define <name> weblink [" .