From 717ab56419ef2d2c4f3a32907ff16674e03c3172 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Tue, 16 Aug 2011 12:18:31 -0400 Subject: [PATCH] Display public icon next to publicly shared files --- apps/files_sharing/js/share.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 5a4cdb5052..d9d64d96a0 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)) {