diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css index f38afae3dd..a700cc2169 100644 --- a/apps/files_sharing/css/public.css +++ b/apps/files_sharing/css/public.css @@ -1,7 +1,8 @@ body { background:#ddd; } #header { position:fixed; top:0; left:0; right:0; z-index:100; height:2.5em; line-height:2.5em; padding:.5em; background:#1d2d44; -moz-box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; -webkit-box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; box-shadow:0 0 10px rgba(0, 0, 0, .5), inset 0 -2px 10px #222; } #details { color:#fff; } -#download { margin-left:2em; font-weight:bold; color:#fff; } -#preview { min-height:30em; margin:50px auto; border-bottom:1px solid #f8f8f8; background:#eee; text-align:center; } +#header #download { margin-left:2em; font-weight:bold; color:#fff; } +#preview { min-height:30em; margin:50px auto; padding-top:2em; border-bottom:1px solid #f8f8f8; background:#eee; text-align:center; } +#noPreview { display:none; padding-top:5em; } p.info { width:22em; text-align: center; margin:2em auto; color:#777; text-shadow:#fff 0 1px 0; } p.info a { font-weight:bold; color:#777; } \ No newline at end of file diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 755382e073..1ab61d476e 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()); + } } } diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 36e159dafe..1c08b5b26a 100755 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -13,5 +13,11 @@ + \ No newline at end of file