Commit a6fb85f0 authored by qlobbe's avatar qlobbe

fix the spinner

parent edfbae3f
This diff is collapsed.
{ {
"mode" : "static", "mode" : "explorable",
"defaultPath" : "./cesar_cleopatre.json", "defaultPath" : "./cesar_cleopatre.json",
"path" : "/home/qlobbe/Bureau/test.json" "defaultName" : "cesar & cleopatre",
"path" : "/home/qlobbe/Bureau/test.json",
"pathName" : "clinical trials"
} }
\ No newline at end of file
...@@ -26,37 +26,33 @@ ...@@ -26,37 +26,33 @@
<div class="phylo-folder"> <div class="phylo-folder">
<!-- title bar (static mode) -->
<label id="phyloName" class="phylo-name"></label>
<!-- folder bar --> <!-- folder bar -->
<label id="file-label" for="file-path" class="input-file"> <label id="file-label" for="file-path" class="input-file">load a phylomemy →</label>
load a phylomemy →
</label>
<input type="file" id="file-path"> <input type="file" id="file-path">
<label id="file-name" class="input-name"></label> <label id="file-name" class="input-name"></label>
<button id="draw" class="button draw"> <button id="draw" class="button draw">draw</button>
draw
</button>
<!-- search bar --> <!-- search bar -->
<label id="search-label" class="search-label"> <label id="search-label" class="search-label">find a term →</label>
find a term →
</label>
<input type="text" id="search-box" class="search"/> <input type="text" id="search-box" class="search"/>
<input type="text" id="search-autocomplete" class="autocomplete" disabled value="" /> <input type="text" id="search-autocomplete" class="autocomplete" disabled value="" />
</div> </div>
<!-- row 2 & 3 --> <!-- row 2 & 3 -->
<div class="phylo-corpus" id="phyloCorpus"></div> <div class="phylo-corpus" id="phyloCorpus"></div>
<div class="phylo-corpus-info" id="phyloCorpusInfo"></div> <div class="phylo-corpus-info" id="phyloCorpusInfo"></div>
<div class="phylo-how" id="phyloHow"></div> <div class="phylo-how" id="phyloHow"></div>
<div class="phylo-phylo" id="phyloPhylo"></div>
<div class="phylo-phylo" id="phyloPhylo"> <div class="phylo-phylo-info" id="phyloPhyloInfo">
<div class="fa-3x loading" id="spin"> <!-- loading spinner -->
<i class="fa fa-circle-notch fa-spin"></i> <div class="fa-3x loading" id="spin"><i class="fa fa-spinner fa-spin"></i></div>
</div>
</div> </div>
<div class="phylo-phylo-info" id="phyloPhyloInfo"></div>
<div class="phylo-isoline" id="phyloIsoLine"></div> <div class="phylo-isoline" id="phyloIsoLine"></div>
...@@ -104,11 +100,11 @@ ...@@ -104,11 +100,11 @@
} }
function unhide(mode) { function unhide(mode) {
document.querySelector("#reset").style.visibility = "visible" document.querySelector("#reset").style.visibility = "visible";
document.querySelector("#label").style.visibility = "visible" document.querySelector("#label").style.visibility = "visible";
document.querySelector("#heading").style.visibility = "visible" document.querySelector("#heading").style.visibility = "visible";
if (mode != "static") { if (mode != "static") {
document.querySelector("#export").style.visibility = "visible" document.querySelector("#export").style.visibility = "visible";
} }
} }
...@@ -118,14 +114,19 @@ ...@@ -118,14 +114,19 @@
var conf = JSON.parse(data1); var conf = JSON.parse(data1);
// available config modes are "static" or "explorable" // available config modes are "static" or "explorable"
if (conf.mode == "static") { if (conf.mode == "static") {
document.querySelector("#file-label").style.display = "none";
document.querySelector("#spin").style.visibility = "visible";
var path = ""; var path = "";
var name = "";
if (conf.path == null || conf.path == "") { if (conf.path == null || conf.path == "") {
path = conf.defaultPath; path = conf.defaultPath;
name = conf.defaultName;
} else { } else {
path = conf.path; path = conf.path;
name = conf.pathName;
} }
document.querySelector("#file-label").style.display = "none";
document.querySelector("#spin").style.visibility = "visible";
document.getElementById("phyloName").innerHTML = name;
document.querySelector("#phyloName").style.visibility = "visible";
readJson(path,function(data2){ readJson(path,function(data2){
phylo = JSON.parse(data2); phylo = JSON.parse(data2);
unhide("static"); unhide("static");
......
...@@ -567,3 +567,9 @@ i.how:hover span { ...@@ -567,3 +567,9 @@ i.how:hover span {
.loading { .loading {
visibility: hidden; visibility: hidden;
} }
.phylo-name {
visibility:hidden;
text-transform: capitalize;
font-weight: bold;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment