浏览代码

Don't keep a row highlighted and checkbox checked when user clicked on the subject to view the message (only for fancy highlighting). This requires DOM Level 1 support for the 'parentNode' attribute.

pdontthink 20 年之前
父节点
当前提交
b06a6128b4
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      functions/mailbox_display.php

+ 9 - 0
functions/mailbox_display.php

@@ -419,6 +419,15 @@ function printMessageInfo($aMsg) {
                 $td_str .= '<a href="read_body.php?mailbox='.$urlMailbox
                         .  '&amp;passed_id='. $iId
                         .  '&amp;startMessage='.$start_msg.$searchstr.'"';
+
+                // don't highlight the row or check the checkbox 
+                // when clicking subject link (when fancy highlighting is on)
+                //
+                // parentNode property is DOM Level 1
+                //
+                if ($javascript_on && $fancy_index_highlite)
+                    $td_str .= ' onClick="row_click(\'msg[' . $t . ']\'); setPointer(this.parentNode.parentNode, ' . $t . ', \'click\', \'' . $hlt_color . '\', \'' . $mouseoverColor . '\', \'' . $clickedColor . '\')"';
+
                 $td_str .= ' ' .concat_hook_function('subject_link', array($start_msg, $searchstr));
                 if ($subject != $sSubject) {
                     $title = get_html_translation_table(HTML_SPECIALCHARS);