From 86e5dc5018345f284e64dd0b414c3d2865a16c51 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 14 Nov 2007 08:27:39 +0000 Subject: [PATCH] =?utf8?q?Wenn=20eine=20Tabellenzelle=20gar=20keinen=20Inh?= =?utf8?q?alt=20hat,=20dann=20zumindest=20ein=20 =20erzwingen,=20dami?= =?utf8?q?t=20der=20Browser=20die=20Zelle=20auch=20formatiert=20(Tabellenr?= =?utf8?q?=C3=A4nder=20etc).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/ReportGenerator.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 617a27474..67d69a9be 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -311,7 +311,15 @@ sub prepare_html_content { 'data' => $self->html_format($col->{data}->[$i]), 'link' => $col->{link}->[$i], }; - }; + } + + # Force at least a   to be displayed so that browsers + # will format the table cell (e.g. borders etc). + if (!scalar @{ $col->{CELL_ROWS} }) { + push @{ $col->{CELL_ROWS} }, { 'data' => ' ' }; + } elsif ((1 == scalar @{ $col->{CELL_ROWS} }) && !$col->{CELL_ROWS}->[0]->{data}) { + $col->{CELL_ROWS}->[0]->{data} = ' '; + } } my $row_data = { -- 2.20.1