summaryrefslogtreecommitdiff
path: root/web-ui/app/js/mail_view/ui/recipients/recipient.js
diff options
context:
space:
mode:
authorGiovane <giovaneliberato@gmail.com>2015-10-23 12:19:19 -0200
committerGiovane <giovaneliberato@gmail.com>2015-10-23 12:23:12 -0200
commit72e332e2969d4eb36c9cd64336c1f1d89b6185f1 (patch)
treecfa8bfe38eb2449a57ebdbe7c0bc3b96da14f075 /web-ui/app/js/mail_view/ui/recipients/recipient.js
parent9bc9f6a2ecf6fbb8092a99fa9d6abbfabc0cc800 (diff)
Add invalid address sinalization on tokens #492
Diffstat (limited to 'web-ui/app/js/mail_view/ui/recipients/recipient.js')
-rw-r--r--web-ui/app/js/mail_view/ui/recipients/recipient.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/web-ui/app/js/mail_view/ui/recipients/recipient.js b/web-ui/app/js/mail_view/ui/recipients/recipient.js
index 487ca9a0..f3db5d4e 100644
--- a/web-ui/app/js/mail_view/ui/recipients/recipient.js
+++ b/web-ui/app/js/mail_view/ui/recipients/recipient.js
@@ -72,6 +72,10 @@ define(
return this.$node.find('.recipient-value').hasClass('selected');
};
+ this.sinalizeInvalid = function () {
+ this.$node.find('.recipient-value>span').addClass('invalid-format');
+ };
+
this.discoverEncryption = function () {
this.$node.addClass('discorver-encryption');
var p = $.getJSON('/keys?search=' + this.attr.address).promise();
@@ -96,8 +100,12 @@ define(
this.after('initialize', function () {
this.recipientDelActions();
- this.discoverEncryption();
this.on('dblclick', this.editRecipient);
+ if (this.attr.invalidAddress){
+ this.sinalizeInvalid();
+ } else {
+ this.discoverEncryption();
+ }
});
}
}