From: kink Date: Sat, 21 Dec 2002 17:05:48 +0000 (+0000) Subject: Also give the remaining Subject column a width% that is the complement X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=e4b5f9d1937e37dc3c3151d67e09cfd54d96214e;hp=13400895d4525fbc0ac0ab85d137cdf9860af31a Also give the remaining Subject column a width% that is the complement of the sum of the other columns. This solves some macintosh-IE table problems and is more correct. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4301 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 914af9ed..c2cb0c86 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -791,8 +791,17 @@ function mail_message_listing_end($num_msgs, $paginator_str, $msg_cnt_str, $colo function printHeader($mailbox, $sort, $color, $showsort=true) { global $index_order; echo html_tag( 'tr' ,'' , 'center', $color[5] ); - for ($i = 1; $i <= count($index_order); $i++) { - switch ($index_order[$i]) { + + /* calculate the width of the subject column based on the + * widths of the other columns */ + $widths = array(1=>1,2=>25,3=>5,4=>0,5=>1,6=>5); + $subjectwidth = 100; + foreach($index_order as $item) { + $subjectwidth -= $widths[$item]; + } + + foreach ($index_order as $item) { + switch ($item) { case 1: /* checkbox */ case 5: /* flags */ echo html_tag( 'td' ,' ' , '', '', 'width="1%"' ); @@ -819,7 +828,7 @@ function printHeader($mailbox, $sort, $color, $showsort=true) { echo "\n"; break; case 4: /* subject */ - echo html_tag( 'td' ,'' , 'left', '', '' ) + echo html_tag( 'td' ,'' , 'left', '', 'width="'.$subjectwidth.'%"' ) . '' . _("Subject") . ''; if ($showsort) { ShowSortButton($sort, $mailbox, 4, 5);