From 50f2d4ec0e6cf9380f5cd473385755f10fa6669c Mon Sep 17 00:00:00 2001 From: justme1968 Date: Sat, 12 Dec 2015 11:35:11 +0000 Subject: [PATCH] 33_readingsGroup.pm: restored possibility to modify fhemwidget labels by mapping attribute git-svn-id: https://svn.fhem.de/fhem/trunk@10157 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/33_readingsGroup.pm | 5 +++++ fhem/www/pgm2/fhemweb_readingsGroup.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/fhem/FHEM/33_readingsGroup.pm b/fhem/FHEM/33_readingsGroup.pm index 410c03c16..5dcd63b4e 100644 --- a/fhem/FHEM/33_readingsGroup.pm +++ b/fhem/FHEM/33_readingsGroup.pm @@ -585,6 +585,11 @@ readingsGroup_value2html($$$$$$$$$) if( $htmlTxt && $htmlTxt =~ m/class='fhemWidget'/ ) { $htmlTxt =~ s/class='fhemWidget'/class='fhemWidget' informId='$d-$name.$n'/; $informid = ""; + + my $txt = lookup($hash->{helper}{mapping},$name,$name,$n,"",$room,$group,$cell_row,undef); + if( defined($txt) ) { + $informid = "rg-fhemWidget-label=\"$txt\""; + } } if( $htmlTxt ) { diff --git a/fhem/www/pgm2/fhemweb_readingsGroup.js b/fhem/www/pgm2/fhemweb_readingsGroup.js index 26018b57c..977ce1225 100644 --- a/fhem/www/pgm2/fhemweb_readingsGroup.js +++ b/fhem/www/pgm2/fhemweb_readingsGroup.js @@ -15,6 +15,11 @@ FW_readingsGroupReadyFn() { $(this).attr('informId', informId); } }); + + $(this).find("[rg-fhemWidget-label]").each(function() { + var txt = $(this).attr('rg-fhemWidget-label'); + $(this).find('div').first().contents().first().replaceWith(txt); + }); }); }