From: Johannes Zellner Date: Tue, 3 Mar 2020 16:59:17 +0000 (+0100) Subject: Carry over public.html fixes to index.html X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git;a=commitdiff_plain;h=2d28c88dd7a6765a6d2ed54758bbb4c3da999331 Carry over public.html fixes to index.html --- 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) {