mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
FHEMWEB: fix problem for identical attribute/reading (Forum #82586)
git-svn-id: https://svn.fhem.de/fhem/trunk@15850 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
27da034704
commit
86c7248925
@ -1203,6 +1203,7 @@ FW_makeTable($$$@)
|
||||
my $si = AttrVal("global", "showInternalValues", 0);
|
||||
|
||||
my $row = 1;
|
||||
my $prefix = ($title eq "Attributes" ? "a-" : "");
|
||||
foreach my $n (sort keys %{$hash}) {
|
||||
next if(!$si && $n =~ m/^\./); # Skip "hidden" Values
|
||||
my $val = $hash->{$n};
|
||||
@ -1236,12 +1237,12 @@ FW_makeTable($$$@)
|
||||
FW_pO "<td><div class=\"dval\">$v$t</div></td>";
|
||||
} else {
|
||||
$t = "" if(!$t);
|
||||
FW_pO "<td><div class=\"dval\" informId=\"$name-$n\">$v</div></td>";
|
||||
FW_pO "<td><div informId=\"$name-$n-ts\">$t</div></td>";
|
||||
FW_pO "<td><div class=\"dval\" informId=\"$name-$prefix$n\">$v</div></td>";
|
||||
FW_pO "<td><div informId=\"$name-$prefix$n-ts\">$t</div></td>";
|
||||
}
|
||||
} else {
|
||||
$val = FW_htmlEscape($val);
|
||||
my $tattr = "informId=\"$name-$n\" class=\"dval\"";
|
||||
my $tattr = "informId=\"$name-$prefix$n\" class=\"dval\"";
|
||||
|
||||
# if possible provide some links
|
||||
if ($n eq "room"){
|
||||
@ -2824,7 +2825,7 @@ FW_Notify($$)
|
||||
$dn = $1 if($dev->{CHANGED}->[0] =~ m/^MODIFIED (.*)$/);
|
||||
if($dev->{CHANGED}->[0] =~ m/^ATTR ([^ ]+) ([^ ]+) (.*)$/s) {
|
||||
$dn = $1;
|
||||
my @a = ("$2: $3");
|
||||
my @a = ("a-$2: $3");
|
||||
$events = \@a;
|
||||
}
|
||||
}
|
||||
|
@ -1232,8 +1232,10 @@ FW_replaceWidget(oldEl,devName,vArr,currVal,reading,set,params,cmd,readyFn)
|
||||
$(newEl).addClass(wn+"_widget");
|
||||
|
||||
if( $(newEl).find("[informId]").length==0 && !$(newEl).attr("informId") ) {
|
||||
if(reading)
|
||||
$(newEl).attr("informId", devName+"-"+reading);
|
||||
if(reading) {
|
||||
var a = $(oldEl).closest("form").find("input[type=submit][value=attr]");
|
||||
$(newEl).attr("informId", devName+(a.length?"-a-":"-")+reading);
|
||||
}
|
||||
var addTitle = $("body").attr("data-addHtmlTitle");
|
||||
if(reading != "state" && addTitle==1)
|
||||
$(newEl).attr("title", reading);
|
||||
|
Loading…
Reference in New Issue
Block a user