summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-12-01 12:17:56 +0100
committerGitHub <noreply@github.com>2016-12-01 12:17:56 +0100
commita87638c6ab6e3b14be6d6622b9df8f86ddc2ac05 (patch)
treeefac52307ce3467b80d8b3457e3c2d2d0f9b3a83 /apps
parent220452e9438062f8201ec27ec606f21908af12a6 (diff)
parent05b86faccc6d05f8696236be7bb3232a2ef4778e (diff)
downloadnextcloud-server-a87638c6ab6e3b14be6d6622b9df8f86ddc2ac05.tar.gz
nextcloud-server-a87638c6ab6e3b14be6d6622b9df8f86ddc2ac05.zip
Merge pull request #2371 from nextcloud/issue-2369-add-share-indicator-for-mail-shares
Add share indicator for mail shares
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/SharesPlugin.php3
-rw-r--r--apps/files_sharing/js/share.js13
-rw-r--r--apps/sharebymail/appinfo/info.xml6
3 files changed, 19 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
index 33e79364758..4df8c9f85a5 100644
--- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
@@ -120,7 +120,8 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
\OCP\Share::SHARE_TYPE_USER,
\OCP\Share::SHARE_TYPE_GROUP,
\OCP\Share::SHARE_TYPE_LINK,
- \OCP\Share::SHARE_TYPE_REMOTE
+ \OCP\Share::SHARE_TYPE_REMOTE,
+ \OCP\Share::SHARE_TYPE_EMAIL,
];
foreach ($requestedShareTypes as $requestedShareType) {
// one of each type is enough to find out about the types
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 073cc77e5aa..01c2ccfb863 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -114,6 +114,8 @@
shareType = parseInt(shareType, 10);
if (shareType === OC.Share.SHARE_TYPE_LINK) {
hasLink = true;
+ } else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {
+ hasLink = true;
} else if (shareType === OC.Share.SHARE_TYPE_USER) {
hasShares = true;
} else if (shareType === OC.Share.SHARE_TYPE_GROUP) {
@@ -159,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);
}
diff --git a/apps/sharebymail/appinfo/info.xml b/apps/sharebymail/appinfo/info.xml
index 1b3aa01bc67..56977fcf285 100644
--- a/apps/sharebymail/appinfo/info.xml
+++ b/apps/sharebymail/appinfo/info.xml
@@ -5,7 +5,7 @@
<description>Share provider which allows you to share files by mail</description>
<licence>AGPL</licence>
<author>Bjoern Schiessle</author>
- <version>1.0.0</version>
+ <version>1.0.1</version>
<namespace>ShareByMail</namespace>
<category>other</category>
<dependencies>
@@ -13,6 +13,10 @@
</dependencies>
<default_enable/>
+ <types>
+ <filesystem/>
+ </types>
+
<activity>
<providers>
<provider>OCA\ShareByMail\Activity</provider>