don't try to render the avatars if avatars are disabled

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Bjoern Schiessle 2017-04-05 10:48:33 +02:00
parent 9c9bdabf74
commit 616b767835
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
1 changed files with 7 additions and 5 deletions

View File

@ -276,11 +276,13 @@
text = t('core', '{sharee} (email)', { sharee: text }, undefined, { escape: false });
}
var insert = $("<div class='share-autocomplete-item'/>");
var avatar = $("<div class='avatardiv'></div>").appendTo(insert);
if (item.value.shareType === OC.Share.SHARE_TYPE_USER) {
avatar.avatar(item.value.shareWith, 32, undefined, undefined, undefined, item.label);
} else {
avatar.imageplaceholder(text, undefined, 32);
if (oc_config.enable_avatars === true) {
var avatar = $("<div class='avatardiv'></div>").appendTo(insert);
if (item.value.shareType === OC.Share.SHARE_TYPE_USER) {
avatar.avatar(item.value.shareWith, 32, undefined, undefined, undefined, item.label);
} else {
avatar.imageplaceholder(text, undefined, 32);
}
}
$("<div class='autocomplete-item-text'></div>")