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:
authorLukas Reschke <lukas@statuscode.ch>2013-01-22 21:42:15 +0400
committerLukas Reschke <lukas@statuscode.ch>2013-01-22 21:42:15 +0400
commit1bcc77f965c641e859f540e6e434a88a92779c97 (patch)
tree01cea5a26ed2dca86c7ddde4f8af80e49931f22e /templates
parent4ad108b8eacfa9de1828e98b0ea726d97d52b24c (diff)
Move inline JS to external file
Diffstat (limited to 'templates')
-rw-r--r--templates/pdf.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/templates/pdf.php b/templates/pdf.php
index 85bb07e..5add02f 100644
--- a/templates/pdf.php
+++ b/templates/pdf.php
@@ -31,21 +31,14 @@ limitations under the License.
<script type="text/javascript"
src="<?php echo OC_Helper::linkTo('files_pdfviewer', 'js/pdf/l10n.js'); ?>"></script>
<script type="text/javascript" src="<?php echo OC_Helper::linkTo('files_pdfviewer', 'js/pdf/pdf.js'); ?>"></script>
- <script type="text/javascript">
- // This specifies the location of the pdf.js file.
- PDFJS.workerSrc = "<?php echo OC_Helper::linkTo('files_pdfviewer', 'js/pdf/pdf.js'); ?>";
- </script>
-
<script type="text/javascript"
src="<?php echo OC_Helper::linkTo('files_pdfviewer', 'js/pdf/viewer.js'); ?>"></script>
+
+ <script type="text/javascript" src="<?php echo OC_Helper::linkTo('files_pdfviewer', 'js/files.php'); ?>?file=<?php echo urlencode($_['file']); ?>&amp;dir=<?php echo urlencode($_['dir']); ?>"></script>
+
</head>
-<script type="text/javascript">
- var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
- window.dir = "<?php echo $_['dir']; ?>";
- window.file = "<?php echo $_['file']; ?>";
-</script>
<body>