2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

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
This commit is contained in:
justme-1968 2015-12-12 11:35:11 +00:00
parent 37f567d80a
commit 80376edc76
2 changed files with 10 additions and 0 deletions

View File

@ -585,6 +585,11 @@ readingsGroup_value2html($$$$$$$$$)
if( $htmlTxt && $htmlTxt =~ m/class='fhemWidget'/ ) { if( $htmlTxt && $htmlTxt =~ m/class='fhemWidget'/ ) {
$htmlTxt =~ s/class='fhemWidget'/class='fhemWidget' informId='$d-$name.$n'/; $htmlTxt =~ s/class='fhemWidget'/class='fhemWidget' informId='$d-$name.$n'/;
$informid = ""; $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 ) { if( $htmlTxt ) {

View File

@ -15,6 +15,11 @@ FW_readingsGroupReadyFn() {
$(this).attr('informId', informId); $(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);
});
}); });
} }