mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
FB_CALLLIST: fix longpoll updates when "attr disable 3" is active
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@16055 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b97b282ef5
commit
20743d565a
@ -918,58 +918,47 @@ sub FB_CALLLIST_list2html($)
|
||||
$ret .= "</td></tr>";
|
||||
}
|
||||
|
||||
if(AttrVal($name, "disable", "0") ne "3")
|
||||
|
||||
$ret .= "<tr><td>";
|
||||
$ret .= '<div class="fhemWidget" informId="'.$name.'" cmd="" arg="fbcalllist" dev="'.$name.'">'; # div tag to support inform updates
|
||||
$ret .= '<table class="block wide fbcalllist"'.((AttrVal($name, "disable", "0") eq "3") ? ' style="display:none;"' : '').'>';
|
||||
|
||||
$ret .= FB_CALLLIST_returnOrderedHTMLOutput($hash, FB_CALLLIST_returnTableHeader($hash), 'class="fbcalllist header"'.((AttrVal($name, "no-table-header", "0") eq "1") ? ' style="display:none;"' : ''),'');
|
||||
|
||||
if(AttrVal($name,'disable',"0") eq "2")
|
||||
{
|
||||
$ret .= "<tr><td>";
|
||||
$ret .= '<div class="fhemWidget" informId="'.$name.'" cmd="" arg="fbcalllist" dev="'.$name.'">'; # div tag to support inform updates
|
||||
$ret .= '<table class="block wide fbcalllist">';
|
||||
my $string = '<div style="color:#ff8888;"><i>'.((AttrVal($name, "language", "en") eq "de") ? "deaktiviert" : "disabled").'</i></div>';
|
||||
|
||||
$ret .= FB_CALLLIST_returnOrderedHTMLOutput($hash, FB_CALLLIST_returnTableHeader($hash), 'class="fbcalllist header"'.((AttrVal($name, "no-table-header", "0") eq "1") ? ' style="display:none;"' : ''),'');
|
||||
my @columns = split(",",AttrVal($name, "visible-columns", $hash->{helper}{DEFAULT_COLUMN_ORDER}));
|
||||
my $additional_columns = scalar(@columns);
|
||||
|
||||
if(AttrVal($name,'disable',"0") eq "2")
|
||||
$ret .= '<tr align="center" name="empty"><td style="padding:10px;" colspan="'.$additional_columns.'">'.$string.'</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
my @item_list = FB_CALLLIST_getAllItemLines($hash);
|
||||
|
||||
if(@item_list > 0)
|
||||
{
|
||||
my $string = '<div style="color:#ff8888;"><i>'.((AttrVal($name, "language", "en") eq "de") ? "deaktiviert" : "disabled").'</i></div>';
|
||||
foreach $line (@item_list)
|
||||
{
|
||||
$ret .= FB_CALLLIST_returnOrderedHTMLOutput($hash, $line, 'number="'.$line->{line}.'" index="'.$line->{index}.'" class="fbcalllist item '.($line->{line} % 2 == 1 ? "odd" : "even").'"', 'class="fbcalllist cell" '.$td_style);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
my $string = ((AttrVal($name, "language", "en") eq "de") ? "leer" : "empty");
|
||||
|
||||
my @columns = split(",",AttrVal($name, "visible-columns", $hash->{helper}{DEFAULT_COLUMN_ORDER}));
|
||||
my $additional_columns = scalar(@columns);
|
||||
|
||||
$ret .= '<tr align="center" name="empty"><td style="padding:10px;" colspan="'.$additional_columns.'">'.$string.'</td></tr>';
|
||||
$ret .= '<tr align="center" name="empty"><td style="padding:10px;" colspan="'.$additional_columns.'"><i>'.$string.'</i></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
my @item_list = FB_CALLLIST_getAllItemLines($hash);
|
||||
|
||||
if(@item_list > 0)
|
||||
{
|
||||
foreach $line (@item_list)
|
||||
{
|
||||
$ret .= FB_CALLLIST_returnOrderedHTMLOutput($hash, $line, 'number="'.$line->{line}.'" index="'.$line->{index}.'" class="fbcalllist item '.($line->{line} % 2 == 1 ? "odd" : "even").'"', 'class="fbcalllist cell" '.$td_style);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
my $string;
|
||||
|
||||
if(AttrVal($name, "language", "en") eq "de")
|
||||
{
|
||||
$string = "leer";
|
||||
}
|
||||
else
|
||||
{
|
||||
$string = "empty";
|
||||
}
|
||||
|
||||
my @columns = split(",",AttrVal($name, "visible-columns", $hash->{helper}{DEFAULT_COLUMN_ORDER}));
|
||||
my $additional_columns = scalar(@columns);
|
||||
|
||||
$ret .= '<tr align="center" name="empty"><td style="padding:10px;" colspan="'.$additional_columns.'"><i>'.$string.'</i></td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
$ret .= "</table></div>";
|
||||
$ret .= "</td></tr>";
|
||||
}
|
||||
|
||||
$ret .= "</table></div>";
|
||||
$ret .= "</td></tr>";
|
||||
|
||||
$ret .= "</table>";
|
||||
|
||||
return $ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user