Marthee commited on
Commit
c546719
·
verified ·
1 Parent(s): f5e68e9

Update templates/proposed-GUI.html

Browse files
Files changed (1) hide show
  1. templates/proposed-GUI.html +47 -8
templates/proposed-GUI.html CHANGED
@@ -100,7 +100,7 @@
100
 
101
  <div id ="tomeasurediv">
102
  <label id="measureLabel">Document To Measure</label>
103
- <input type="search" onkeyup=filterFunction(this.id) id="tomeasureSearchInput">
104
  <br>
105
  <div id="measureCheckbox">
106
  <select style="margin-left: -1%;" hidden name="measureselectname" id="measureselectid" multiple size="5" required> </select>
@@ -229,7 +229,6 @@
229
 
230
  </div>
231
 
232
-
233
  <div class="dropdown-content">
234
  <div id="userguidetext">
235
  <div id="textfirstpage">
@@ -336,6 +335,7 @@
336
  </html>
337
 
338
  <script >
 
339
  ///////////////////////////////////////////////BEGIN JS CODE//////////////////////////////////////////////////
340
  PopupElement=document.getElementById('modal-bodyText');
341
 
@@ -361,6 +361,7 @@ $(thirddropdown).select2({
361
  width:'51ch'
362
  });
363
  var measSelect = document.getElementById("measureselectid");
 
364
  var relvSelect = document.getElementById("relvselectid");
365
  document.getElementById("all").style.display = "block";
366
 
@@ -369,7 +370,8 @@ PrjPartsArray=[];
369
  PrjSectionsArray=[];
370
  var partsArrwithID=[];
371
  var firstDpwnValue;
372
-
 
373
  $.get('/getprojectnames/')
374
  .success(function(data) {
375
  document.getElementById("all").style.display = "none";
@@ -393,7 +395,7 @@ $.get('/getprojectnames/')
393
  ShowPopUp();
394
 
395
  });
396
-
397
  /*Get chosen value and send to flask to get project parts*/
398
  // firstdropdownInput=document.getElementById('selectionsProjid');
399
  // console.log('kk',firstdropdownInput)
@@ -461,7 +463,7 @@ function displayprojsections(projectName,PartName){
461
  opt.text=data[i];
462
  thirddropdown.append(opt);
463
 
464
- if(!(data[i].startsWith('1.0') ))//|| data[i].startsWith('3.2') ||data[i].startsWith('2.2')))
465
  {
466
  opt.style.color='#bdbcbc';
467
  opt.style.cursor='not-allowed';
@@ -494,7 +496,7 @@ $toggle.addEventListener('click', function() {
494
  }
495
 
496
  });
497
- //API refresh worker -- work parallel to this code
498
  var worker = new Worker('../static/API_Refresh_workerJS.js');
499
  worker.onmessage= function(event){
500
  var data=JSON.parse(event.data);
@@ -557,6 +559,38 @@ worker.onmessage= function(event){
557
 
558
  }
559
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  //___________________________________________________________________________________________________________
561
  //___________________________________________________________________________________________________________
562
  /*Retrieve MCTNAMES Dictionary from API - Flask*/
@@ -624,7 +658,6 @@ document.getElementById('measureADRbutton').addEventListener('click',function(){
624
 
625
  /*Clear output everytime the user clicks on measureADR button*/
626
  var rightside=document.getElementById('rightside');
627
- var rightside=document.getElementById('rightside');
628
  document.getElementById("backgroundimg").innerHTML='';
629
  document.getElementById("underimgbuttons").innerHTML='';
630
  var rightchidren= rightside.children;
@@ -633,11 +666,13 @@ document.getElementById('measureADRbutton').addEventListener('click',function(){
633
  if (rightchidren[ch].id == 'imgcanvas')
634
  {
635
  rightside.removeChild(rightchidren[ch])
 
636
  clearInterval()
637
  clearTimeout()
638
  }
639
  }
640
  });
 
641
  //___________________________________________________________________________________________________________
642
  //___________________________________________________________________________________________________________
643
  /*Toggle Tab View of Home and Legend along with the Menu bar icon*/
@@ -902,6 +937,7 @@ var ratioPunit=1;
902
 
903
  relvids.forEach(function(elem){
904
  elem.addEventListener("change", function() {
 
905
  document.getElementById("all").style.display = "block";
906
  // var pdfpatharr=[]
907
  // pdfpatharr.push(projname.value, projpart.value,projsec.value, elem.value)
@@ -918,7 +954,8 @@ var ratioPunit=1;
918
  });
919
 
920
  measids.forEach(function(elem) {
921
- elem.addEventListener("change", function() {
 
922
  canvasimg='';
923
  ry=[[]];
924
  levelcheckbox.checked=false;
@@ -2197,6 +2234,7 @@ $.get('/getAPITables/')
2197
  table1=data[0]; //prj names table
2198
  table2=data[1]; //prj parts table
2199
  table3=data[2]; //prj sections table
 
2200
  })
2201
  .error(function(jqXHR, textStatus, errorThrown) {
2202
  PopupElement.textContent='Error occured. Refresh and try again. If the error continues, please contact the ADR team to fix it. ';
@@ -2499,6 +2537,7 @@ function ShowPopUp(){
2499
  }
2500
  };
2501
 
 
2502
  function filterFunction(id) {
2503
  var input, filter, ul, li, a, i;
2504
  input = document.getElementById(id);
 
100
 
101
  <div id ="tomeasurediv">
102
  <label id="measureLabel">Document To Measure</label>
103
+ <input type="search" onkeyup=filterFunction(this.id) id="tomeasureSearchInput">
104
  <br>
105
  <div id="measureCheckbox">
106
  <select style="margin-left: -1%;" hidden name="measureselectname" id="measureselectid" multiple size="5" required> </select>
 
229
 
230
  </div>
231
 
 
232
  <div class="dropdown-content">
233
  <div id="userguidetext">
234
  <div id="textfirstpage">
 
335
  </html>
336
 
337
  <script >
338
+
339
  ///////////////////////////////////////////////BEGIN JS CODE//////////////////////////////////////////////////
340
  PopupElement=document.getElementById('modal-bodyText');
341
 
 
361
  width:'51ch'
362
  });
363
  var measSelect = document.getElementById("measureselectid");
364
+
365
  var relvSelect = document.getElementById("relvselectid");
366
  document.getElementById("all").style.display = "block";
367
 
 
370
  PrjSectionsArray=[];
371
  var partsArrwithID=[];
372
  var firstDpwnValue;
373
+ displayprjnames()
374
+ function displayprjnames(){
375
  $.get('/getprojectnames/')
376
  .success(function(data) {
377
  document.getElementById("all").style.display = "none";
 
395
  ShowPopUp();
396
 
397
  });
398
+ }
399
  /*Get chosen value and send to flask to get project parts*/
400
  // firstdropdownInput=document.getElementById('selectionsProjid');
401
  // console.log('kk',firstdropdownInput)
 
463
  opt.text=data[i];
464
  thirddropdown.append(opt);
465
 
466
+ if(!(data[i].startsWith('1.0') ))//|| data[i].startsWith('3.2') ||data[i].startsWith('2.2')))
467
  {
468
  opt.style.color='#bdbcbc';
469
  opt.style.cursor='not-allowed';
 
496
  }
497
 
498
  });
499
+
500
  var worker = new Worker('../static/API_Refresh_workerJS.js');
501
  worker.onmessage= function(event){
502
  var data=JSON.parse(event.data);
 
559
 
560
  }
561
  }
562
+
563
+ // var workerDropbox = new Worker('../static/DropboxWorker.js');
564
+ // workerDropbox.onmessage= function(event){
565
+ // var dataDropbox=JSON.parse(event.data);
566
+ // console.log(dataDropbox)
567
+ // if (dataDropbox)
568
+ // { console.log('dataDropbox')
569
+ // console.log(dataDropbox)
570
+ // console.log(dataDropbox[1])
571
+
572
+ // if (confirm(dataDropbox[0]+"\n")){
573
+ // document.getElementById('all').style.display='block';
574
+
575
+ // $.getJSON('/postdropboxprojects', {
576
+ // dict: JSON.stringify(dataDropbox[1]),
577
+
578
+ // }, function(data2){
579
+ // console.log(data2)
580
+ // if (data2.startsWith('post'))
581
+ // {
582
+ // getproj();
583
+ // }
584
+
585
+ // })
586
+ // }
587
+ // else{
588
+ // workerDropbox.terminate()
589
+ // }
590
+
591
+ // }
592
+ // }
593
+
594
  //___________________________________________________________________________________________________________
595
  //___________________________________________________________________________________________________________
596
  /*Retrieve MCTNAMES Dictionary from API - Flask*/
 
658
 
659
  /*Clear output everytime the user clicks on measureADR button*/
660
  var rightside=document.getElementById('rightside');
 
661
  document.getElementById("backgroundimg").innerHTML='';
662
  document.getElementById("underimgbuttons").innerHTML='';
663
  var rightchidren= rightside.children;
 
666
  if (rightchidren[ch].id == 'imgcanvas')
667
  {
668
  rightside.removeChild(rightchidren[ch])
669
+ // document.getElementById('imgcanvas').innerHTML=''
670
  clearInterval()
671
  clearTimeout()
672
  }
673
  }
674
  });
675
+
676
  //___________________________________________________________________________________________________________
677
  //___________________________________________________________________________________________________________
678
  /*Toggle Tab View of Home and Legend along with the Menu bar icon*/
 
937
 
938
  relvids.forEach(function(elem){
939
  elem.addEventListener("change", function() {
940
+ // console.log(elem.value)
941
  document.getElementById("all").style.display = "block";
942
  // var pdfpatharr=[]
943
  // pdfpatharr.push(projname.value, projpart.value,projsec.value, elem.value)
 
954
  });
955
 
956
  measids.forEach(function(elem) {
957
+ elem.addEventListener("change", function() {
958
+
959
  canvasimg='';
960
  ry=[[]];
961
  levelcheckbox.checked=false;
 
2234
  table1=data[0]; //prj names table
2235
  table2=data[1]; //prj parts table
2236
  table3=data[2]; //prj sections table
2237
+
2238
  })
2239
  .error(function(jqXHR, textStatus, errorThrown) {
2240
  PopupElement.textContent='Error occured. Refresh and try again. If the error continues, please contact the ADR team to fix it. ';
 
2537
  }
2538
  };
2539
 
2540
+
2541
  function filterFunction(id) {
2542
  var input, filter, ul, li, a, i;
2543
  input = document.getElementById(id);