From: pdontthink Date: Wed, 30 Mar 2005 00:47:21 +0000 (+0000) Subject: Area around checkboxes is now also responsive to the fancy row highlighting and auto... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=34e035f76d08e1919ada7e68af9a304d2d6d4ddd Area around checkboxes is now also responsive to the fancy row highlighting and auto-checkbox clicks; also toggle all functionality now corresponds with the fancy row highlighting when in use. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9160 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 04b1c566..ad3355a2 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -300,6 +300,7 @@ function printMessageInfo($aMsg) { if (!isset($hlt_color)) { $hlt_color = $color_string; } + $col = 0; $sSubject = str_replace(' ', ' ', decodeHeader($sSubject)); $subject = processSubject($sSubject, $iIndent); @@ -328,15 +329,21 @@ function printMessageInfo($aMsg) { } - echo html_tag( 'tr','','','',$row_extra) . "\n"; + if ($javascript_on && $fancy_index_highlite) + echo ""; + echo html_tag( 'tr', '', '', '', $row_extra) . "\n"; // this does the auto-checking of the checkbox no matter // where on the row you click // $javascript_auto_click = ''; - if ($javascript_on && $fancy_index_highlite) + $checkbox_javascript = ''; + if ($javascript_on && $fancy_index_highlite) { $javascript_auto_click = ' onMouseDown="row_click(\'msg[' . $t . ']\')"'; + $checkbox_javascript = ' onClick="this.checked = !this.checked;"'; + } if (sizeof($index_order)) { @@ -386,9 +393,9 @@ function printMessageInfo($aMsg) { switch ($index_order_part) { case 1: /* checkbox */ echo html_tag( 'td', - addCheckBox("msg[$t]", $checkall, $iId), + addCheckBox("msg[$t]", $checkall, $iId, $checkbox_javascript), 'center', - $hlt_color ); + $hlt_color, $javascript_auto_click); break; case 2: /* from */ if ($senderAddress != $senderName) { @@ -1511,9 +1518,18 @@ function ShowSortButton($aMailbox, $Down, $Up ) { * @param array $aMailbox */ function get_selectall_link($aMailbox) { - global $checkall, $javascript_on; + global $checkall, $javascript_on, $fancy_index_highlite, $color; global $PHP_SELF; + // set this to an empty string to turn off extra + // highlighting of checked rows + // + //$clickedColor = ''; + if (!empty($color[16])) + $clickedColor = $color[16]; + else + $clickedColor = $color[2]; + $result = ''; if ($javascript_on) { $safe_name = preg_replace("/[^0-9A-Za-z_]/", '_', $aMailbox['NAME']); @@ -1521,12 +1537,14 @@ function get_selectall_link($aMailbox) { $form_name = "FormMsgs" . $safe_name; $result = '