2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-11 20:39:47 +00:00

FB_CALLLIST: new reading "numberOfCalls" which shows the number of shown call entries.

git-svn-id: https://svn.fhem.de/fhem/trunk@11003 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2016-03-06 11:10:39 +00:00
parent 81c0f7f8bc
commit 56e8d4dff2
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# 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.
- feature: FB_CALLLIST: new reading "numberOfCalls" which shows the number
of shown call entries.
- bugfix: 00_SIGNALduino: updated firmware to 3.2.0-hf1
solves MU and MC issue
- bugfix: PRESENCE/presenced: fixed crash of presenced when receiving an

View File

@ -638,7 +638,7 @@ sub FB_CALLLIST_list2html($;$)
if(exists($hash->{helper}{DATA}) and (scalar keys %{$hash->{helper}{DATA}}) > 0)
{
my $count = 1;
my $count = 0;
my @json_list;
@ -656,6 +656,7 @@ sub FB_CALLLIST_list2html($;$)
foreach my $index (@list)
{
$count++;
my $data = \%{$hash->{helper}{DATA}{$index}};
my $number = $data->{external_number};
@ -667,7 +668,6 @@ sub FB_CALLLIST_list2html($;$)
$number = '<a href=\'#\' onclick="FW_cmd(FW_root+\'?XHR=1&cmd='.urlEncode($cmd).'\');return false;">'.$number."</a>";
}
$line = {
index => $index,
line => $count,
@ -682,12 +682,12 @@ sub FB_CALLLIST_list2html($;$)
duration => FB_CALLLIST_formatDuration($hash, $index)
};
push @json_output, FB_CALLLIST_returnOrderedJSONOutput($hash, $line);
FB_CALLLIST_updateReadings($hash, $line) if($to_json and $create_readings eq "1");
$ret .= FB_CALLLIST_returnOrderedHTMLOutput($hash, $line, 'number="'.$count.'" class="fbcalllist '.($count % 2 == 1 ? "odd" : "even").'"', 'class="fbcalllist" '.$td_style);
$count++;
}
readingsSingleUpdate($hash, "numberOfCalls", $count, 1) if($to_json and $create_readings eq "1");
}
else
{