summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/share.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-04 10:48:01 +0200
committerVincent Petry <pvince81@owncloud.com>2014-06-04 10:48:01 +0200
commitaf6a65cbf3a122f92d91fe302e7d60e6c6a5416d (patch)
tree90b365965624fdf305776bd0897c29f5fd756491 /apps/files_sharing/js/share.js
parent07f1b263c99b67730fb054482eb241bfad280d57 (diff)
downloadnextcloud-server-af6a65cbf3a122f92d91fe302e7d60e6c6a5416d.tar.gz
nextcloud-server-af6a65cbf3a122f92d91fe302e7d60e6c6a5416d.zip
Do not update action icon recipients for file list
Since the files app doesn't have the recipient information on load it cannot initially render the recipients in the action icons. For this reason the action icon will not be updated with the recipients after changing the shares, for consistency.
Diffstat (limited to 'apps/files_sharing/js/share.js')
-rw-r--r--apps/files_sharing/js/share.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index e833612fb51..d63a590fb8e 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -115,6 +115,11 @@
OC.Share.showDropDown(itemType, $tr.data('id'), appendTo, true, possiblePermissions, filename);
}
$('#dropdown').on('sharesChanged', function(ev) {
+ // files app current cannot show recipients on load, so we don't update the
+ // icon when changed for consistency
+ if (context.fileList.$el.closest('#app-content-files').length) {
+ return;
+ }
var recipients = _.pluck(ev.shares[OC.Share.SHARE_TYPE_USER], 'share_with_displayname');
var groupRecipients = _.pluck(ev.shares[OC.Share.SHARE_TYPE_GROUP], 'share_with_displayname');
recipients = recipients.concat(groupRecipients);