From: Michael M Slusarz Date: Fri, 20 Feb 2009 19:11:12 +0000 (-0700) Subject: Fix spam actions on the IMP message screen X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=20da6808b78be12a9fc3a21da0fcea0d21a53677;p=horde.git Fix spam actions on the IMP message screen --- diff --git a/imp/js/src/message.js b/imp/js/src/message.js index 373b4c9ab..661ecff3f 100644 --- a/imp/js/src/message.js +++ b/imp/js/src/message.js @@ -174,6 +174,10 @@ var ImpMessage = { this._transfer('move_message'); } else if (elt.hasClassName('copyAction')) { this._transfer('copy_message'); + } else if (elt.hasClassName('spamAction')) { + this.submit('spam_report'); + } else if (elt.hasClassName('notspamAction')) { + this.submit('notspam_report'); } } else if (elt.match('SPAN.toggleQuoteShow')) { [ elt, elt.next() ].invoke('toggle'); diff --git a/imp/message.php b/imp/message.php index 9838ac01a..60edac8bd 100644 --- a/imp/message.php +++ b/imp/message.php @@ -546,14 +546,14 @@ if (!IMP::$printMode) { $conf['spam']['reporting'] && ($conf['spam']['spamfolder'] || ($mailbox_name != IMP::folderPref($prefs->getValue('spam_folder'), true)))) { - $a_template->set('spam', Horde::widget('#', _("Report as Spam"), 'widget', '', "message_submit('spam_report'); return false;", _("Report as Spam"), true)); + $a_template->set('spam', Horde::widget('#', _("Report as Spam"), 'widget spamAction', '', '', _("Report as Spam"), true)); } if (!$readonly && $conf['notspam']['reporting'] && (!$conf['notspam']['spamfolder'] || ($mailbox_name == IMP::folderPref($prefs->getValue('spam_folder'), true)))) { - $a_template->set('notspam', Horde::widget('#', _("Report as Innocent"), 'widget', '', "message_submit('notspam_report'); return false;", _("Report as Innocent"), true)); + $a_template->set('notspam', Horde::widget('#', _("Report as Innocent"), 'widget notspamAction', '', '', _("Report as Innocent"), true)); } $a_template->set('redirect', Horde::widget(IMP::composeLink(array(), array('actionID' => 'redirect_compose') + $compose_params), _("Redirect"), 'widget', '', '', _("Redirec_t"), true));