summaryrefslogtreecommitdiff
path: root/web-ui/app
diff options
context:
space:
mode:
authorLisa Junger <ljunger@thoughtworks.com>2015-03-20 16:30:48 +0100
committerLisa Junger <ljunger@thoughtworks.com>2015-03-20 16:48:15 +0100
commitf6d676f39b8b1c6f79069964714f81adaa00ff5d (patch)
treee24f3eb44d7cacab0a06acf206cff9f96db0fe54 /web-ui/app
parent28917526fd8111483cfaf6cfb0ffe714f9ae9f1c (diff)
fix: send button no longer stuck on sending for invalid email addresses.
-Issue #189
Diffstat (limited to 'web-ui/app')
-rw-r--r--web-ui/app/js/mail_view/ui/send_button.js2
-rw-r--r--web-ui/app/js/mixins/with_mail_edit_base.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/web-ui/app/js/mail_view/ui/send_button.js b/web-ui/app/js/mail_view/ui/send_button.js
index 8f168ecc..6f5add2a 100644
--- a/web-ui/app/js/mail_view/ui/send_button.js
+++ b/web-ui/app/js/mail_view/ui/send_button.js
@@ -77,10 +77,10 @@ define([
this.off(document, events.ui.mail.recipientsUpdated);
}.bind(this)));
- this.trigger(document, events.ui.recipients.doCompleteInput);
this.disableButton();
this.$node.text(viewHelper.i18n('sending-mail'));
+ this.trigger(document, events.ui.recipients.doCompleteInput);
};
this.forceEnableButton = function () {
diff --git a/web-ui/app/js/mixins/with_mail_edit_base.js b/web-ui/app/js/mixins/with_mail_edit_base.js
index 3332da91..9942e747 100644
--- a/web-ui/app/js/mixins/with_mail_edit_base.js
+++ b/web-ui/app/js/mixins/with_mail_edit_base.js
@@ -136,6 +136,7 @@ define(
events.ui.userAlerts.displayMessage,
{message: i18n.get('One or more of the recipients are not valid emails')}
);
+ this.trigger(events.mail.send_failed);
}
};