2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

contrib/InfoPanel: added target selector for a href

git-svn-id: https://svn.fhem.de/fhem/trunk@7806 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2015-01-31 20:10:14 +00:00
parent 07f2508d25
commit 512dfae096

View File

@ -185,11 +185,16 @@ sub btIP_readLayout($) {
##### Items
sub btIP_itemArea {
my ($id,$x1,$y1,$x2,$y2,$target,%params)= @_;
my ($id,$x1,$y1,$x2,$y2,$link,%params)= @_;
$id = ($id eq '-') ? createUniqueId() : $id;
my $width = $x2 - $x1;
my $height = $y2 - $y1;
my $output = "<a id=\”$id\” x=\"$x1\" y=\"$y1\" width=\"$width\" height=\"$height\" xlink:href=\"$target\" >\n";
my $target = 'secret';
$target = '_top' if $link =~ s/^-//;
$target = '_blank' if $link =~ s/^\+//;
my $output = "<a id=\”$id\” x=\"$x1\" y=\"$y1\" width=\"$width\" height=\"$height\" xlink:href=\"$link\" target=\"$target\" >\n";
$output .= "<rect id=\”$id\” x=\"$x1\" y=\"$y1\" width=\"$width\" height=\"$height\" opacity=\"0\" />\n";
$output .= "</a>\n";
return $output;