diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-19 12:47:00 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-19 12:47:00 -0400 |
commit | ca860932707da593976f07e63f571cd3eb1a1109 (patch) | |
tree | 5eb59239fbc03adc0935bff42a5b52c0ae19f017 /apps/files_sharing/js/share.js | |
parent | 60019278e7ea1255095d13ebae9331a6d1930803 (diff) | |
download | nextcloud-server-ca860932707da593976f07e63f571cd3eb1a1109.tar.gz nextcloud-server-ca860932707da593976f07e63f571cd3eb1a1109.zip |
Full support for viewing public links from sharing drop down
Diffstat (limited to 'apps/files_sharing/js/share.js')
-rw-r--r-- | apps/files_sharing/js/share.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 1ae55b49937..1fae8cbdc95 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -10,7 +10,7 @@ $(document).ready(function() { data: 'source='+file, async: false, success: function(users) { - if (users.length > 0) { + if (users) { icon = OC.imagePath('core', 'actions/shared'); $.each(users, function(index, row) { if (row.uid_shared_with == 'public') { @@ -196,8 +196,7 @@ function createDropdown(filename, files) { if (users) { $.each(users, function(index, row) { if (row.uid_shared_with == 'public') { - var token = 1234; - showPublicLink(token); + showPublicLink(row.token); } else if (isNaN(index)) { addUser(row.uid_shared_with, row.permissions, index.substr(0, index.lastIndexOf('-'))); } else { @@ -228,6 +227,6 @@ function addUser(uid_shared_with, permissions, parentFolder) { function showPublicLink(token) { $('#makelink').attr('checked', true); $('#link').data('token', token); - $('#link').val(parent.location.protocol+"//"+location.host+OC.linkTo('files_publiclink','get.php')+'?token='+token); + $('#link').val(parent.location.protocol+"//"+location.host+OC.linkTo('files_sharing','get.php')+'?token='+token); $('#link').show('blind'); } |