Commit fdc55ba2 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Merge "Make pdf.js use absolute file urls, and get PDF URl from a JS variable"

parents 0b39fa0a b4d52458
......@@ -24,3 +24,5 @@ Changes:
* viewer.css additions to support viewing by non-JS users
* viewer.css tweak to get the bottom of the display to show
* viewer.css tweak to avoid horizontal scrollbar on default 3-column page layout
* Change viewer.js to get the PDF file from a JS variable instead of a URL query parameter
* Change viewer.js to use absolute URLs to JS libraries
......@@ -38,9 +38,9 @@ var SCALE_SELECT_PADDING = 22;
var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading';
var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000;
PDFJS.imageResourcesPath = './images/';
PDFJS.workerSrc = '../build/pdf.worker.min.js';
PDFJS.cMapUrl = '../web/cmaps/';
PDFJS.imageResourcesPath = wwwroot + 'artefact/file/blocktype/pdf/js/pdfjs/images/';
PDFJS.workerSrc = wwwroot + 'artefact/file/blocktype/pdf/js/pdfjs/build/pdf.worker.min.js';
PDFJS.cMapUrl = wwwroot + 'artefact/file/blocktype/pdf/js/pdfjs/web/cmaps/';
PDFJS.cMapPacked = true;
var mozL10n = document.mozL10n || document.webL10n;
......@@ -6220,6 +6220,7 @@ function webViewerInitialized() {
var queryString = document.location.search.substring(1);
var params = PDFViewerApplication.parseQueryString(queryString);
var file = 'file' in params ? params.file : DEFAULT_URL;
file = fileurl;
var fileInput = document.createElement('input');
fileInput.id = 'fileInput';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment