From 077381c7b3aa220253a18ce3bbb946e4a46d8213 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 21 Nov 2017 12:45:57 +0100 Subject: rip out obsolete recipientsDisplayName also needs tests adjustements, and this also brings in natural sorting Signed-off-by: Arthur Schiwon --- core/js/share.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/js/share.js') diff --git a/core/js/share.js b/core/js/share.js index 381c42c5de2..a2a3635e145 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -245,7 +245,10 @@ OC.Share = _.extend(OC.Share || {}, { */ _formatShareList: function(recipients) { var _parent = this; - recipients = _.sortBy(_.toArray(recipients), 'shareWithDisplayName'); + recipients = _.toArray(recipients); + recipients.sort(function(a, b) { + return a.shareWithDisplayName.localeCompare(b.shareWithDisplayName); + }); return $.map(recipients, function(recipient) { return _parent._formatRemoteShare(recipient.shareWith, recipient.shareWithDisplayName, t('core', 'Shared with')); }); -- cgit v1.2.3