summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-11-30 09:35:38 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2016-11-30 09:35:38 +0100
commit05b86faccc6d05f8696236be7bb3232a2ef4778e (patch)
tree39c8bcfac2d19f796e185fb6656b5385261cfb3f /apps/files_sharing/js
parent09e5e3859122f7675febb44815dbd8916c7e34a4 (diff)
downloadnextcloud-server-05b86faccc6d05f8696236be7bb3232a2ef4778e.tar.gz
nextcloud-server-05b86faccc6d05f8696236be7bb3232a2ef4778e.zip
Display link share icon when toggling share
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/share.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index a40d40e6b8a..01c2ccfb863 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -161,8 +161,17 @@
shareTab.on('sharesChanged', function(shareModel) {
var fileInfoModel = shareModel.fileInfoModel;
var $tr = fileList.findFileEl(fileInfoModel.get('name'));
+
+ // We count email shares as link share
+ var hasLinkShare = shareModel.hasLinkShare();
+ shareModel.get('shares').forEach(function (share) {
+ if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {
+ hasLinkShare = true;
+ }
+ });
+
OCA.Sharing.Util._updateFileListDataAttributes(fileList, $tr, shareModel);
- if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), shareModel.hasLinkShare())) {
+ if (!OCA.Sharing.Util._updateFileActionIcon($tr, shareModel.hasUserShares(), hasLinkShare)) {
// remove icon, if applicable
OC.Share.markFileAsShared($tr, false, false);
}