Improve contact list auto-completion

pull/91/head
Francis Lachapelle 2015-05-07 10:03:30 -04:00
parent b65573472e
commit a52e6604c1
2 changed files with 9 additions and 7 deletions

View File

@ -319,9 +319,9 @@
<md-contact-chips
ng-model="card.refs"
md-contacts="currentFolder.$filter($query, {dry: true, excludeLists: true})"
md-contact-name="shortFormat"
md-contact-image="image"
md-contact-email="email"
md-contact-name="$$fullname"
md-contact-image="$$image"
md-contact-email="$$email"
md-require-match="true"
filter-selected="false"
label:placeholder="Add Member"><!-- members --></md-contact-chips>

View File

@ -115,10 +115,12 @@
Card.prototype.init = function(data, partial) {
this.refs = [];
angular.extend(this, data);
if (!this.shortFormat)
this.shortFormat = this.$shortFormat();
if (!this.image)
this.image = Card.$gravatar(this.$preferredEmail(partial), 32);
if (!this.$$fullname)
this.$$fullname = this.$fullname();
if (!this.$$email)
this.$$email = this.$preferredEmail();
if (!this.$$image)
this.$$image = this.image || Card.$gravatar(this.$preferredEmail(partial), 32);
};
/**