summaryrefslogtreecommitdiff
path: root/plugins/pdfviewer
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-03-07 10:47:39 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-03-07 10:48:56 (GMT)
commit6f48c4d399d4e7adbe14e7855d883bd28b549d4c (patch)
tree4cbcab8ded48a50d12d4723648911647f7b93367 /plugins/pdfviewer
parent980f3db55c8d61c17e231fa4c9fbd838ea66c809 (diff)
downloadroundcubemail-plugins-kolab-6f48c4d399d4e7adbe14e7855d883bd28b549d4c.tar.gz
Minimize modifications to the original viewer files from pdf.js
Diffstat (limited to 'plugins/pdfviewer')
-rw-r--r--plugins/pdfviewer/pdfjs-viewer.diff50
-rw-r--r--plugins/pdfviewer/viewer/viewer.js16
2 files changed, 12 insertions, 54 deletions
diff --git a/plugins/pdfviewer/pdfjs-viewer.diff b/plugins/pdfviewer/pdfjs-viewer.diff
index 8da1baa..3068770 100644
--- a/plugins/pdfviewer/pdfjs-viewer.diff
+++ b/plugins/pdfviewer/pdfjs-viewer.diff
@@ -1,5 +1,5 @@
---- viewer/viewer.html.orig 2014-01-20 16:22:49.000000000 +0100
-+++ viewer/viewer.html 2014-01-20 16:38:37.000000000 +0100
+--- viewer/viewer.html.orig 2014-03-07 11:40:58.000000000 +0100
++++ viewer/viewer.html 2014-03-07 11:44:02.000000000 +0100
@@ -31,12 +31,12 @@
<!-- This snippet is used in production, see Makefile -->
<link rel="resource" type="application/l10n" href="locale/locale.properties"/>
@@ -61,8 +61,8 @@
<span data-l10n-id="bookmark_label">Current View</span>
</a>
---- viewer/viewer.js.orig 2014-01-20 16:22:49.000000000 +0100
-+++ viewer/viewer.js 2014-01-20 16:32:24.000000000 +0100
+--- viewer/viewer.js.orig 2014-03-07 11:40:40.000000000 +0100
++++ viewer/viewer.js 2014-03-07 11:32:44.000000000 +0100
@@ -23,7 +23,7 @@
'use strict';
@@ -81,45 +81,3 @@
var mozL10n = document.mozL10n || document.webL10n;
-@@ -1581,9 +1581,9 @@
- // (except for toggleHandTool, hand_tool.js is responsible for it):
- { element: this.presentationModeButton,
- handler: this.presentationModeClick },
-- { element: this.openFile, handler: this.openFileClick },
-+ //{ element: this.openFile, handler: this.openFileClick },
- { element: this.print, handler: this.printClick },
-- { element: this.download, handler: this.downloadClick },
-+ //{ element: this.download, handler: this.downloadClick },
- { element: this.firstPage, handler: this.firstPageClick },
- { element: this.lastPage, handler: this.lastPageClick },
- { element: this.pageRotateCw, handler: this.pageRotateCwClick },
-@@ -4806,8 +4806,8 @@
- document.body.appendChild(fileInput);
-
- if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
-- document.getElementById('openFile').setAttribute('hidden', 'true');
-- document.getElementById('secondaryOpenFile').setAttribute('hidden', 'true');
-+ //document.getElementById('openFile').setAttribute('hidden', 'true');
-+ //document.getElementById('secondaryOpenFile').setAttribute('hidden', 'true');
- } else {
- document.getElementById('fileInput').value = null;
- }
-@@ -4970,14 +4970,14 @@
- document.getElementById('presentationMode').addEventListener('click',
- SecondaryToolbar.presentationModeClick.bind(SecondaryToolbar));
-
-- document.getElementById('openFile').addEventListener('click',
-- SecondaryToolbar.openFileClick.bind(SecondaryToolbar));
-+// document.getElementById('openFile').addEventListener('click',
-+// SecondaryToolbar.openFileClick.bind(SecondaryToolbar));
-
- document.getElementById('print').addEventListener('click',
- SecondaryToolbar.printClick.bind(SecondaryToolbar));
-
-- document.getElementById('download').addEventListener('click',
-- SecondaryToolbar.downloadClick.bind(SecondaryToolbar));
-+// document.getElementById('download').addEventListener('click',
-+// SecondaryToolbar.downloadClick.bind(SecondaryToolbar));
-
-
- PDFView.open(file, 0);
diff --git a/plugins/pdfviewer/viewer/viewer.js b/plugins/pdfviewer/viewer/viewer.js
index f780337..cb58dd1 100644
--- a/plugins/pdfviewer/viewer/viewer.js
+++ b/plugins/pdfviewer/viewer/viewer.js
@@ -1581,9 +1581,9 @@ var SecondaryToolbar = {
// (except for toggleHandTool, hand_tool.js is responsible for it):
{ element: this.presentationModeButton,
handler: this.presentationModeClick },
- //{ element: this.openFile, handler: this.openFileClick },
+ { element: this.openFile, handler: this.openFileClick },
{ element: this.print, handler: this.printClick },
- //{ element: this.download, handler: this.downloadClick },
+ { element: this.download, handler: this.downloadClick },
{ element: this.firstPage, handler: this.firstPageClick },
{ element: this.lastPage, handler: this.lastPageClick },
{ element: this.pageRotateCw, handler: this.pageRotateCwClick },
@@ -4806,8 +4806,8 @@ document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
document.body.appendChild(fileInput);
if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
- //document.getElementById('openFile').setAttribute('hidden', 'true');
- //document.getElementById('secondaryOpenFile').setAttribute('hidden', 'true');
+ document.getElementById('openFile').setAttribute('hidden', 'true');
+ document.getElementById('secondaryOpenFile').setAttribute('hidden', 'true');
} else {
document.getElementById('fileInput').value = null;
}
@@ -4970,14 +4970,14 @@ document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
document.getElementById('presentationMode').addEventListener('click',
SecondaryToolbar.presentationModeClick.bind(SecondaryToolbar));
-// document.getElementById('openFile').addEventListener('click',
-// SecondaryToolbar.openFileClick.bind(SecondaryToolbar));
+ document.getElementById('openFile').addEventListener('click',
+ SecondaryToolbar.openFileClick.bind(SecondaryToolbar));
document.getElementById('print').addEventListener('click',
SecondaryToolbar.printClick.bind(SecondaryToolbar));
-// document.getElementById('download').addEventListener('click',
-// SecondaryToolbar.downloadClick.bind(SecondaryToolbar));
+ document.getElementById('download').addEventListener('click',
+ SecondaryToolbar.downloadClick.bind(SecondaryToolbar));
PDFView.open(file, 0);