From 2abc231271baed7d239d51b47687546b9dbabd72 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Sat, 21 Sep 2019 08:02:04 +0000 Subject: [PATCH] 95_Dashboard: fix eliminating links to detail view git-svn-id: https://svn.fhem.de/fhem/trunk@20215 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/95_Dashboard.pm | 14 ++++++++------ fhem/contrib/DS_Starter/95_Dashboard.pm | 14 ++++++++------ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 66fc1b28b..02e5eee97 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 95_Dashboard: fix eliminating links to detail view - change: 95_Dashboard: change attribute "noLinks" to "dashboard_noLinks" - bugfix: 98_todoist: better API v8 fix - feature: 95_Dashboard: new attribute "noLinks" - no links to devices detail diff --git a/fhem/FHEM/95_Dashboard.pm b/fhem/FHEM/95_Dashboard.pm index 1e10c7e97..86c4265fe 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.2" => "21.09.2019 new solution to eliminate links for all Devices ", "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 ", @@ -865,6 +866,9 @@ sub Dashboard_BuildGroup ($$$$$$) { } } $ret .= ""; + if(AttrVal($name, "dashboard_noLinks", 0)) { + $ret =~ s/((.*)<\/a>)/$2/s; # keine Links zur Detailansicht des Devices + } } $ret .= ""; @@ -1290,9 +1294,8 @@ return; No link generation to the detail view of the devices takes place.

Note:
- Some device types deliver the links to their detail view integrated in the devices name or alias. - In such cases you have to deactivate the link generation inside of the device (for example in devices of type readingsGroup, - SSCamSTRM, SVG or SMAPortal). + Some device types deliver the links to their detail view integrated in the device. + In such cases you have to deactivate the link generation inside of the device (for example in SMAPortalSPG).
@@ -1551,9 +1554,8 @@ return; Es erfolgt keine Linkerstellung zur Detailansicht von Devices.

Hinweis:
- Bei manchen Devicetypen wird der Link zur Detailansicht integriert im Namen bzw. Alias des Device mitgeliefert. - In diesen Fällen muß die Linkgenerierung direkt im Device abgestellt werden (z.B. bei Devices der Typen readingsGroup, - SSCamSTRM, SVG oder SMAPortal). + Bei manchen Devicetypen wird der Link zur Detailansicht integriert im Device mitgeliefert. + In diesen Fällen muß die Linkgenerierung direkt im Device abgestellt werden (z.B. bei SMAPortalSPG).
diff --git a/fhem/contrib/DS_Starter/95_Dashboard.pm b/fhem/contrib/DS_Starter/95_Dashboard.pm index ce30abd55..de2282802 100644 --- a/fhem/contrib/DS_Starter/95_Dashboard.pm +++ b/fhem/contrib/DS_Starter/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.2" => "21.09.2019 new solution to eliminate links for all Devices ", "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 ", @@ -865,6 +866,9 @@ sub Dashboard_BuildGroup ($$$$$$) { } } $ret .= ""; + if(AttrVal($name, "dashboard_noLinks", 0)) { + $ret =~ s/((.*)<\/a>)/$2/s; # keine Links zur Detailansicht des Devices + } } $ret .= ""; @@ -1290,9 +1294,8 @@ return; No link generation to the detail view of the devices takes place.

Note:
- Some device types deliver the links to their detail view integrated in the devices name or alias. - In such cases you have to deactivate the link generation inside of the device (for example in devices of type readingsGroup, - SSCamSTRM, SVG or SMAPortal). + Some device types deliver the links to their detail view integrated in the device. + In such cases you have to deactivate the link generation inside of the device (for example in SMAPortalSPG).
@@ -1551,9 +1554,8 @@ return; Es erfolgt keine Linkerstellung zur Detailansicht von Devices.

Hinweis:
- Bei manchen Devicetypen wird der Link zur Detailansicht integriert im Namen bzw. Alias des Device mitgeliefert. - In diesen Fällen muß die Linkgenerierung direkt im Device abgestellt werden (z.B. bei Devices der Typen readingsGroup, - SSCamSTRM, SVG oder SMAPortal). + Bei manchen Devicetypen wird der Link zur Detailansicht integriert im Device mitgeliefert. + In diesen Fällen muß die Linkgenerierung direkt im Device abgestellt werden (z.B. bei SMAPortalSPG).