diff options
author | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-11-13 18:04:52 -0200 |
---|---|---|
committer | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-11-13 18:04:52 -0200 |
commit | 24e634ad5ec09ab627ddd89ae64ed68417fe475c (patch) | |
tree | 1872d874a3c2fd753d1f39130e7c2283838e9b8d /web-ui/app/js/mixins | |
parent | c915f6b744769cd87cc284fb0d7d89bc51ae62df (diff) |
Issue #525 - Fixed space in recipient adders
Diffstat (limited to 'web-ui/app/js/mixins')
-rw-r--r-- | web-ui/app/js/mixins/with_mail_edit_base.js | 11 |
1 files changed, 10 insertions, 1 deletions
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 aa01e2cb..f892f08f 100644 --- a/web-ui/app/js/mixins/with_mail_edit_base.js +++ b/web-ui/app/js/mixins/with_mail_edit_base.js @@ -124,10 +124,19 @@ define( }); }; + this.trim_recipient = function(recipients) { + recipients.map(function(recipient) { + return recipient.trim(); + }); + } + this.sendMail = function () { this.cancelPostponedSaveDraft(); var mail = this.buildMail('sent'); - + mail.header.to = this.trim_recipient(mail.header.to); + mail.header.cc = this.trim_recipient(mail.header.cc); + mail.header.bcc = this.trim_recipient(mail.header.bcc); + if (allRecipientsAreEmails(mail)) { this.trigger(events.mail.send, mail); } else { |