diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-03-09 14:06:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-09 14:06:03 +0300 |
commit | 62b5ca80a915462dad77254eeb90c93b21203811 (patch) | |
tree | bc643bfccd9c377f64dc434d668ba0336805415e | |
parent | ec708049a7c73e8a866f84af6ccb4784ef3691b3 (diff) | |
parent | 3c73b974165408baefa9746b26d538c933d926be (diff) |
Merge pull request #407 from nextcloud/bkprt-public-share-linksv13.0.1RC1
[stable13] create "file app" public share links if the slideshow is opened from ...
-rw-r--r-- | js/galleryfileaction.js | 5 | ||||
-rw-r--r-- | js/vendor/nextcloud/share.js | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/js/galleryfileaction.js b/js/galleryfileaction.js index c7aee2d2..d0c9a1b4 100644 --- a/js/galleryfileaction.js +++ b/js/galleryfileaction.js @@ -227,4 +227,9 @@ $(document).ready(function () { window.galleryFileAction.buildFeaturesList(config.features); window.galleryFileAction.register(config.mediatypes); }); + + // create public share links as from the files app + if (!Gallery.appName) { + Gallery.appName = 'files'; + } }); diff --git a/js/vendor/nextcloud/share.js b/js/vendor/nextcloud/share.js index 85da3097..663205bd 100644 --- a/js/vendor/nextcloud/share.js +++ b/js/vendor/nextcloud/share.js @@ -587,8 +587,13 @@ $linkCheckbox.attr('data-id', id); var $linkText = $('#linkText'); - var link = parent.location.protocol + '//' + location.host + - OC.generateUrl('/apps/gallery/s/') + token; + if (Gallery.appName === 'files') { + var link = parent.location.protocol + '//' + location.host + + OC.generateUrl('/s/') + token; + } else { + var link = parent.location.protocol + '//' + location.host + + OC.generateUrl('/apps/gallery/s/') + token; + } $linkText.val(link); $linkText.slideDown(OC.menuSpeed); |