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>2018-02-24 05:14:54 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-02-24 05:14:54 +0300
commita4fb639039496583cdef7809e53c7cd13176149d (patch)
tree13a221e4aeb3708f61f5cd1d01e4261e28183cff /templates
parent6a7db530615e84e7b38112859744e097ec9316b1 (diff)
Disable "Open file" button
Due to the changes from PDF.js 1.4.20 to 1.9.426 now trying to open a different PDF file fails with a Content Security Policy violation. Instead of fixing that the "Open file" button was disabled, as being able to open a different PDF file from the local file system to view it instead of the PDF file in the server did not provide much value. The button was disabled by setting the "hidden" attribute to "true" instead of with the CSS class for consistency with how it is done in "vendor/pdfjs/web/viewer.js" when the browser does not support any of the APIs needed to open the local file. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/viewer.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/viewer.php b/templates/viewer.php
index 66a0ce5..9b3b723 100644
--- a/templates/viewer.php
+++ b/templates/viewer.php
@@ -111,7 +111,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
- <button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
+ <button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file" hidden="true">
<span data-l10n-id="open_file_label">Open</span>
</button>
@@ -190,7 +190,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
- <button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
+ <button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file" hidden="true">
<span data-l10n-id="open_file_label">Open</span>
</button>