Commit 84879537 authored by Son Nguyen's avatar Son Nguyen Committed by Robert Lyon
Browse files

Configure the pdfjs javascript lib (Bug #1036556)



Disable Open file feature

Change-Id: If13332299e430126b3ac78e06d80e7ed189ebcaa
Signed-off-by: default avatarSon Nguyen <sonn@catalyst.net.nz>
parent a4b07992
......@@ -129,6 +129,7 @@ html[dir='rtl'] .innerCenter {
#outerContainer {
width: 100%;
height: 100%;
position: relative;
}
#sidebarContainer {
......
......@@ -18,7 +18,7 @@
'use strict';
var DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf';
var DEFAULT_URL = wwwroot + '/artefact/file/blocktype/pdf/js/pdfjs/sample.pdf';
var DEFAULT_SCALE = 'auto';
var DEFAULT_SCALE_DELTA = 1.1;
var UNKNOWN_SCALE = 0;
......@@ -28,7 +28,7 @@ var SCROLLBAR_PADDING = 40;
var VERTICAL_PADDING = 5;
var MIN_SCALE = 0.25;
var MAX_SCALE = 4.0;
var IMAGE_DIR = './images/';
var IMAGE_DIR = wwwroot + '/artefact/file/blocktype/pdf/js/pdfjs/images/';
var SETTINGS_MEMORY = 20;
var ANNOT_MIN_SIZE = 10;
var RenderingStates = {
......@@ -44,7 +44,7 @@ var FindStates = {
FIND_PENDING: 3
};
PDFJS.workerSrc = 'pdf.js';
PDFJS.workerSrc = wwwroot + '/artefact/file/blocktype/pdf/js/pdfjs/pdf.js';
var mozL10n = document.mozL10n || document.webL10n;
......@@ -3095,10 +3095,10 @@ document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
PDFView.fullscreen();
});
document.getElementById('openFile').addEventListener('click',
function() {
document.getElementById('fileInput').click();
});
// document.getElementById('openFile').addEventListener('click',
// function() {
// document.getElementById('fileInput').click();
// });
document.getElementById('print').addEventListener('click',
function() {
......
Markdown is supported
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