From 1297b2b883c447c5183a79eb6c0e0061b69aeadf Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 3 Jun 2014 11:04:57 +0200 Subject: Multiple fixes to sharing overview - scrolling to next page now correctly renders share icons - reshareing/unsharing a reshare will now still keep "Shared by" label --- core/js/share.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/js/share.js b/core/js/share.js index 4e12f35d19e..a46a17102fd 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -151,7 +151,7 @@ OC.Share={ var img = action.find('img'); var message; var recipients; - var owner; + var owner = $tr.attr('data-share-owner'); var shareFolderIcon; var image = OC.imagePath('core', 'actions/share'); // update folder icon @@ -168,16 +168,16 @@ OC.Share={ $tr.children('.filename').css('background-image', 'url(' + shareFolderIcon + ')'); } // update share action text / icon - if (hasShares) { + if (hasShares || owner) { recipients = $tr.attr('data-share-recipients'); - owner = $tr.attr('data-share-owner'); action.addClass('permanent'); message = t('core', 'Shared'); - if (owner && !recipients) { + // even if reshared, only show "Shared by" + if (owner) { message = t('files_sharing', 'Shared by {owner}', {owner: owner}); } - if (recipients) { + else if (recipients) { message = t('core', 'Shared with {recipients}', {recipients: recipients}); } action.html(' '+ message + '').prepend(img); -- cgit v1.2.3