summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-10-30 17:03:53 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-10-30 17:03:53 +0100
commit4c7082bf1ddd45824fd0f68fbdbb761d3e39a5ee (patch)
tree8cb0d7fe1d08887f95f78deaadb93425de87c767 /core/js
parent4c964cbbbe2b92d6220410cda5e7905e529fc713 (diff)
downloadnextcloud-server-4c7082bf1ddd45824fd0f68fbdbb761d3e39a5ee.tar.gz
nextcloud-server-4c7082bf1ddd45824fd0f68fbdbb761d3e39a5ee.zip
allow to share a file/folder as public link also if one of it parents was already shared as link
Diffstat (limited to 'core/js')
-rw-r--r--core/js/share.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/js/share.js b/core/js/share.js
index c53fa4110b5..411f0d23c36 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -56,7 +56,7 @@ OC.Share={
var path = dir;
// Search for possible parent folders that are shared
while (path != last) {
- if (path == data['path']) {
+ if (path == data['path'] && !data['link']) {
var actions = $('.fileactions .action[data-action="Share"]');
$.each(actions, function(index, action) {
var img = $(action).find('img');
@@ -244,7 +244,9 @@ OC.Share={
if (data.shares) {
$.each(data.shares, function(index, share) {
if (share.share_type == OC.Share.SHARE_TYPE_LINK) {
- OC.Share.showLink(share.token, share.share_with, itemSource);
+ if ( !('file_target' in share) ) {
+ OC.Share.showLink(share.token, share.share_with, itemSource);
+ }
} else {
if (share.collection) {
OC.Share.addShareWith(share.share_type, share.share_with, share.share_with_displayname, share.permissions, possiblePermissions, share.mail_send, share.collection);