(js) Fix avatar in autocompletion of contacts

pull/218/head
Francis Lachapelle 2016-07-25 14:55:59 -04:00
parent 6a608425f2
commit 197e237a66
2 changed files with 8 additions and 1 deletions

1
NEWS
View File

@ -17,6 +17,7 @@ Bug fixes
- [web] fixed exception when moving tasks to a different calendar
- [web] fixed printing of long mail (#3731)
- [web] fixed position of ghost block when creating an event from DnD
- [web] fixed avatar image in autocompletion
- [eas] fixed long GUID issue preventing sometimes synchronisation (#3460)
3.1.4 (2016-07-12)

View File

@ -136,6 +136,8 @@
* @param {object} data - attributes of card
*/
Card.prototype.init = function(data, partial) {
var _this = this;
this.refs = [];
this.categories = [];
this.c_screenname = null;
@ -145,7 +147,11 @@
if (!this.$$email)
this.$$email = this.$preferredEmail(partial);
if (!this.$$image)
this.$$image = this.image || Card.$Preferences.avatar(this.$$email, 32, {no_404: true});
this.$$image = this.image;
if (!this.$$image)
Card.$Preferences.avatar(this.$$email, 32, {no_404: true}).then(function(url) {
_this.$$image = url;
});
if (this.isgroup)
this.c_component = 'vlist';
this.$loaded = angular.isDefined(this.c_name)? Card.STATUS.LOADED : Card.STATUS.NOT_LOADED;