HuggingFace-SK commited on
Commit
97f7ee2
·
1 Parent(s): 6cac5d8

fix final reload not working

Browse files
Files changed (1) hide show
  1. templates/index.html +8 -6
templates/index.html CHANGED
@@ -771,14 +771,14 @@ color: #747474;
771
 
772
  if (stage == "start") {
773
  stage = "scheme"
774
- get("final").setAttribute("disabled", "disabled");
775
  stage_start()
776
  return;
777
  }
778
 
779
  if (stage == "scheme") {
780
  get("back").style.display = "inline"
781
- get("final").setAttribute("disabled", "disabled");
782
  console.log("dis")
783
  //await until(_ => get("Scheme").value != "");
784
  stage = "area"
@@ -786,7 +786,7 @@ color: #747474;
786
  return;
787
  }
788
  if (stage == "area") {
789
- get("final").setAttribute("disabled", "disabled");
790
  console.log("dis")
791
  //await until(_ => get("Area").value != "");
792
  stage = "duration"
@@ -794,7 +794,7 @@ color: #747474;
794
  return;
795
  }
796
  if (stage == "duration") {
797
- get("final").setAttribute("disabled", "disabled");
798
  //await until(_ => get("Duration").value != "");
799
  stage = "query"
800
 
@@ -809,6 +809,7 @@ color: #747474;
809
  }
810
  }
811
  async function stage_start() {
 
812
  console.log("start")
813
  local_path = ""
814
  get("i1").style.display = "block"
@@ -827,7 +828,7 @@ color: #747474;
827
  console.log("ena")
828
  }
829
  async function stage_scheme() {
830
-
831
  console.log("scheme")
832
  get("i1").style.display = "none"
833
  get("i2").style.display = "block"
@@ -847,6 +848,7 @@ color: #747474;
847
  console.log("ena")
848
  }
849
  async function stage_area() {
 
850
  console.log("area")
851
  get("i1").style.display = "none"
852
  get("i2").style.display = "none"
@@ -873,7 +875,7 @@ color: #747474;
873
  nextStage();
874
 
875
  async function query() {
876
-
877
  var cache = await fetch_api("/load_cache", {})
878
  var cacheJSON = await cache.json()
879
  var word = ""
 
771
 
772
  if (stage == "start") {
773
  stage = "scheme"
774
+
775
  stage_start()
776
  return;
777
  }
778
 
779
  if (stage == "scheme") {
780
  get("back").style.display = "inline"
781
+
782
  console.log("dis")
783
  //await until(_ => get("Scheme").value != "");
784
  stage = "area"
 
786
  return;
787
  }
788
  if (stage == "area") {
789
+
790
  console.log("dis")
791
  //await until(_ => get("Area").value != "");
792
  stage = "duration"
 
794
  return;
795
  }
796
  if (stage == "duration") {
797
+
798
  //await until(_ => get("Duration").value != "");
799
  stage = "query"
800
 
 
809
  }
810
  }
811
  async function stage_start() {
812
+ get("final").setAttribute("disabled", "disabled");
813
  console.log("start")
814
  local_path = ""
815
  get("i1").style.display = "block"
 
828
  console.log("ena")
829
  }
830
  async function stage_scheme() {
831
+ get("final").setAttribute("disabled", "disabled");
832
  console.log("scheme")
833
  get("i1").style.display = "none"
834
  get("i2").style.display = "block"
 
848
  console.log("ena")
849
  }
850
  async function stage_area() {
851
+ get("final").setAttribute("disabled", "disabled");
852
  console.log("area")
853
  get("i1").style.display = "none"
854
  get("i2").style.display = "none"
 
875
  nextStage();
876
 
877
  async function query() {
878
+ get("final").removeAttribute("disabled");
879
  var cache = await fetch_api("/load_cache", {})
880
  var cacheJSON = await cache.json()
881
  var word = ""