From 9c928f052558bd5cdf7c680adfa7ae69b88403d4 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 24 Aug 2007 21:11:31 +0000 Subject: [PATCH] Fix message highlighting again git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12596 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- templates/default/message_list.tpl | 39 ++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/templates/default/message_list.tpl b/templates/default/message_list.tpl index 9e8052ca..0e7f5473 100644 --- a/templates/default/message_list.tpl +++ b/templates/default/message_list.tpl @@ -257,7 +257,6 @@ if ($pageOffset < $end_msg) { // this stuff does the auto row highlighting on mouseover // if ($javascript_on && $fancy_index_highlite) { - $mouseoverColor = $color[5]; $checkbox_javascript = ' onclick="this.checked = !this.checked;"'; } else { $checkbox_javascript = ''; @@ -319,12 +318,28 @@ if ($pageOffset < $end_msg) { } } + + /** + * Message Highlighting Functionality + */ if (isset($aMsg['row']['color'])) { - $bgcolor = $aMsg['row']['color']; - $class = 'misc'.$i; + if ($checkall && $javascript_on && $fancy_index_highlite) { +//FIXME: would be best not to use $color directly here; want to move this to be a CSS style-defined value only, but the problem is that this CSS class is being defined on the fly right here + $bgcolor = $color[16]; + $class = 'clicked_misc'.$i; + } else { + $bgcolor = $aMsg['row']['color']; + $class = 'misc'.$i; + } + $non_clicked_class = 'misc'.$i; + $non_clicked_bgcolor = $aMsg['row']['color']; + } + else + { + $bgcolor = ''; + $non_clicked_bgcolor = ''; } - else $bgcolor = ''; $row_extra = ''; @@ -342,13 +357,14 @@ if ($pageOffset < $end_msg) { $javascript_auto_click = " onmousedown=\"row_click('$form_id"."_msg$i')\""; } + /* * Message Highlighting requires a unique CSS class declaration for proper * mouseover functionality. There is no harm in doing this when the mouseover * functionality is disabled */ if ($class != 'even' && $class != 'odd' - && $class != 'even_checked' && $class != 'odd_checked') + && $class != 'clicked_even' && $class != 'clicked_odd') { ?> + + >