aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-05-19 13:14:33 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-05-19 13:14:33 +0200
commit1cff73b61520462d3b22bdd85998eb0e48693ec5 (patch)
tree7277f194a9a45e4c80ef0bc41178755c24f3398b
parent48977c85797ba17da09444a999b678635b5e33fc (diff)
parent9e1d47bd908d589c3dcf5e7d8233ca5cb73f4ebd (diff)
downloadnextcloud-server-1cff73b61520462d3b22bdd85998eb0e48693ec5.tar.gz
nextcloud-server-1cff73b61520462d3b22bdd85998eb0e48693ec5.zip
Merge branch 'libasys-patch-1'
-rw-r--r--core/js/share.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 92db67117be..583f92dd39d 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -495,6 +495,10 @@ OC.Share={
showLink:function(token, password, itemSource) {
OC.Share.itemShares[OC.Share.SHARE_TYPE_LINK] = true;
$('#linkCheckbox').attr('checked', true);
+
+ //check itemType
+ var linkSharetype=$('#dropdown').data('item-type');
+
if (! token) {
//fallback to pre token link
var filename = $('tr').filterAttr('data-id', String(itemSource)).data('file');
@@ -508,7 +512,15 @@ OC.Share={
var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&'+type+'='+encodeURIComponent(file);
} else {
//TODO add path param when showing a link to file in a subfolder of a public link share
- var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&t='+token;
+ var service='';
+ if(linkSharetype === 'folder' || linkSharetype === 'file'){
+ service='files';
+ }else{
+ service=linkSharetype;
+ }
+
+ var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service='+service+'&t='+token;
+
}
$('#linkText').val(link);
$('#linkText').show('blind');