diff --git a/fhem/FHEM/95_Dashboard.pm b/fhem/FHEM/95_Dashboard.pm index 3852237e7..1e10c7e97 100644 --- a/fhem/FHEM/95_Dashboard.pm +++ b/fhem/FHEM/95_Dashboard.pm @@ -55,6 +55,7 @@ use vars qw($FW_ss); # is smallscreen, needed by 97_GROUP/95_VIEW # Versions History intern our %Dashboard_vNotesIntern = ( + "3.13.1" => "21.09.2019 don't eliminate links for PageEnd-Devices ", "3.13.0" => "20.09.2019 change attribute noLinks to dashboard_noLinks, eliminate links for PageEnd-Devices ", "3.12.0" => "16.09.2019 new attribute noLinks, review comref and get-options ", "3.11.0" => "16.09.2019 attr dashboard_activetab is now working properly, commandref revised, calculate attribute ". @@ -828,9 +829,6 @@ sub Dashboard_BuildGroup ($$$$$$) { if ($devret !~ /informId/i) { $ret .= " informId=\"$d\""; } - if(AttrVal($name, "dashboard_noLinks", 0)) { - $devret =~ s/.*((.*)<\/a>).*/$2/mg; # keine Links zur Detailansicht des Devices für PageEnd Devices (bringen Link inkludiert mit) - } $ret .= ">$devret"; use strict "refs"; @@ -890,7 +888,7 @@ return $ret; ############################################################################################# sub Dashboard_GetMaxColumnId ($$) { my ($row, $colcount) = @_; - my $maxcolid = "0"; + my $maxcolid = "0"; if (index($row,"bottom") > 0) { $maxcolid = "200"; } elsif (index($row,"center") > 0) { $maxcolid = $colcount-1; } @@ -903,8 +901,8 @@ return $maxcolid; # ############################################################################################# sub Dashboard_CheckDashboardEntry ($) { - my ($hash) = @_; - my $now = time(); + my ($hash) = @_; + my $now = time(); my $timeToExec = $now + 5; RemoveInternalTimer($hash); diff --git a/fhem/contrib/DS_Starter/95_Dashboard.pm b/fhem/contrib/DS_Starter/95_Dashboard.pm index 49283e436..ce30abd55 100644 --- a/fhem/contrib/DS_Starter/95_Dashboard.pm +++ b/fhem/contrib/DS_Starter/95_Dashboard.pm @@ -1,4 +1,4 @@ -# $Id: 95_Dashboard.pm 20185 2019-09-17 22:13:48Z DS_Starter $ +# $Id: 95_Dashboard.pm 20211 2019-09-20 22:02:11Z DS_Starter $ ######################################################################################## # 95_Dashboard.pm # @@ -55,7 +55,9 @@ use vars qw($FW_ss); # is smallscreen, needed by 97_GROUP/95_VIEW # Versions History intern our %Dashboard_vNotesIntern = ( - "3.11.1" => "16.09.2019 new attribute noLinks ", + "3.13.1" => "21.09.2019 don't eliminate links for PageEnd-Devices ", + "3.13.0" => "20.09.2019 change attribute noLinks to dashboard_noLinks, eliminate links for PageEnd-Devices ", + "3.12.0" => "16.09.2019 new attribute noLinks, review comref and get-options ", "3.11.0" => "16.09.2019 attr dashboard_activetab is now working properly, commandref revised, calculate attribute ". "dashboard_activetab (is now a userattr) ", "3.10.1" => "29.06.2018 added FW_hideDisplayName, Forum #88727 ", @@ -115,7 +117,7 @@ sub Dashboard_Initialize ($) { "dashboard_tab[0-9]+rowcentercolwidth " . "dashboard_tab[0-9]+backgroundimage " . "dashboard_width ". - "noLinks:1,0 "; + "dashboard_noLinks:1,0 "; $data{FWEXT}{jquery}{SCRIPT} = "/pgm2/".$fwjquery if (!$data{FWEXT}{jquery}{SCRIPT}); $data{FWEXT}{jqueryui}{SCRIPT} = "/pgm2/".$fwjqueryui if (!$data{FWEXT}{jqueryui}{SCRIPT}); @@ -184,7 +186,7 @@ sub Dashboard_Get($@) { my $arg2 = (defined($a[2]) ? $a[2] : ""); if ($arg eq "config") { - my $name = $hash->{NAME}; + my $name = $hash->{NAME}; my $attrdata = $attr{$name}; if ($attrdata) { my $x = keys %$attrdata; @@ -201,7 +203,7 @@ sub Dashboard_Get($@) { foreach my $idir (@iconFolders) {$iconDirs .= "$attr{global}{modpath}/www/images/".$idir.",";} $res .= " \"icondirs\": \"$iconDirs\", \"dashboard_tabcount\": " . Dashboard_GetTabCount($hash, 0). ", \"dashboard_activetab\": " . Dashboard_GetActiveTab($hash->{NAME}); - $res .= ($i != $x) ? ",\n" : "\n"; + $res .= ($i != $x) ? ",\n" : "\n"; foreach my $attr (sort keys %$attrdata) { $i++; @@ -214,7 +216,7 @@ sub Dashboard_Get($@) { } else { next; } - $res .= ($i != $x) ? ",\n" : "\n"; + $res .= ($i != $x) ? ",\n" : "\n"; } $res .= " }\n"; $res .= "}\n"; @@ -240,11 +242,12 @@ sub Dashboard_Get($@) { } elsif ($arg eq "icon") { shift @a; shift @a; + return "Please provide only one icon whose path and full name is to show." if(!@a || $a[1]); my $icon = join (' ', @a); return FW_iconPath($icon); } else { - return "Unknown argument $arg choose one of config:noArg groupWidget tab icon"; + return "Unknown argument $arg choose one of config:noArg icon"; } } @@ -804,12 +807,12 @@ sub Dashboard_BuildGroup ($$$$$$) { $devName = "" if($modules{$defs{$d}{TYPE}}{FW_hideDisplayName}); # Forum 88667 if (!$modules{$defs{$d}{TYPE}}{FW_atPageEnd}) { # Don't show Link for "atEnd"-devices - if(AttrVal($name, "noLinks", 0)) { + if(AttrVal($name, "dashboard_noLinks", 0)) { $ret .= "