summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-19 16:38:04 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-23 13:32:13 +0100
commit4247936dd6d5ea2fa60586e0f4aa4acbc7d902f1 (patch)
treee02e3d32ea909ddbf7abf1f570c122a46bb6baed /core/js
parentdcfd7bf7fffb6b7c946011870f1ae8a292937ddd (diff)
downloadnextcloud-server-4247936dd6d5ea2fa60586e0f4aa4acbc7d902f1.tar.gz
nextcloud-server-4247936dd6d5ea2fa60586e0f4aa4acbc7d902f1.zip
Fix avatars in file rows of incoming shares
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'core/js')
-rw-r--r--core/js/share.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 44f4f12f833..281c414b900 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -266,12 +266,13 @@ OC.Share = _.extend(OC.Share || {}, {
var type = $tr.data('type');
var icon = action.find('.icon');
var message, recipients, avatars;
+ var ownerId = $tr.attr('data-share-owner-id');
var owner = $tr.attr('data-share-owner');
var shareFolderIcon;
var iconClass = 'icon-shared';
action.removeClass('shared-style');
// update folder icon
- if (type === 'dir' && (hasShares || hasLink || owner)) {
+ if (type === 'dir' && (hasShares || hasLink || ownerId)) {
if (hasLink) {
shareFolderIcon = OC.MimeType.getIconUrl('dir-public');
}
@@ -295,21 +296,21 @@ OC.Share = _.extend(OC.Share || {}, {
$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')');
}
// update share action text / icon
- if (hasShares || owner) {
+ if (hasShares || ownerId) {
recipients = $tr.data('share-recipient-data');
action.addClass('shared-style');
avatars = '<span>' + t('core', 'Shared') + '</span>';
// even if reshared, only show "Shared by"
- if (owner) {
+ if (ownerId) {
message = t('core', 'Shared by');
- avatars = this._formatRemoteShare(owner, message);
+ avatars = this._formatRegularShare(ownerId, owner, message);
} else if (recipients) {
avatars = this._formatShareList(recipients);
}
action.html(avatars).prepend(icon);
- if (owner || recipients) {
+ if (ownerId || recipients) {
var avatarElement = action.find('.avatar');
avatarElement.each(function () {
$(this).avatar($(this).data('username'), 32);