summaryrefslogtreecommitdiff
path: root/web-ui/app/js/mail_view
diff options
context:
space:
mode:
authorBruno Wagner <bwgpro@gmail.com>2015-03-30 20:15:05 -0300
committerBruno Wagner <bwgpro@gmail.com>2015-03-30 20:15:05 -0300
commit204782a2ce89e78f3d7a58a8b9dde7bb709a8432 (patch)
tree384f6a58f1067a0eb03b5ae70c84a9660d8ba700 /web-ui/app/js/mail_view
parent813f5cc02c06bb297e030c8c67897d9e1d68a598 (diff)
Fixed #349 - Send button now enables back on error
Diffstat (limited to 'web-ui/app/js/mail_view')
-rw-r--r--web-ui/app/js/mail_view/data/mail_sender.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/web-ui/app/js/mail_view/data/mail_sender.js b/web-ui/app/js/mail_view/data/mail_sender.js
index 4c7e07ea..d7247601 100644
--- a/web-ui/app/js/mail_view/data/mail_sender.js
+++ b/web-ui/app/js/mail_view/data/mail_sender.js
@@ -28,12 +28,18 @@ define(
return defineComponent(mailSender);
function mailSender() {
- function successSendMail(on){
+ function successSendingMail(on){
return function(result) {
on.trigger(document, events.mail.sent, result);
};
}
+ function failureSendingMail(on) {
+ return function(result) {
+ on.trigger(document, events.mail.send_failed);
+ }
+ };
+
function successSaveDraft(on){
return function(result){
on.trigger(document, events.mail.draftSaved, result);
@@ -50,7 +56,7 @@ define(
dataType: 'json',
contentType: 'application/json; charset=utf-8',
data: JSON.stringify(data),
- }).done(successSendMail(this));
+ }).done(successSendingMail(this)).fail(failureSendingMail(this));
};