Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-04-14 14:45:16 +0400
committerBart Visscher <bartv@thisnet.nl>2012-04-14 14:45:32 +0400
commit5c55b9c5acb678e1e3e329c5926a1a11b83ab5fb (patch)
treed735a0af723409f3a6d447695bf4a0e0e12560a5 /apps/files_sharing
parent524bd2e75f92c7f5148f0e843398febf3917b476 (diff)
Sharing: Add a filename after public share link
We don't do anythink with the name, but it is nice to know the file the link point to.
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/js/share.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 42851b35051..54d749d833e 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -148,7 +148,7 @@ $(document).ready(function() {
data: data,
success: function(token) {
if (token) {
- showPublicLink(token);
+ showPublicLink(token, source.substr(source.lastIndexOf('/')));
}
}
});
@@ -206,7 +206,7 @@ function createDropdown(filename, files) {
if (users) {
$.each(users, function(index, row) {
if (row.uid_shared_with == 'public') {
- showPublicLink(row.token);
+ showPublicLink(row.token, '/'+filename);
} else if (isNaN(index)) {
addUser(row.uid_shared_with, row.permissions, index.substr(0, index.lastIndexOf('-')));
} else {
@@ -237,9 +237,9 @@ function addUser(uid_shared_with, permissions, parentFolder) {
$(user).appendTo('#shared_list');
}
-function showPublicLink(token) {
+function showPublicLink(token, file) {
$('#makelink').attr('checked', true);
$('#link').data('token', token);
- $('#link').val(parent.location.protocol+'//'+location.host+OC.linkTo('files_sharing','get.php')+'?token='+token);
+ $('#link').val(parent.location.protocol+'//'+location.host+OC.linkTo('files_sharing','get.php')+'?token='+token+'&f='+file);
$('#link').show('blind');
}