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:
authorJoas Schilling <coding@schilljs.com>2017-04-18 13:14:19 +0300
committerGitHub <noreply@github.com>2017-04-18 13:14:19 +0300
commitad93d2f0e0aa2e7ca02240e93053ba0f56281eae (patch)
treeb7487aba5989178a837679d7b6e0a04db7967051
parent97933acef35f093dbf0f3a6f23ac1acd926d1a82 (diff)
parente0b1222273dc37edb1851b9de9a38bfcde050035 (diff)
Merge pull request #28 from nextcloud/fix-download-buttonv12.0.0beta1
Fix the download button in Firefox
-rw-r--r--.gitignore59
-rw-r--r--.travis.yml2
-rw-r--r--appinfo/info.xml2
-rw-r--r--js/previewplugin.js2
-rw-r--r--js/workersrc.js4
5 files changed, 66 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..de542ff
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,59 @@
+# just sane ignores
+.*.sw[po]
+*.bak
+*.BAK
+*~
+*.orig
+*.class
+.cvsignore
+Thumbs.db
+*.py[co]
+_darcs/*
+CVS/*
+.svn/*
+RCS/*
+*.backup*
+
+# kdevelop
+.kdev
+*.kdev4
+*.kate-swp
+
+# Lokalize
+*lokalize*
+
+# eclipse
+.project
+.settings
+
+# netbeans
+nbproject
+
+# phpStorm
+.idea
+*.iml
+
+# geany
+*.geany
+
+# Cloud9IDE
+.settings.xml
+.c9revisions
+
+# vim ex mode
+.vimrc
+
+# Mac OS
+.DS_Store
+
+# WebFinger
+.well-known
+/.buildpath
+
+# Tests - auto-generated files
+/PhantomJS_*
+/tests/coverage*
+/tests/clover.xml
+/tests/js/node_modules
+/tests/js/run.sh
+/tests/karma-coverage
diff --git a/.travis.yml b/.travis.yml
index 8836899..7525a59 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,7 +18,7 @@ branches:
before_install:
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
+ - . ./before_install.sh $APP_NAME $CORE_BRANCH $DB
# Add some output debugging information
- cd ../server
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 8949f0b..3e6f895 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -17,7 +17,7 @@ about the PDF.js project at [https://mozilla.github.io/pdf.js/](https://mozilla.
</description>
<licence>AGPL</licence>
<author>Thomas Müller, Lukas Reschke</author>
- <version>1.1.0</version>
+ <version>1.1.1</version>
<dependencies>
<nextcloud min-version="12" max-version="12" />
</dependencies>
diff --git a/js/previewplugin.js b/js/previewplugin.js
index 2e71996..e5518b4 100644
--- a/js/previewplugin.js
+++ b/js/previewplugin.js
@@ -46,7 +46,7 @@
var self = this;
var $iframe;
var viewer = OC.generateUrl('/apps/files_pdfviewer/?file={file}', {file: downloadUrl});
- $iframe = $('<iframe id="pdframe" style="width:100%;height:100%;display:block;position:absolute;top:0;z-index:141;" src="'+viewer+'" sandbox="allow-scripts allow-same-origin allow-popups allow-modals" />');
+ $iframe = $('<iframe id="pdframe" style="width:100%;height:100%;display:block;position:absolute;top:0;z-index:141;" src="'+viewer+'" sandbox="allow-scripts allow-same-origin allow-popups allow-modals allow-top-navigation" />');
if(isFileList === true) {
FileList.setViewerMode(true);
diff --git a/js/workersrc.js b/js/workersrc.js
index 7e4079f..2aa186b 100644
--- a/js/workersrc.js
+++ b/js/workersrc.js
@@ -15,3 +15,7 @@ redirectIfNotDisplayedInFrame();
PDFJS.openExternalLinksInNewWindow = true;
PDFJS.isEvalSupported = false;
PDFJS.workerSrc = document.getElementsByTagName('head')[0].getAttribute('data-workersrc');
+
+PDFViewerApplication.download = function() {
+ window.open(decodeURIComponent(window.location.search.substr(6)), '_blank');
+}; \ No newline at end of file