Marthee commited on
Commit
fa71b37
·
verified ·
1 Parent(s): 60079a8

Update templates/proposed-GUI.html

Browse files
Files changed (1) hide show
  1. templates/proposed-GUI.html +24 -45
templates/proposed-GUI.html CHANGED
@@ -665,40 +665,11 @@ worker.onmessage= function(event){
665
 
666
 
667
 
668
- var workerDropbox = new Worker('../static/DropboxWorker.js');
669
- workerDropbox.onmessage= function(event)
670
- {
671
- var dataDropbox=JSON.parse(event.data);
672
- console.log(dataDropbox)
673
- // if (dataDropbox)
674
- // {
675
- // $.ajax({
676
- // type: "POST",
677
- // url: "/postdropboxprojects",
678
-
679
- // // set content type header to use Flask response.get_json()
680
- // contentType: "application/json",
681
-
682
- // // convert data/object to JSON to send
683
- // data: JSON.stringify({dict:dataDropbox[1]}),
684
-
685
- // // expect JSON data in return (e.g. Flask jsonify)
686
- // dataType: "json",
687
-
688
- // // handle response
689
- // success: function(response) {
690
- // console.log(response);
691
- // document.getElementById('all').style.display='none';
692
- // console.log('posted successfully',data)
693
- // getproj();
694
- // },
695
- // error: function(err) {
696
- // PopupElement.textContent='Error occured. Refresh and try again. If the error continues, please contact the ADR team to fix it. ';
697
- // ShowPopUp();
698
- // }
699
- // })
700
- // }
701
- }
702
  //___________________________________________________________________________________________________________
703
  //___________________________________________________________________________________________________________
704
  // /*Retrieve MCTNAMES Dictionary from API - Flask*/
@@ -2725,12 +2696,13 @@ document.getElementById("refreshDropboxButtonID").disabled=false;
2725
  // }
2726
 
2727
 
2728
- document.getElementById("confirm").onclick = function(){confirmDialog()};
2729
- function confirmDialog() {
2730
- /* code executed if confirm is clicked */
2731
- overlayme.style.display = "none";
2732
- callrefreshDropbox();
2733
- }
 
2734
 
2735
  // If cancel btn is clicked , the function cancel() is executed
2736
  document.getElementById("cancel").onclick = function(){cancelDialog()};
@@ -2739,7 +2711,7 @@ function cancelDialog() {
2739
  }
2740
 
2741
  function callrefreshDropbox(){
2742
- console.log('l')
2743
  document.getElementById("refreshDropboxButtonID").style.backgroundColor = "gray";
2744
  document.getElementById("refreshDropboxButtonID").style.cursor='not-allowed';
2745
  document.getElementById("refreshDropboxButtonID").disabled="disabled";
@@ -2781,11 +2753,18 @@ document.getElementById("refreshAPIbutton").onclick = function()
2781
  // }
2782
 
2783
 
2784
- document.getElementById("confirm").onclick = function(){confirmDialog()};
2785
- function confirmDialog() {
2786
- /* code executed if confirm is clicked */
2787
  overlayme.style.display = "none";
2788
- callrefreshAPI();
 
 
 
 
 
 
 
2789
  }
2790
 
2791
  // // If cancel btn is clicked , the function cancel() is executed
 
665
 
666
 
667
 
668
+ // var workerDropbox = new Worker('../static/DropboxWorker.js');
669
+ // workerDropbox.onmessage= function(event)
670
+ // {
671
+ // var dataDropbox=JSON.parse(event.data);
672
+ // }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
673
  //___________________________________________________________________________________________________________
674
  //___________________________________________________________________________________________________________
675
  // /*Retrieve MCTNAMES Dictionary from API - Flask*/
 
2696
  // }
2697
 
2698
 
2699
+ // document.getElementById("confirm").onclick = function(){confirmDialog()};
2700
+ // function confirmDialog() {
2701
+ // /* code executed if confirm is clicked */
2702
+ // console.log('bvhj')
2703
+ // overlayme.style.display = "none";
2704
+ // callrefreshDropbox();
2705
+ // }
2706
 
2707
  // If cancel btn is clicked , the function cancel() is executed
2708
  document.getElementById("cancel").onclick = function(){cancelDialog()};
 
2711
  }
2712
 
2713
  function callrefreshDropbox(){
2714
+ console.log('ldropboxx')
2715
  document.getElementById("refreshDropboxButtonID").style.backgroundColor = "gray";
2716
  document.getElementById("refreshDropboxButtonID").style.cursor='not-allowed';
2717
  document.getElementById("refreshDropboxButtonID").disabled="disabled";
 
2753
  // }
2754
 
2755
 
2756
+ document.getElementById("confirm").onclick = function(){confirmDialogR()};
2757
+ function confirmDialogR() {
2758
+ /* code executed if confirm is clicked */
2759
  overlayme.style.display = "none";
2760
+ console.log(document.getElementById("confirm").parentElement.parentElement.children[0].textContent)
2761
+ if (document.getElementById("confirm").parentElement.parentElement.children[0].textContent.startsWith('Are'))
2762
+ {
2763
+ console.log('hereeeeeeeee')
2764
+ callrefreshDropbox();
2765
+ }
2766
+ else
2767
+ callrefreshAPI();
2768
  }
2769
 
2770
  // // If cancel btn is clicked , the function cancel() is executed