Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_pdfviewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-06-27 17:21:51 +0300
committerBackportbot <backportbot-noreply@rullzer.com>2019-07-15 22:57:02 +0300
commite430074d2789a79d48d36cf57512d10d1e9d5d47 (patch)
tree60a5fb90d514240954930818c9d835a2b8984373
parent6acee25400b084c386d8e7dd3f0b438f01d4773e (diff)
Fix download button shown in public share page with hidden downloads
The download buttons are now hidden using JavaScript when the PDF viewer is loaded in the public share page if the share has the "Hide download" option enabled; this needs to be done in JavaScript instead of in the template as in the template there is no access to that option. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--js/previewplugin.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/previewplugin.js b/js/previewplugin.js
index 1ae1ad8..db8f4b2 100644
--- a/js/previewplugin.js
+++ b/js/previewplugin.js
@@ -92,6 +92,11 @@
} else {
iframe.find("#secondaryToolbarClose").addClass('hidden');
}
+
+ var hideDownload = $('#hideDownload').val();
+ if (hideDownload === 'true') {
+ iframe.find('.download').addClass('hidden');
+ }
});
if(!$('html').hasClass('ie8')) {