From a4cca6e24bd1fefe1ee5d6c212b47335c10c9618 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 7 May 2008 08:46:22 +0000 Subject: [PATCH] Carry event object for click events into called JS code git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13099 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- templates/default/js/default.js | 2 +- templates/default/message_list.tpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/default/js/default.js b/templates/default/js/default.js index 2c9af1d2..8313cb15 100644 --- a/templates/default/js/default.js +++ b/templates/default/js/default.js @@ -14,7 +14,7 @@ var orig_row_colors = new Array(); * * @param string the name of the checkbox that should be (un)checked */ -function row_click(chkboxName) { +function row_click(chkboxName, event) { var chkbox = document.getElementById(chkboxName); if (chkbox) { // initialize orig_row_color if not defined already diff --git a/templates/default/message_list.tpl b/templates/default/message_list.tpl index cc291d3f..e946bac7 100644 --- a/templates/default/message_list.tpl +++ b/templates/default/message_list.tpl @@ -361,7 +361,7 @@ if ($pageOffset < $end_msg) { $javascript_auto_click = ''; if ($javascript_on && $fancy_index_highlite) { // include the form_id in order to show multiple messages lists. Otherwise id isn't unique - $javascript_auto_click = " onmousedown=\"row_click('$form_id"."_msg$i')\""; + $javascript_auto_click = " onmousedown=\"row_click('$form_id"."_msg$i', event)\""; } @@ -461,7 +461,7 @@ if ($non_clicked_class != 'even' && $non_clicked_class != 'odd' if ($onclick) { $sText .= " onclick=\"$onclick\""; } if ($link_extra) { $sText .= " $link_extra"; } if ($javascript_on && $fancy_index_highlite) { - $sText .= " onmousedown=\"row_click('$form_id"."_msg$i'); setPointer(this." . (empty($bold) ? '' : 'parentNode.') . + $sText .= " onmousedown=\"row_click('$form_id"."_msg$i', event); setPointer(this." . (empty($bold) ? '' : 'parentNode.') . 'parentNode.parentNode, ' . $i . ', \'click\', \''. $non_clicked_class. '\', \'mouse_over\', \'clicked\');"'; } $sText .= ">" -- 2.25.1