From d290298c49b3448e3de6ada3c64f5ded9ba55d60 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 30 Jun 2009 23:52:46 -0600 Subject: [PATCH] Fix javascript on IMP compose page. --- imp/js/src/compose.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/imp/js/src/compose.js b/imp/js/src/compose.js index 606e8d443..e55238749 100644 --- a/imp/js/src/compose.js +++ b/imp/js/src/compose.js @@ -153,7 +153,8 @@ var ImpCompose = { e.stop(); - if (actionID == 'redirect') { + switch (actionID) { + case 'redirect': if ($F('to') == '') { alert(IMP.text.compose_recipient); $('to').focus(); @@ -161,7 +162,9 @@ var ImpCompose = { } form = $('redirect'); - } else if (actionID == 'send_message') { + break; + + case 'send_message': if (($F('subject') == '') && !window.confirm(IMP.text.compose_nosubject)) { return; @@ -181,8 +184,16 @@ var ImpCompose = { IMP.SpellCheckerObject.resume(); } + // fall through + + case 'add_attachment': + case 'save_draft': form = $('compose'); - $('actionID').setValue('send_message'); + $('actionID').setValue(actionID); + break; + + default: + return; } // Ticket #6727; this breaks on WebKit w/FCKeditor. -- 2.11.0