From c9272be0b9963eb358d0aa6e7b728d37e6caa7d6 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 24 Feb 2015 21:46:24 +0100 Subject: Avatars in share dialog fixes * Avatar for "xxxx share with you..." to the left * Avatars for groups and remote shares (use default placeholder) * Modified and added unit tests * Use the same css for all the avatars in the dropdown --- core/js/share.js | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'core/js/share.js') diff --git a/core/js/share.js b/core/js/share.js index 2370916e8be..8804db12a08 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -357,20 +357,17 @@ OC.Share={ var dropDownEl; var html = ''; html += ''; html = $(html).appendTo('#shareWithList'); - if (oc_config.enable_avatars === true && shareType === OC.Share.SHARE_TYPE_USER) { - $('.avatar[data-user="' + escapeHTML(shareWith) + '"]').avatar(escapeHTML(shareWith), 32); + if (oc_config.enable_avatars === true) { + if (shareType === OC.Share.SHARE_TYPE_USER) { + html.find('.avatar').avatar(escapeHTML(shareWith), 32); + } else { + //Add sharetype to generate different seed if there is a group and use with the same name + html.find('.avatar').imageplaceholder(escapeHTML(shareWith) + ' ' + shareType); + } } // insert cruds button into last label element var lastLabel = html.find('>label:last'); -- cgit v1.2.3