2020-01-28 12:51:21 +01:00
|
|
|
function PDFViewer(viewer, file) {
|
2020-02-04 19:37:46 +01:00
|
|
|
this.viewer = viewer
|
|
|
|
this.file = file
|
2020-01-21 15:33:09 +01:00
|
|
|
|
2020-02-04 19:37:46 +01:00
|
|
|
this.container = document.createElement("iframe")
|
|
|
|
this.container.classList = "image-container"
|
|
|
|
this.container.style.border = "none"
|
2020-02-04 22:29:48 +01:00
|
|
|
this.container.src = "/res/misc/pdf-viewer/web/viewer.html?file="+encodeURIComponent(this.file.get_href)
|
2020-01-27 16:56:16 +01:00
|
|
|
}
|
2020-01-28 12:51:21 +01:00
|
|
|
PDFViewer.prototype.render = function(parent) {
|
2020-02-04 19:37:46 +01:00
|
|
|
parent.appendChild(this.container)
|
2020-01-21 15:33:09 +01:00
|
|
|
}
|