diff --git a/core/css/share.css b/core/css/share.css index 6ccb82a09f..042c4ddf2a 100644 --- a/core/css/share.css +++ b/core/css/share.css @@ -50,6 +50,19 @@ height: 32px; } +.share-autocomplete-item { + display: flex; +} +.share-autocomplete-item .autocomplete-item-text { + margin-left: 10px; + margin-right: 10px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + line-height: 32px; + vertical-align: middle; +} + #shareWithList { list-style-type:none; padding:8px; diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 2c60f216ef..2bcd1fdb24 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -251,7 +251,7 @@ }, autocompleteRenderItem: function(ul, item) { - var insert = $(""); + var text = item.label; if (item.value.shareType === OC.Share.SHARE_TYPE_GROUP) { text = t('core', '{sharee} (group)', { @@ -269,15 +269,20 @@ }); } } - insert.text(text); - insert.attr('title', item.value.shareWith); - if(item.value.shareType === OC.Share.SHARE_TYPE_GROUP) { - insert = insert.wrapInner(''); + var insert = $("
"); + var avatar = $("
").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); } - insert.tooltip({ - placement: 'bottom', - container: 'body' - }); + + $("
") + .text(text) + .appendTo(insert); + insert.attr('title', item.value.shareWith); + insert = $("
") + .append(insert); return $("
  • ") .addClass((item.value.shareType === OC.Share.SHARE_TYPE_GROUP) ? 'group' : 'user') .append(insert)