(js) Decompose contacts list in mail editor

This commit is contained in:
Francis Lachapelle
2015-12-22 16:58:40 -05:00
parent 711e159b4b
commit 6464e35704
3 changed files with 50 additions and 21 deletions
@@ -271,11 +271,11 @@
* @returns the fullname along with a matching email address in parentheses
*/
Card.prototype.$shortFormat = function(partial) {
var fullname = this.$fullname(),
var fullname = [this.$$fullname],
email = this.$preferredEmail(partial);
if (email && email != fullname)
fullname += ' <' + email + '>';
return fullname;
if (email && email != this.$$fullname)
fullname.push(' <' + email + '>');
return fullname.join(' ');
};
/**