From 09072f7ad6d18a6158b6c97d6c84a4dd22c431b1 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sun, 6 Dec 2009 21:05:23 -0700 Subject: [PATCH] Fix sending mail in dimp --- imp/js/compose-dimp.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/imp/js/compose-dimp.js b/imp/js/compose-dimp.js index 35e59b908..d679f7012 100644 --- a/imp/js/compose-dimp.js +++ b/imp/js/compose-dimp.js @@ -195,8 +195,6 @@ var DimpCompose = { } if (action == 'send_message' || action == 'save_draft') { - this.setDisabled(true); - switch (action) { case 'send_message': if (($F('subject') == '') && @@ -239,6 +237,12 @@ var DimpCompose = { // Use an AJAX submit here so that we can do javascript-y stuff // before having to close the window on success. DimpCore.doAction('*' + DIMP.conf.URI_COMPOSE, c.serialize(true), { callback: this.uniqueSubmitCallback.bind(this) }); + + // Can't disable until we send the message - or else nothing + // will get POST'ed. + if (action == 'send_message' || action == 'save_draft') { + this.setDisabled(true); + } } }, -- 2.11.0