From ca9d284c63abe51b4472aa1f4115f98175e7c8db Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Fri, 20 Sep 2019 22:02:11 +0000 Subject: [PATCH] 95_Dashboard: change attribute "noLinks" to "dashboard_noLinks" git-svn-id: https://svn.fhem.de/fhem/trunk@20211 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/95_Dashboard.pm | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 3245a143b..66fc1b28b 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. + - 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 - feature: 49_SSCamSTRM: new attribute "noLink" - suppress link to detail view diff --git a/fhem/FHEM/95_Dashboard.pm b/fhem/FHEM/95_Dashboard.pm index 652b1ac24..3852237e7 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.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) ", @@ -115,7 +116,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}); @@ -805,12 +806,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 .= "$icon$devName"; # keine Links zur Detailansicht des Devices } else { $ret .= FW_pH ("detail=$d", "$icon$devName", 1, "col1", 1); # FW_pH = add href (, , , , , ) } - } + } $row++; @@ -827,6 +828,9 @@ 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"; @@ -1283,8 +1287,8 @@ return;
- -
  • noLinks
    + +
  • dashboard_noLinks
    No link generation to the detail view of the devices takes place.

    Note:
    @@ -1544,8 +1548,8 @@ return;

  • - -
  • noLinks
    + +
  • dashboard_noLinks
    Es erfolgt keine Linkerstellung zur Detailansicht von Devices.

    Hinweis: