Marthee commited on
Commit
8b139d2
·
1 Parent(s): ff0d49d

Update templates/proposed-GUI.html

Browse files
Files changed (1) hide show
  1. templates/proposed-GUI.html +76 -22
templates/proposed-GUI.html CHANGED
@@ -12,6 +12,7 @@
12
  <link rel="stylesheet" href="static/MenuStyle.css">
13
  <link rel="stylesheet" href="static/LegendPageStyle.css">
14
  <link rel="stylesheet" href="static/popups.css">
 
15
  <meta charset="utf-8">
16
  <title>ADR Console</title>
17
  <link rel = "icon" type = "image/png" sizes = "180x154" href = "static/images/TSAlogoCropped180x154.png">
@@ -42,11 +43,11 @@
42
  </div>
43
 
44
 
45
- <div id="slider" class="slide-out">
46
- <div id="menuOptions">
47
- <li onclick="openTab(event, 'home')" >Measure Plans </li>
48
- <li onclick="redirectAlaaSearch()">Search in Documents</li>
49
- </div>
50
  </div>
51
 
52
  <div id="home" class="tabcontent" >
@@ -67,6 +68,13 @@
67
  <div id="backgroundimg" > </div>
68
  <div id="underimgbuttons"></div>
69
  </div>
 
 
 
 
 
 
 
70
 
71
  <form method="post" id="myForm" >
72
 
@@ -198,7 +206,7 @@
198
  </div>
199
 
200
  <div id="legends" class="tabcontent">
201
- <ul class="graynavbarLegend">
202
  <label class="label1">Project Name / Project Part / NRM Section /</label> <label class="label2">Legend</label>
203
  <div class="legendtime">
204
  <div style="display: inline-flex;">
@@ -213,6 +221,7 @@
213
  </div>
214
  </div>
215
  </ul>
 
216
  </div>
217
 
218
  <div class="dropdown-content">
@@ -276,9 +285,9 @@
276
  <br> &emsp;&emsp; a. (1.0 Substructure) Ground Beam or Pile Cap
277
  <br> &emsp;&emsp; b. (3.2 Floor Finishes) Floor or Wall
278
  </li>
279
- <li style="list-style-type:square;"> In the second dropdown, you will find the first part of the MC-T Name. Ex: Ground Beams: m2.</li>
280
- <li style="list-style-type:square;"> The third dropdown menu has the options (Area-perimeter-Length-Count).</li>
281
- <br> Ex: If you selected Ground Beams: m2 , You are currently obtaining the total area value from the legend. If you selected Ground Beams: m, you may choose whether to extract perimeter or length data from the third selection.
282
  <br><br><label style="font-style: italic;"> Regarding the MC-T naming process: </label>
283
  Then add the relevant detail and depth to the rows underneath the dropdowns.
284
  You can add/ subtract rows by using the + and - button.
@@ -461,14 +470,20 @@ function displayprojsections(projectName,PartName){
461
  }
462
 
463
 
464
- /*Menu bar icon Slider and Toggle*/
465
- var $slider = document.getElementById('slider');
466
  var $toggle = document.getElementById('toggle');
467
  $toggle.addEventListener('click', function() {
468
- var isOpen = $slider.classList.contains('slide-in');
469
-
470
- $slider.setAttribute('class', isOpen ? 'slide-out' : 'slide-in');
 
471
  $toggle.classList.toggle("change");
 
 
 
 
 
472
 
473
  });
474
 
@@ -506,7 +521,24 @@ document.getElementById('firstpage').addEventListener('click',function(){
506
  document.getElementById('textsecondpage').setAttribute('hidden',true)
507
 
508
  });
 
 
 
 
 
 
509
 
 
 
 
 
 
 
 
 
 
 
 
510
  //___________________________________________________________________________________________________________
511
  //___________________________________________________________________________________________________________
512
  /*Red Alert to fill in the first 3 dropdowns: prj name, part, section*/
@@ -556,9 +588,9 @@ function openTab(evt, tabname) {
556
  // Show the current tab, and add an "active" class to the button that opened the tab
557
  document.getElementById(tabname).style.display = "block";
558
  evt.currentTarget.className += " active";
559
- var isOpen = $slider.classList.contains('slide-in');
560
- if ($slider.classList.contains('slide-in'))
561
- {$slider.setAttribute('class', isOpen ? 'slide-out' : 'slide-in');
562
  document.getElementById("pagetitle").style.backgroundColor='rgb(0, 60, 255)';
563
 
564
  $toggle.classList.toggle("change");
@@ -566,9 +598,6 @@ function openTab(evt, tabname) {
566
  }
567
  // Start with the first page (Home)
568
  document.getElementById("pagetitle").click();
569
- function redirectAlaaSearch(){
570
- window.open('https://alaaadr-searchdocuments.hf.space/');
571
- }
572
 
573
  //___________________________________________________________________________________________________________
574
  //___________________________________________________________________________________________________________
@@ -942,6 +971,29 @@ var ratioPunit=1;
942
  }
943
  //___________________________________________________________________________________________________________
944
  //___________________________________________________________________________________________________________
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
945
  var spreadsheetId='';
946
  var spreadsheetURL='';
947
  var colorsUsed='';
@@ -1094,10 +1146,12 @@ function getData(form) {
1094
  // imgcanvas.width=700;
1095
  imgcanvas.height=600;
1096
  console.log(imgcanvas.width)
1097
- imgcanvas.id='imgcanvas';
1098
  imgcanvas.alt="Larry";
1099
  imgcanvas.style.zIndex=999;
1100
-
 
 
1101
  backimg.style.backgroundColor="transparent";
1102
  backimg.style.opacity="1";
1103
  getlegendstoDirectory()
 
12
  <link rel="stylesheet" href="static/MenuStyle.css">
13
  <link rel="stylesheet" href="static/LegendPageStyle.css">
14
  <link rel="stylesheet" href="static/popups.css">
15
+ <link rel="stylesheet" href="static/IMG-Larger.css">
16
  <meta charset="utf-8">
17
  <title>ADR Console</title>
18
  <link rel = "icon" type = "image/png" sizes = "180x154" href = "static/images/TSAlogoCropped180x154.png">
 
43
  </div>
44
 
45
 
46
+ <div id="mySidebar" class="slide-out">
47
+ <div id="menuOptions">
48
+ <li onclick="openTab(event, 'home')" >Measure Plans </li>
49
+ <li><a href="{{ url_for('searchDocument') }}">Search in Documents</a></li>
50
+ </div>
51
  </div>
52
 
53
  <div id="home" class="tabcontent" >
 
68
  <div id="backgroundimg" > </div>
69
  <div id="underimgbuttons"></div>
70
  </div>
71
+
72
+ <div id="myModal" class="modal" >
73
+ <span class="close">&times;</span>
74
+ <img class="modal-content" id="img01">
75
+ <div id="caption"></div>
76
+ </div>
77
+
78
 
79
  <form method="post" id="myForm" >
80
 
 
206
  </div>
207
 
208
  <div id="legends" class="tabcontent">
209
+ <ul class="graynavbarLegend" >
210
  <label class="label1">Project Name / Project Part / NRM Section /</label> <label class="label2">Legend</label>
211
  <div class="legendtime">
212
  <div style="display: inline-flex;">
 
221
  </div>
222
  </div>
223
  </ul>
224
+
225
  </div>
226
 
227
  <div class="dropdown-content">
 
285
  <br> &emsp;&emsp; a. (1.0 Substructure) Ground Beam or Pile Cap
286
  <br> &emsp;&emsp; b. (3.2 Floor Finishes) Floor or Wall
287
  </li>
288
+ <li style="list-style-type:square;"> In the second dropdown, you will find a list of MC-T Names. Choose Accordingly.</li>
289
+ <li style="list-style-type:square;"> The third dropdown menu has the unit of the MC-T Name you have chosen.</li>
290
+ <br> Note: If the unit was (m), choose whether you wish to extract perimeter or length data from the third selection.
291
  <br><br><label style="font-style: italic;"> Regarding the MC-T naming process: </label>
292
  Then add the relevant detail and depth to the rows underneath the dropdowns.
293
  You can add/ subtract rows by using the + and - button.
 
470
  }
471
 
472
 
473
+ /*Menu bar icon mySidebar and Toggle*/
474
+ var $mySidebar = document.getElementById('mySidebar');
475
  var $toggle = document.getElementById('toggle');
476
  $toggle.addEventListener('click', function() {
477
+
478
+ var isOpen = $mySidebar.classList.contains('slide-in');
479
+ w3_open();
480
+ $mySidebar.setAttribute('class', isOpen ? 'slide-out' : 'slide-in');
481
  $toggle.classList.toggle("change");
482
+
483
+
484
+ if ($mySidebar.classList.contains('slide-out')){
485
+ w3_close()
486
+ }
487
 
488
  });
489
 
 
521
  document.getElementById('textsecondpage').setAttribute('hidden',true)
522
 
523
  });
524
+ function w3_open() {
525
+ document.getElementById("home").style.marginLeft = "25%";
526
+ document.getElementById("legends").style.marginLeft = "25%";
527
+
528
+ document.getElementById("home").style.transition= '0.8s';
529
+ document.getElementById("legends").style.transition= '0.8s';
530
 
531
+ document.getElementById("mySidebar").style.width = "25%";
532
+ document.getElementById("mySidebar").style.display = "block";
533
+ }
534
+
535
+ function w3_close() {
536
+ document.getElementById("home").style.marginLeft = "0%";
537
+ document.getElementById("legends").style.marginLeft = "0%";
538
+ document.getElementById("home").style.transition= '1.5s'
539
+ document.getElementById("legends").style.transition= '1.5s'
540
+ document.getElementById("mySidebar").style.display = "none";
541
+ }
542
  //___________________________________________________________________________________________________________
543
  //___________________________________________________________________________________________________________
544
  /*Red Alert to fill in the first 3 dropdowns: prj name, part, section*/
 
588
  // Show the current tab, and add an "active" class to the button that opened the tab
589
  document.getElementById(tabname).style.display = "block";
590
  evt.currentTarget.className += " active";
591
+ var isOpen = $mySidebar.classList.contains('slide-in');
592
+ if ($mySidebar.classList.contains('slide-in'))
593
+ {$mySidebar.setAttribute('class', isOpen ? 'slide-out' : 'slide-in');
594
  document.getElementById("pagetitle").style.backgroundColor='rgb(0, 60, 255)';
595
 
596
  $toggle.classList.toggle("change");
 
598
  }
599
  // Start with the first page (Home)
600
  document.getElementById("pagetitle").click();
 
 
 
601
 
602
  //___________________________________________________________________________________________________________
603
  //___________________________________________________________________________________________________________
 
971
  }
972
  //___________________________________________________________________________________________________________
973
  //___________________________________________________________________________________________________________
974
+
975
+ function ImgLarger(id, src){
976
+ // Get the modal
977
+ var modal = document.getElementById('myModal');
978
+
979
+ // Get the image and insert it inside the modal - use its "alt" text as a caption
980
+ var img = document.getElementById(id);
981
+ var modalImg = document.getElementById('img01');
982
+ var captionText = document.getElementById("caption");
983
+ modal.style.display = "block";
984
+ modalImg.src = src;
985
+ captionText.innerHTML = 'Preview';
986
+
987
+
988
+ // Get the <span> element that closes the modal
989
+ var span = document.getElementsByClassName("close")[0];
990
+
991
+ // When the user clicks on <span> (x), close the modal
992
+ span.onclick = function() {
993
+ modal.style.display = "none";
994
+ }
995
+ }
996
+
997
  var spreadsheetId='';
998
  var spreadsheetURL='';
999
  var colorsUsed='';
 
1146
  // imgcanvas.width=700;
1147
  imgcanvas.height=600;
1148
  console.log(imgcanvas.width)
1149
+ imgcanvas.id=data[0];
1150
  imgcanvas.alt="Larry";
1151
  imgcanvas.style.zIndex=999;
1152
+ imgcanvas.addEventListener('click',function(){
1153
+ ImgLarger(imgcanvas.id,imgcanvas.src)
1154
+ })
1155
  backimg.style.backgroundColor="transparent";
1156
  backimg.style.opacity="1";
1157
  getlegendstoDirectory()