From 5d0c138dfef2e4ca413dd7c31d260c82056073ce Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 6 May 2013 06:29:47 +0000 Subject: [PATCH] cmdList patch by justme1968 git-svn-id: https://svn.fhem.de/fhem/trunk@3157 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_weblink.pm | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/98_weblink.pm b/fhem/FHEM/98_weblink.pm index 9300d1267..5820072ae 100755 --- a/fhem/FHEM/98_weblink.pm +++ b/fhem/FHEM/98_weblink.pm @@ -38,7 +38,7 @@ weblink_Define($$) { my ($hash, $def) = @_; my ($type, $name, $wltype, $link) = split("[ \t]+", $def, 4); - my %thash = ( link=>1, fileplot=>1, dbplot=>1, image=>1, iframe=>1, htmlCode=>1 ); + my %thash = ( link=>1, fileplot=>1, dbplot=>1, image=>1, iframe=>1, htmlCode=>1, cmdList=>1 ); if(!$link || !$thash{$wltype}) { return "Usage: define weblink [" . @@ -138,6 +138,25 @@ weblink_FwFn($$$$) $ret = "" . weblink_FwDetail($d); + } elsif($wltype eq "cmdList") { + + my @lines = split(" ", $link); + my $row = 0; + my $ret = ""; + $ret .= ""; + $ret .= ""; + $ret .= "
"; + foreach my $line (@lines) { + my @args = split(":", $line, 3); + + $ret .= ""; + $ret .= ""; + $ret .= ""; + } + $ret .= "
\"$args[0]\" $args[1]

"; + + return $ret; + } elsif($wltype eq "fileplot" || $wltype eq "dbplot" ) { # plots navigation buttons @@ -419,7 +438,7 @@ weblink_WriteGplot($) Define
@@ -447,6 +467,7 @@ weblink_WriteGplot($) the current logfile to a weblink, it will always refer to the current file, even if its name changes regularly (and not the one you originally specified). +
  • For cmdList <argument> consist of a list of space separated icon:label:cmd triples.