diff --git a/static/js/PDFViewer.js b/static/js/PDFViewer.js
index d128f26e..5404a423 100644
--- a/static/js/PDFViewer.js
+++ b/static/js/PDFViewer.js
@@ -59,7 +59,7 @@ Ox.PDFViewer = function(options, self) {
.attr({
frameborder: 0,
height: self.options.height + 'px',
- src: self.options.pdfjsURL + '?' + pandora.getVersion() + '&file=' + encodeURIComponent(self.options.url) + '#page=' + self.options.page,
+ src: self.options.pdfjsURL + '?file=' + encodeURIComponent(self.options.url) + '#page=' + self.options.page,
width: self.options.width + 'px'
})
.onMessage(function(data, event) {
diff --git a/static/js/pandora.js b/static/js/pandora.js
index 94c637f7..0939d150 100644
--- a/static/js/pandora.js
+++ b/static/js/pandora.js
@@ -253,7 +253,6 @@ appPanel
});
}
});
- window.pandora.getVersion = getPandoraVersion
}
function loadPandoraFiles(callback) {
diff --git a/static/pdf.js/index.html b/static/pdf.js/index.html
index 38fe9f3d..c9958918 100644
--- a/static/pdf.js/index.html
+++ b/static/pdf.js/index.html
@@ -33,9 +33,9 @@ See https://github.com/adobe-type-tools/cmap-resources
+
-
diff --git a/static/pdf.js/pandora.css b/static/pdf.js/pandora.css
index d146cdc3..406ff73b 100644
--- a/static/pdf.js/pandora.css
+++ b/static/pdf.js/pandora.css
@@ -20,11 +20,9 @@
.verticalToolbarSeparator.hiddenMediumView,
#print,
-#secondaryPrint,
#openFile,
-#secondaryOpenFile,
#editorModeButtons {
- display: none !important;
+ display: none;
}
.page .crop-overlay {
diff --git a/static/pdf.js/pandora.js b/static/pdf.js/pandora.js
index 27f73ccb..a54148d8 100644
--- a/static/pdf.js/pandora.js
+++ b/static/pdf.js/pandora.js
@@ -29,35 +29,6 @@ embedPage.addEventListener("click", event => {
});
})
-// secondary menu
-div.innerHTML = `
-
-`
-var secondaryCropFile = div.querySelector("#secondaryCropFile")
-document.querySelector('#secondaryToolbarButtonContainer').insertBefore(
- secondaryCropFile,
- document.querySelector('#secondaryToolbarButtonContainer').firstChild
-)
-
-div.innerHTML = `
-
-`
-var secondaryEmbedPage = div.querySelector("#secondaryEmbedPage")
-document.querySelector('#secondaryToolbarButtonContainer').insertBefore(
- secondaryEmbedPage,
- document.querySelector('#secondaryToolbarButtonContainer').firstChild
-)
-secondaryEmbedPage.addEventListener("click", event => {
- Ox.$parent.postMessage('embed', {
- page: PDFViewerApplication.page
- });
-})
-
-
async function archiveAPI(action, data) {
var url = baseUrl + '/api/'
var key = JSON.stringify([action, data])
@@ -209,22 +180,20 @@ const addToRecent = obj => {
}
function initOverlay() {
- document.querySelectorAll('#cropFile,.secondaryToolbarButton.cropFile').forEach(btn => {
- btn.addEventListener('click', event=> {
- if (cropInactive) {
- event.target.style.background = 'red'
- cropInactive = false
- document.querySelectorAll('.crop-overlay.inactive').forEach(element => {
- element.classList.remove('inactive')
- })
- } else {
- event.target.style.background = ''
- cropInactive = true
- document.querySelectorAll('.crop-overlay').forEach(element => {
- element.classList.add('inactive')
- })
- }
- })
+ document.querySelector('#cropFile').addEventListener('click', event=> {
+ if (cropInactive) {
+ event.target.style.background = 'red'
+ cropInactive = false
+ document.querySelectorAll('.crop-overlay.inactive').forEach(element => {
+ element.classList.remove('inactive')
+ })
+ } else {
+ event.target.style.background = ''
+ cropInactive = true
+ document.querySelectorAll('.crop-overlay').forEach(element => {
+ element.classList.add('inactive')
+ })
+ }
})
var first = true
PDFViewerApplication.initializedPromise.then(function() {
@@ -253,6 +222,9 @@ function initOverlay() {
div.appendChild(overlay)
renderCropOverlay(overlay, documentId, page)
})
+ PDFViewerApplication.pdfViewer.eventBus.on("pagechanging", function(event) {
+ console.log("pagechanging", event, event.pageNumber.toString())
+ })
})
}