Make table end nice
authorJamie Cameron <jcameron@webmin.com>
Tue, 1 Jan 2008 23:51:54 +0000 (23:51 +0000)
committerJamie Cameron <jcameron@webmin.com>
Tue, 1 Jan 2008 23:51:54 +0000 (23:51 +0000)
ui-lib.pl

index 1e36153..f2d51e8 100644 (file)
--- a/ui-lib.pl
+++ b/ui-lib.pl
@@ -24,8 +24,14 @@ return $rv;
 sub ui_table_end
 {
 return &theme_ui_table_end(@_) if (defined(&theme_ui_table_end));
+local $rv;
+if ($main::ui_table_cols == 4 && $main::ui_table_pos) {
+       # Add an empty block to balance the table
+       $rv .= &ui_table_row(" ", " ");
+       }
 $main::ui_table_default_tds = undef;
-return "</table></td></tr></table>\n";
+$rv .= "</table></td></tr></table>\n";
+return $rv;
 }
 
 # ui_columns_start(&headings, [width-percent], [noborder], [&tdtags], [heading])