mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
01_FHEMWEB.pm: add $NAME to the sortby evaluation (Forum #59883)
git-svn-id: https://svn.fhem.de/fhem/trunk@13379 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
82e04ecbf4
commit
9f92772f80
@ -1698,7 +1698,12 @@ FW_sortIndex($)
|
||||
|
||||
my $val = $attr{$d}{sortby};
|
||||
if($val) {
|
||||
return $val =~ m/^{.*}/ ? AnalyzePerlCommand($FW_chash, $val) : lc($val);
|
||||
if($val =~ m/^{.*}/) {
|
||||
my %specials=("%NAME" => $d);
|
||||
my $exec = EvalSpecials($val, %specials);
|
||||
return AnalyzePerlCommand($FW_chash, $exec);
|
||||
}
|
||||
return lc($val);
|
||||
}
|
||||
|
||||
if($FW_room) {
|
||||
@ -3663,7 +3668,7 @@ FW_widgetOverride($$)
|
||||
Take the value of this attribute when sorting the devices in the room
|
||||
overview instead of the alias, or if that is missing the devicename
|
||||
itself. If the sortby value is enclosed in {} than it is evaluated as a
|
||||
perl expression.
|
||||
perl expression. $NAME is set to the device name.
|
||||
</li>
|
||||
<br>
|
||||
|
||||
@ -4394,7 +4399,7 @@ FW_widgetOverride($$)
|
||||
Räumen verwendet, sonst wäre es der Alias oder, wenn keiner
|
||||
da ist, der Gerätename selbst. Falls der Wert des sortby
|
||||
Attributes in {} eingeschlossen ist, dann wird er als ein perl Ausdruck
|
||||
evaluiert.
|
||||
evaluiert. $NAME wird auf dem Gerätenamen gesetzt.
|
||||
</li><br>
|
||||
|
||||
<a name="showUsedFiles"></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user