From 2d28c88dd7a6765a6d2ed54758bbb4c3da999331 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 3 Mar 2020 17:59:17 +0100 Subject: Carry over public.html fixes to index.html --- frontend/index.html | 4 ++-- frontend/js/app.js | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 1905894..3a2f7f7 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -96,8 +96,8 @@
- - + + diff --git a/frontend/js/app.js b/frontend/js/app.js index 9ce073e..f532bc1 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -150,7 +150,15 @@ function open(row, column, event) { app.activeEntry.fullPath = encode(sanitize(app.path + '/' + row.filePath)); app.previewDrawerVisible = true - // window.open(encode(path)); + // need to wait for DOM element to exist + setTimeout(function () { + $('iframe').on('load', function (e) { + if (!e.target.contentWindow.document.body) return; + + e.target.contentWindow.document.body.style.display = 'flex' + e.target.contentWindow.document.body.style.justifyContent = 'center' + }); + }, 0); } function uploadFiles(files) { -- cgit v1.2.3