10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 22:03:49 +01:00

Better presentation for view page

This commit is contained in:
Mickaël Véril 2019-09-10 14:44:08 +02:00
parent 61038a8750
commit 77b0d8f067

View File

@ -36,9 +36,9 @@
btn_download.onclick=function(){ btn_download.onclick=function(){
window.open(path,"_self"); window.open(path,"_self");
} }
var preNode= document.getElementById('fileContent'); document.getElementById('fileTitle').innerText=filename;
preNode.hidden=false; document.getElementById('fileContent').innerText=await textPromise;
preNode.innerText=await textPromise; document.getElementById('file').hidden=false;
document.getElementById("div_btn").hidden=false; document.getElementById("div_btn").hidden=false;
} }
else { else {
@ -60,7 +60,10 @@
<p id="error_P" style="color: red; font-weight: bold" hidden=true> <p id="error_P" style="color: red; font-weight: bold" hidden=true>
Error Error
</p> </p>
<pre id="fileContent" hidden=true></pre> <div id="file" hidden=true>
<h2 id="fileTitle"></h2>
<pre id="fileContent"></pre>
</div>
</div> </div>
<div id="div_btn" hidden=true> <div id="div_btn" hidden=true>
<button id="btn_clip" onclick="Copy()">Copy content</button> <button id="btn_clip" onclick="Copy()">Copy content</button>