summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/public.js
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-29 21:12:10 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-29 21:12:23 -0400
commitf2534e7428be3b67273a45fc17dd628f0b3d4684 (patch)
tree9679e6ed47e8ee72fbb95b7ce8b314e1c34b9b0d /apps/files_sharing/js/public.js
parent756b514fee05bdeb9c7fc06876e498837974bb6c (diff)
downloadnextcloud-server-f2534e7428be3b67273a45fc17dd628f0b3d4684.tar.gz
nextcloud-server-f2534e7428be3b67273a45fc17dd628f0b3d4684.zip
Show notification that no preview is available if no previewer is found for a public link to a file
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r--apps/files_sharing/js/public.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 755382e0736..1ab61d476ec 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -11,7 +11,11 @@ $(document).ready(function() {
if (mimetype.substr(0, mimetype.indexOf('/')) != 'image') {
// Trigger default action if not download TODO
var action = FileActions.getDefault(mimetype, 'file', FileActions.PERMISSION_READ);
- action($('#filename').val());
+ if (typeof action === 'undefined') {
+ $('#noPreview').show();
+ } else {
+ action($('#filename').val());
+ }
}
}