[Pkg-javascript-commits] [pdf.js] 204/207: Import ownCloud-specific patches
David Prévot
taffit at moszumanska.debian.org
Mon Jul 28 15:36:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 483cec250850aee0064208f95f0d8170824b9052
Author: David Prévot <taffit at debian.org>
Date: Sun Jul 27 15:38:57 2014 -0400
Import ownCloud-specific patches
---
...loud-specific-loading-of-the-pdf-document.patch | 24 +++++++++++++
.../0006-adjust-close-button-position.patch | 23 ++++++++++++
.../ownCloud/0007-open-buttons-removed.patch | 24 +++++++++++++
...e-PDF-viewer-working-again-in-public-view.patch | 37 +++++++++++++++++++
...ead-of-encode-because-we-need-to-pass-HTM.patch | 27 ++++++++++++++
.../ownCloud/0010-URL-encode-needed-values.patch | 42 ++++++++++++++++++++++
6 files changed, 177 insertions(+)
diff --git a/debian/patches/ownCloud/0005-fix-ownCloud-specific-loading-of-the-pdf-document.patch b/debian/patches/ownCloud/0005-fix-ownCloud-specific-loading-of-the-pdf-document.patch
new file mode 100644
index 0000000..a3fee16
--- /dev/null
+++ b/debian/patches/ownCloud/0005-fix-ownCloud-specific-loading-of-the-pdf-document.patch
@@ -0,0 +1,24 @@
+From: =?utf-8?q?Thomas_M=C3=BCller?= <thomas.mueller at tmit.eu>
+Date: Wed, 26 Mar 2014 15:34:25 +0100
+Subject: fix ownCloud specific loading of the pdf document
+
+origin: vendor, https://github.com/owncloud/files_pdfviewer/commit/f58e37a8ffadfaf4fac893b87987e83efe6963ec
+Gbp: Topic ownCloud
+---
+ web/viewer.js | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/web/viewer.js b/web/viewer.js
+index 0300ce2..e49202d 100644
+--- a/web/viewer.js
++++ b/web/viewer.js
+@@ -1953,7 +1953,8 @@ function webViewerInitialized() {
+
+ //#if !B2G && !CHROME
+ if (file) {
+- PDFView.open(file, 0);
++ // owncould customization to load file from files app
++ PDFView.open(OC.linkTo('files', 'ajax/download.php')+"?files="+encodeURIComponent(window.file)+"&dir="+encodeURIComponent(window.dir), 1.0);
+ }
+ //#endif
+ //#if CHROME
diff --git a/debian/patches/ownCloud/0006-adjust-close-button-position.patch b/debian/patches/ownCloud/0006-adjust-close-button-position.patch
new file mode 100644
index 0000000..c6ec133
--- /dev/null
+++ b/debian/patches/ownCloud/0006-adjust-close-button-position.patch
@@ -0,0 +1,23 @@
+From: =?utf-8?q?Thomas_M=C3=BCller?= <thomas.mueller at tmit.eu>
+Date: Wed, 26 Mar 2014 15:35:18 +0100
+Subject: adjust close button position
+
+origin: vendor, https://github.com/owncloud/files_pdfviewer/commit/f7c625773b621bedff4fd9e18fd7c01d34f3b871
+Gbp: Topic ownCloud
+---
+ web/viewer.css | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/web/viewer.css b/web/viewer.css
+index fff43e5..1ec65c1 100644
+--- a/web/viewer.css
++++ b/web/viewer.css
+@@ -508,7 +508,7 @@ html[dir='ltr'] #toolbarViewerRight,
+ html[dir='rtl'] #toolbarViewerLeft {
+ position: absolute;
+ top: 0;
+- right: 0;
++ right: 25px;
+ }
+ html[dir='ltr'] #toolbarViewerLeft > *,
+ html[dir='ltr'] #toolbarViewerMiddle > *,
diff --git a/debian/patches/ownCloud/0007-open-buttons-removed.patch b/debian/patches/ownCloud/0007-open-buttons-removed.patch
new file mode 100644
index 0000000..884eddc
--- /dev/null
+++ b/debian/patches/ownCloud/0007-open-buttons-removed.patch
@@ -0,0 +1,24 @@
+From: =?utf-8?q?Thomas_M=C3=BCller?= <thomas.mueller at tmit.eu>
+Date: Thu, 27 Mar 2014 12:41:24 +0100
+Subject: open buttons removed
+
+origin: vendor, https://github.com/owncloud/files_pdfviewer/commit/71ab97f9b074c6128bff6f1b1690e7f52571f529
+Gbp: Topic ownCloud
+---
+ web/viewer.js | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/web/viewer.js b/web/viewer.js
+index e49202d..95f7198 100644
+--- a/web/viewer.js
++++ b/web/viewer.js
+@@ -1936,9 +1936,6 @@ function webViewerInitialized() {
+ document.getElementById('presentationMode').addEventListener('click',
+ SecondaryToolbar.presentationModeClick.bind(SecondaryToolbar));
+
+- document.getElementById('openFile').addEventListener('click',
+- SecondaryToolbar.openFileClick.bind(SecondaryToolbar));
+-
+ document.getElementById('print').addEventListener('click',
+ SecondaryToolbar.printClick.bind(SecondaryToolbar));
+
diff --git a/debian/patches/ownCloud/0008-Make-PDF-viewer-working-again-in-public-view.patch b/debian/patches/ownCloud/0008-Make-PDF-viewer-working-again-in-public-view.patch
new file mode 100644
index 0000000..76825bc
--- /dev/null
+++ b/debian/patches/ownCloud/0008-Make-PDF-viewer-working-again-in-public-view.patch
@@ -0,0 +1,37 @@
+From: Lukas Reschke <lukas at statuscode.ch>
+Date: Tue, 17 Jun 2014 21:22:38 +0200
+Subject: Make PDF viewer working again in public view
+
+Do not require a login
+
+Add support for public URL
+
+origin: vendor,
+ https://github.com/owncloud/files_pdfviewer/commit/fc53d5709d69a61f1f5481107fa9f1166f406245
+ https://github.com/owncloud/files_pdfviewer/commit/524db159f67d11fb42d4118173381600ca2de4ab
+Gbp: Topic ownCloud
+---
+ web/viewer.js | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/web/viewer.js b/web/viewer.js
+index 95f7198..0400e54 100644
+--- a/web/viewer.js
++++ b/web/viewer.js
+@@ -1949,9 +1949,13 @@ function webViewerInitialized() {
+ //#endif
+
+ //#if !B2G && !CHROME
+- if (file) {
+- // owncould customization to load file from files app
+- PDFView.open(OC.linkTo('files', 'ajax/download.php')+"?files="+encodeURIComponent(window.file)+"&dir="+encodeURIComponent(window.dir), 1.0);
++ // owncould customization to load file
++ if (file && dir !== '') {
++ // Logged in
++ PDFView.open(OC.linkTo('files', 'ajax/download.php')+"?files="+encodeURIComponent(window.file)+"&dir="+encodeURIComponent(window.dir), 1.0);
++ } else {
++ // Public view
++ PDFView.open(OC.linkTo('', 'public.php')+'?service=files'+"&t="+encodeURIComponent(window.file)+"&download", 1.0);
+ }
+ //#endif
+ //#if CHROME
diff --git a/debian/patches/ownCloud/0009-Decode-instead-of-encode-because-we-need-to-pass-HTM.patch b/debian/patches/ownCloud/0009-Decode-instead-of-encode-because-we-need-to-pass-HTM.patch
new file mode 100644
index 0000000..ba07b55
--- /dev/null
+++ b/debian/patches/ownCloud/0009-Decode-instead-of-encode-because-we-need-to-pass-HTM.patch
@@ -0,0 +1,27 @@
+From: Lukas Reschke <lukas at statuscode.ch>
+Date: Tue, 17 Jun 2014 23:05:28 +0200
+Subject: Decode instead of encode because we need to pass HTML values
+
+origin: vendor, https://github.com/owncloud/files_pdfviewer/commit/9f1fcd2d1a18e5ef8aa1fde24e99e4fc43dfd1bf
+Gbp: Topic ownCloud
+---
+ web/viewer.js | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/web/viewer.js b/web/viewer.js
+index 0400e54..8ada75c 100644
+--- a/web/viewer.js
++++ b/web/viewer.js
+@@ -1952,10 +1952,10 @@ function webViewerInitialized() {
+ // owncould customization to load file
+ if (file && dir !== '') {
+ // Logged in
+- PDFView.open(OC.linkTo('files', 'ajax/download.php')+"?files="+encodeURIComponent(window.file)+"&dir="+encodeURIComponent(window.dir), 1.0);
++ PDFView.open(OC.linkTo('files', 'ajax/download.php')+"?files="+decodeURIComponent(window.file)+"&dir="+decodeURIComponent(window.dir), 1.0);
+ } else {
+ // Public view
+- PDFView.open(OC.linkTo('', 'public.php')+'?service=files'+"&t="+encodeURIComponent(window.file)+"&download", 1.0);
++ PDFView.open(OC.linkTo('', 'public.php')+'?service=files'+"&t="+decodeURIComponent(window.file)+"&download", 1.0);
+ }
+ //#endif
+ //#if CHROME
diff --git a/debian/patches/ownCloud/0010-URL-encode-needed-values.patch b/debian/patches/ownCloud/0010-URL-encode-needed-values.patch
new file mode 100644
index 0000000..4cb1c2d
--- /dev/null
+++ b/debian/patches/ownCloud/0010-URL-encode-needed-values.patch
@@ -0,0 +1,42 @@
+From: Lukas Reschke <lukas at statuscode.ch>
+Date: Sun, 29 Jun 2014 14:17:46 +0200
+Subject: URL encode needed values
+
+To test upload a PDF file once with special characters (e.g. "This+Is+a+test.pdf") and one without (e.g. "ThisIsATest.pdf").
+
+Then test the following test-cases:
+
+- [ ] Viewing a PDF file as logged-in user still work
+- [ ] Viewing a shared PDF as logged-in user still work
+- [ ] Viewing a public shared PDF as logged-in user still work
+- [ ] Viewing a public shared PDF as anonymous user still work
+- [ ] Viewing a public shared PDF in a folder still work
+
+Bug-ownCloud: https://github.com/owncloud/files_pdfviewer/issues/11
+origin: vendor,
+ https://github.com/owncloud/files_pdfviewer/commit/ac7560cc0fcb17e18fb48bf32347dd8fb3b96b8c
+ https://github.com/owncloud/files_pdfviewer/commit/fd0ed34d9c10c14b8bc4c99c1ec6370c738bec7f
+Gbp: Topic ownCloud
+---
+ web/viewer.js | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/web/viewer.js b/web/viewer.js
+index 8ada75c..78088ec 100644
+--- a/web/viewer.js
++++ b/web/viewer.js
+@@ -1951,11 +1951,11 @@ function webViewerInitialized() {
+ //#if !B2G && !CHROME
+ // owncould customization to load file
+ if (file && dir !== '') {
+- // Logged in
+- PDFView.open(OC.linkTo('files', 'ajax/download.php')+"?files="+decodeURIComponent(window.file)+"&dir="+decodeURIComponent(window.dir), 1.0);
++ // Logged in
++ PDFView.open(OC.linkTo('files', 'ajax/download.php')+"?files="+window.file+"&dir="+window.dir, 1.0);
+ } else {
+ // Public view
+- PDFView.open(OC.linkTo('', 'public.php')+'?service=files'+"&t="+decodeURIComponent(window.file)+"&download", 1.0);
++ PDFView.open(OC.linkTo('', 'public.php')+'?service=files'+"&t="+window.file+"&download", 1.0);
+ }
+ //#endif
+ //#if CHROME
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list