|
|
@ -947,14 +947,6 @@ var PDFViewerApplication = { |
|
|
|
window.addEventListener('hashchange', _boundEvents.windowHashChange); |
|
|
|
window.addEventListener('hashchange', _boundEvents.windowHashChange); |
|
|
|
window.addEventListener('beforeprint', _boundEvents.windowBeforePrint); |
|
|
|
window.addEventListener('beforeprint', _boundEvents.windowBeforePrint); |
|
|
|
window.addEventListener('afterprint', _boundEvents.windowAfterPrint); |
|
|
|
window.addEventListener('afterprint', _boundEvents.windowAfterPrint); |
|
|
|
_boundEvents.windowChange = function (evt) { |
|
|
|
|
|
|
|
var files = evt.target.files; |
|
|
|
|
|
|
|
if (!files || files.length === 0) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
eventBus.dispatch('fileinputchange', { fileInput: evt.target }); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
window.addEventListener('change', _boundEvents.windowChange); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
unbindEvents: function unbindEvents() { |
|
|
|
unbindEvents: function unbindEvents() { |
|
|
|
var eventBus = this.eventBus, |
|
|
|
var eventBus = this.eventBus, |
|
|
@ -1005,8 +997,6 @@ var PDFViewerApplication = { |
|
|
|
window.removeEventListener('hashchange', _boundEvents.windowHashChange); |
|
|
|
window.removeEventListener('hashchange', _boundEvents.windowHashChange); |
|
|
|
window.removeEventListener('beforeprint', _boundEvents.windowBeforePrint); |
|
|
|
window.removeEventListener('beforeprint', _boundEvents.windowBeforePrint); |
|
|
|
window.removeEventListener('afterprint', _boundEvents.windowAfterPrint); |
|
|
|
window.removeEventListener('afterprint', _boundEvents.windowAfterPrint); |
|
|
|
window.removeEventListener('change', _boundEvents.windowChange); |
|
|
|
|
|
|
|
_boundEvents.windowChange = null; |
|
|
|
|
|
|
|
_boundEvents.windowResize = null; |
|
|
|
_boundEvents.windowResize = null; |
|
|
|
_boundEvents.windowHashChange = null; |
|
|
|
_boundEvents.windowHashChange = null; |
|
|
|
_boundEvents.windowBeforePrint = null; |
|
|
|
_boundEvents.windowBeforePrint = null; |
|
|
@ -1077,6 +1067,13 @@ function webViewerInitialized() { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
fileInput.value = null; |
|
|
|
fileInput.value = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
fileInput.addEventListener('change', function (evt) { |
|
|
|
|
|
|
|
var files = evt.target.files; |
|
|
|
|
|
|
|
if (!files || files.length === 0) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
PDFViewerApplication.eventBus.dispatch('fileinputchange', { fileInput: evt.target }); |
|
|
|
|
|
|
|
}); |
|
|
|
if (PDFViewerApplication.viewerPrefs['pdfBugEnabled']) { |
|
|
|
if (PDFViewerApplication.viewerPrefs['pdfBugEnabled']) { |
|
|
|
var hash = document.location.hash.substring(1); |
|
|
|
var hash = document.location.hash.substring(1); |
|
|
|
var hashParams = (0, _ui_utils.parseQueryString)(hash); |
|
|
|
var hashParams = (0, _ui_utils.parseQueryString)(hash); |
|
|
|