2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-29 17:37:09 +00:00

FB_CALLLIST: don't create html code in readings when create-readings attribute is activated and number-cmd attribute is set.

git-svn-id: https://svn.fhem.de/fhem/trunk@11055 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2016-03-13 16:41:00 +00:00
parent 8d1cf8bfcc
commit a35001a77f

View File

@ -769,13 +769,6 @@ sub FB_CALLLIST_list2html($;$)
my $number = $data->{external_number};
if(defined(my $cmd = AttrVal($name, "number-cmd", undef)))
{
$cmd =~ s/\$NUMBER/$number/g;
$number = '<a href=\'#\' onclick="FW_cmd(FW_root+\'?XHR=1&cmd='.urlEncode($cmd).'\');return false;">'.$number."</a>";
}
$line = {
index => $index,
line => $count,
@ -790,8 +783,17 @@ 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");
if(defined(my $cmd = AttrVal($name, "number-cmd", undef)))
{
$cmd =~ s/\$NUMBER/$number/g;
$line->{number} = '<a href=\'#\' onclick="FW_cmd(FW_root+\'?XHR=1&cmd='.urlEncode($cmd).'\');return false;">'.$number."</a>";
}
push @json_output, FB_CALLLIST_returnOrderedJSONOutput($hash, $line);
$ret .= FB_CALLLIST_returnOrderedHTMLOutput($hash, $line, 'number="'.$count.'" class="fbcalllist '.($count % 2 == 1 ? "odd" : "even").'"', 'class="fbcalllist" '.$td_style);
}