From: Georg Ehrke Date: Wed, 7 Aug 2013 09:48:08 +0000 (+0200) Subject: implement previews of single shared files X-Git-Tag: v6.0.0alpha2~235^2~44 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=91bd4dd67b7d58f09a4dadff8060f63c6d6b691e;p=nextcloud-server.git implement previews of single shared files --- diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 294223aa094..fbbe9b7f3cb 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -16,7 +16,7 @@ $(document).ready(function() { if (typeof FileActions !== 'undefined') { var mimetype = $('#mimetype').val(); // Show file preview if previewer is available, images are already handled by the template - if (mimetype.substr(0, mimetype.indexOf('/')) != 'image') { + if (mimetype.substr(0, mimetype.indexOf('/')) != 'image' && $('.publicpreview').length() !== 0) { // Trigger default action if not download TODO var action = FileActions.getDefault(mimetype, 'file', OC.PERMISSION_READ); if (typeof action === 'undefined') { diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 746a715f3cc..c164b3ea2b7 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -79,6 +79,10 @@ + +
+ +