summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-21 11:29:42 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-23 13:32:13 +0100
commit9d95391ff14a1c753e8fda4ecaacc007572552f4 (patch)
treee6ebac228b44b83fbfa10645cd9bbe88214c1d54 /apps/files_sharing/js
parent3a1d8fa45f22503ba9841d71b7ea630d400b2ae5 (diff)
downloadnextcloud-server-9d95391ff14a1c753e8fda4ecaacc007572552f4.tar.gz
nextcloud-server-9d95391ff14a1c753e8fda4ecaacc007572552f4.zip
adjust tests and apply sorting
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/share.js5
-rw-r--r--apps/files_sharing/js/sharedfilelist.js5
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index a7eefe43dbe..9b794ca2d13 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -220,9 +220,14 @@
// note: we only update the data attribute because updateIcon()
if (recipients.length) {
$tr.attr('data-share-recipients', OCA.Sharing.Util.formatRecipients(recipients));
+ var recipientData = _.mapObject(shareModel.get('shares'), function (share) {
+ return {shareWith: share.share_with, shareWithDisplayName: share.share_with_displayname};
+ });
+ $tr.attr('data-share-recipient-data', JSON.stringify(recipientData));
}
else {
$tr.removeAttr('data-share-recipients');
+ $tr.removeAttr('data-share-recipient-data');
}
},
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index c7b872772b3..fb4909e764e 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -355,7 +355,10 @@
// only store the first ones, they will be the only ones
// displayed
data.recipients[recipient] = true;
- data.recipientData[recipientId] = recipient;
+ data.recipientData[data.recipientsCount] = {
+ 'shareWith': recipientId,
+ 'shareWithDisplayName': recipient
+ };
}
data.recipientsCount++;
}