summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-08-16 12:18:31 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-08-16 12:18:31 -0400
commit717ab56419ef2d2c4f3a32907ff16674e03c3172 (patch)
tree444355a5b5d88299740eeb93dfb8f54e2c062832 /apps
parent726933831d60219c9c0b739924ec0cfaa61d64bd (diff)
downloadnextcloud-server-717ab56419ef2d2c4f3a32907ff16674e03c3172.tar.gz
nextcloud-server-717ab56419ef2d2c4f3a32907ff16674e03c3172.zip
Display public icon next to publicly shared files
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/share.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 5a4cdb50521..d9d64d96a0b 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -17,6 +17,20 @@ $(document).ready(function() {
}
}
});
+ $.ajax({
+ type: 'GET',
+ url: OC.linkTo('files_publiclink', 'ajax/getlink.php'),
+ dataType: 'json',
+ data: 'path='+file,
+ async: false,
+ success: function(link) {
+ if (link.length > 0) {
+ icon = OC.imagePath('core', 'actions/public');
+ } else {
+ icon = OC.imagePath('core', 'actions/share');
+ }
+ }
+ });
return icon;
}, function(filename) {
if (($('#dropdown').length > 0)) {