summaryrefslogtreecommitdiff
path: root/web-ui/app/js/services/mail_service.js
diff options
context:
space:
mode:
authorPatrick Maia <patrickjourdanmaia@gmail.com>2014-10-01 16:43:29 -0300
committerPatrick Maia <patrickjourdanmaia@gmail.com>2014-10-01 16:43:43 -0300
commitaa04ff3742e53bff9f5369ab7357050b7c2947a3 (patch)
tree3d5bf18bc6a2ba631b2c6e64279c639f7117fdc7 /web-ui/app/js/services/mail_service.js
parent97a5e93f5b569556a6eb8b257647a0a757b328b8 (diff)
#53 - gives better feedback on UI when attempt to add invalid tag is made
Diffstat (limited to 'web-ui/app/js/services/mail_service.js')
-rw-r--r--web-ui/app/js/services/mail_service.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/web-ui/app/js/services/mail_service.js b/web-ui/app/js/services/mail_service.js
index d9090ee7..35e6a39b 100644
--- a/web-ui/app/js/services/mail_service.js
+++ b/web-ui/app/js/services/mail_service.js
@@ -60,7 +60,13 @@ define(
that.refreshResults();
$(document).trigger(events.mail.tags.updated, { ident: ident, tags: data });
})
- .fail(this.errorMessage(i18n('Could not update mail tags')));
+ .fail(function (resp) {
+ var msg = i18n('Could not update mail tags');
+ if(resp.status == 403) {
+ msg = i18n('Invalid tag name');
+ }
+ that.trigger(document, events.ui.userAlerts.displayMessage, { message: msg });
+ });
};
this.readMail = function (ev, data) {