Marthee commited on
Commit
e7688d0
·
verified ·
1 Parent(s): 2691864

Update templates/proposed-GUI.html

Browse files
Files changed (1) hide show
  1. templates/proposed-GUI.html +50 -19
templates/proposed-GUI.html CHANGED
@@ -522,7 +522,7 @@ function displayprojsections(projectid,Partid){
522
  opt.text=data[i];
523
  thirddropdown.append(opt);
524
 
525
- if(!(data[i].startsWith('1.0') ) && !(data[i].startsWith('3.2')) && !(data[i].startsWith('2.8'))) // ||data[i].startsWith('2.2')))
526
  {
527
  opt.style.color='#bdbcbc';
528
  opt.style.cursor='not-allowed';
@@ -646,7 +646,7 @@ worker.onmessage= function(event){
646
  opt=document.createElement("option");
647
  opt.textContent=data[2][d];
648
  opt.text=data[2][d];
649
- if(!(data[2][d].startsWith('1.0') ) && !(data[2][d].startsWith('3.2') ) && !(data[2][d].startsWith('2.8') )) //||data[i].startsWith('2.2')))
650
  {
651
  opt.style.color='#bdbcbc';
652
  opt.style.cursor='not-allowed';
@@ -871,7 +871,7 @@ console.log('ayhaga', clone.children[5])
871
  clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('id', 'repeatforloop'+addciconval+'0');
872
  clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('name', 'repeatforloopname'+addciconval+'0');
873
  clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('class', 'repeatforloopclass'+addciconval+'0');
874
- if (thirddropdown.value.startsWith('3.2'))
875
  {
876
 
877
  clone.children[5].children[1].setAttribute('disabled','True')
@@ -956,7 +956,7 @@ console.log('ayhaga', clone.children[5])
956
  optn2.value= "Internal Doors";
957
  inputs1.add(optn2);
958
  }
959
- if (section.value.startsWith('2.8'))
960
  {
961
  var opt = document.createElement("OPTION");
962
  opt.text= 'Select';
@@ -964,6 +964,20 @@ console.log('ayhaga', clone.children[5])
964
  opt.hidden=true;
965
  inputs1.add(opt);
966
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
967
  var optn = document.createElement("OPTION");
968
  optn.text= 'Single Door';
969
  optn.value= "Single Door";
@@ -975,6 +989,7 @@ console.log('ayhaga', clone.children[5])
975
  inputs1.add(optn1);
976
 
977
  }
 
978
  }
979
 
980
 
@@ -1057,7 +1072,7 @@ function getSelectValues(select) {
1057
  .success (function(data){
1058
 
1059
  document.getElementById("all").style.display = "none";
1060
- if (sections.value.startsWith('3.2')){
1061
  document.getElementById('dxfdiv').removeAttribute('hidden');
1062
  document.getElementById('pdftodxfFile').setAttribute('required',true)
1063
  }
@@ -1164,7 +1179,7 @@ function getSelectValues(select) {
1164
  document.getElementById("all").style.display = "block";
1165
 
1166
  pixelArr=[projname.value, projpart.value,projsec.value, pdfname]
1167
- if (projsec.value.startsWith('3.2'))
1168
  downloadPdf(pdfname)
1169
 
1170
  $.get( '/pixelimg/'+JSON.stringify(pixelArr))
@@ -1179,7 +1194,7 @@ function getSelectValues(select) {
1179
  document.getElementById('measureADRbutton').onclick= function()
1180
  {
1181
  if (!areaRatio.value){
1182
- if (!(projsec.value.startsWith('3.2')) & !(projsec.value.startsWith('2.8')))
1183
  areaRatio.style.boxShadow='0 0 8px 2px rgb(255, 0, 0)';
1184
  }
1185
  if (!prmRatio.value)
@@ -1206,7 +1221,7 @@ function getSelectValues(select) {
1206
  areaRatio.style.textAlign='right';
1207
  areaRatio.step=".0000001";
1208
 
1209
- if( projsec.value.startsWith('3.2') || projsec.value.startsWith('2.8') ){
1210
  areaRatio.setAttribute('disabled',true)
1211
  document.getElementById('selectunitA').setAttribute('disabled',true)
1212
  }
@@ -1304,7 +1319,7 @@ function getSelectValues(select) {
1304
  ShowPopUp();
1305
  });
1306
  if (document.getElementById('arealvlinput')){
1307
- if(projsec.value.startsWith('3.2') || (projsec.value.startsWith('2.8') )){
1308
  document.getElementById('arealvlinput').setAttribute('disabled',true)
1309
  document.getElementById('selectunitA').setAttribute('disabled',true)
1310
  }
@@ -1450,7 +1465,7 @@ function getData(form) {
1450
  tomeasureproj=formvalues['measureselectname']; //proj name
1451
 
1452
 
1453
- if( formvalues['selectprojs'].startsWith('3.2')){
1454
  ratio1=1
1455
  ratio2=prminpixels/(formvalues['prmRatio']/ratioPunit);
1456
  console.log(ratio2, prminpixels,formvalues['prmRatio'],ratioPunit)
@@ -1476,7 +1491,7 @@ function getData(form) {
1476
  else{
1477
  console.log('else')
1478
 
1479
- if (formvalues['selectprojs'].startsWith('3.2'))
1480
  {
1481
  console.log('elseif')
1482
  answers.push(tomeasureproj, 0,[], ratio1, ratio2 ,pdfpath);
@@ -1498,7 +1513,7 @@ function getData(form) {
1498
 
1499
  }
1500
 
1501
- if (formvalues['selectprojs'].startsWith('1.0')||formvalues['selectprojs'].startsWith('3.2')||formvalues['selectprojs'].startsWith('2.8'))
1502
  {
1503
  // console.log(formData)
1504
  $.ajax({
@@ -1537,7 +1552,7 @@ function getData(form) {
1537
  document.getElementById("loading").hidden = true;
1538
  document.getElementById("rightside").hidden = false;
1539
  document.getElementById('duplicater').removeAttribute('hidden');
1540
- if (formvalues['selectprojs'].startsWith('3.2'))
1541
  {
1542
  document.getElementById('duplicater').children[8].children[1].setAttribute('disabled','True')
1543
  document.getElementById('duplicater').children[8].children[2].setAttribute('disabled','True')
@@ -1567,7 +1582,7 @@ function getData(form) {
1567
  document.getElementById('measureADRbutton').style.boxShadow='none';
1568
  });
1569
 
1570
- if (formvalues['selectprojs'].startsWith('3.2'))
1571
  { //
1572
  // /* data[0]--> img , SimilarAreaDictionary.to_dict(), spreadsheet_url,spreadsheetId,[],list1.to_dict(),pdflink,hatched_areas,namepathArr]# , spreadsheetId, spreadsheet_url , list1.to_dict()]
1573
 
@@ -1576,7 +1591,10 @@ function getData(form) {
1576
  spreadsheetId=data[3];
1577
  // spreadsheetURL=data[4];
1578
  list1= data[5];
 
1579
  dropboxLink=data[6];
 
 
1580
 
1581
 
1582
  }
@@ -1641,7 +1659,8 @@ function getData(form) {
1641
  let delrows2 = {
1642
  content : {},
1643
  id : {},
1644
- subject :{}
 
1645
  };
1646
 
1647
  var delrows1='';
@@ -1650,7 +1669,7 @@ function getData(form) {
1650
  pdfpath.push(formvalues['selectproj'],formvalues['selectprojp'] ,formvalues['selectprojs'])
1651
  var rightsideids=[];
1652
 
1653
- if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('2.8') )
1654
  {// Set the interval in milliseconds
1655
  const interval = 20000;
1656
  const initialDelay = 0;
@@ -2352,7 +2371,7 @@ window.onclick = elem => {
2352
  $("#"+elem.target.parentElement.id).insertBefore(clone,document.getElementById('doneebackground'));
2353
  }
2354
 
2355
- if (thirddropdown.value.startsWith('3.2'))
2356
  {
2357
  document.getElementById( 'repeatforloop'+ elem.target.parentElement.parentElement.childNodes[1].value[0] +elem.target.parentElement.parentElement.childNodes[1].value[1]).children[1].setAttribute('disabled','True')
2358
  document.getElementById( 'repeatforloop'+ elem.target.parentElement.parentElement.childNodes[1].value[0] +elem.target.parentElement.parentElement.childNodes[1].value[1]).children[2].setAttribute('disabled','True')
@@ -2616,6 +2635,18 @@ function chooseFirstdrpdwn()
2616
  optn2.value= "Internal Doors";
2617
  inputs.add(optn2);
2618
  }
 
 
 
 
 
 
 
 
 
 
 
 
2619
  if (section.value.startsWith('2.8'))
2620
  {
2621
  var opt = document.createElement("OPTION");
@@ -2816,7 +2847,7 @@ function getlegendstoDirectory(){
2816
  newlabelsec.textContent=prjSectionsforLgnd[cc];
2817
  newlabelsec.id='prjsec';
2818
  newlabelsec.className='prjsecclass';
2819
- if (!(newlabelsec.textContent.toString().startsWith('1.0') ) && !(newlabelsec.textContent.toString().startsWith('3.2') ) && !(newlabelsec.textContent.toString().startsWith('2.8') ) )//|| newlabelsec.textContent.startsWith('2.2') || newlabelsec.textContent.startsWith('2.1')))
2820
  {
2821
  newlabelsec.style.color='lightgray';
2822
  i.style.color='lightgray'
@@ -3170,7 +3201,7 @@ function refreshAPIbuutton(dataa){
3170
  opt=document.createElement("option");
3171
  opt.textContent=dataa[2][d];
3172
  opt.text=dataa[2][d];
3173
- if(!(dataa[2][d].startsWith('1.0') ) || (data[i].startsWith('3.2') ) || (data[i].startsWith('2.8') ))//||data[i].startsWith('2.2')))
3174
  {
3175
  opt.style.color='#bdbcbc';
3176
  opt.style.cursor='not-allowed';
 
522
  opt.text=data[i];
523
  thirddropdown.append(opt);
524
 
525
+ if(!(data[i].startsWith('1.0') ) && !(data[i].startsWith('3.2')) && !(data[i].startsWith('2.8')) && !(data[i].startsWith('3.3')) ) // ||data[i].startsWith('2.2')))
526
  {
527
  opt.style.color='#bdbcbc';
528
  opt.style.cursor='not-allowed';
 
646
  opt=document.createElement("option");
647
  opt.textContent=data[2][d];
648
  opt.text=data[2][d];
649
+ if(!(data[2][d].startsWith('1.0') ) && !(data[2][d].startsWith('3.2') ) && !(data[2][d].startsWith('2.8')) && !(data[2][d].startsWith('3.3')) ) //||data[i].startsWith('2.2')))
650
  {
651
  opt.style.color='#bdbcbc';
652
  opt.style.cursor='not-allowed';
 
871
  clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('id', 'repeatforloop'+addciconval+'0');
872
  clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('name', 'repeatforloopname'+addciconval+'0');
873
  clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('class', 'repeatforloopclass'+addciconval+'0');
874
+ if (thirddropdown.value.startsWith('3.2') || thirddropdown.value.startsWith('3.3') )
875
  {
876
 
877
  clone.children[5].children[1].setAttribute('disabled','True')
 
956
  optn2.value= "Internal Doors";
957
  inputs1.add(optn2);
958
  }
959
+ if (section.value.startsWith('3.3'))
960
  {
961
  var opt = document.createElement("OPTION");
962
  opt.text= 'Select';
 
964
  opt.hidden=true;
965
  inputs1.add(opt);
966
 
967
+ var optn = document.createElement("OPTION");
968
+ optn.text= 'Ceiling';
969
+ optn.value= "Ceiling";
970
+ inputs1.add(optn);
971
+
972
+ }
973
+ if (section.value.startsWith('2.8'))
974
+ {
975
+ var opt = document.createElement("OPTION");
976
+ opt.text= 'Select';
977
+ opt.value= "";
978
+ opt.hidden=true;
979
+ inputs1.add(opt);
980
+
981
  var optn = document.createElement("OPTION");
982
  optn.text= 'Single Door';
983
  optn.value= "Single Door";
 
989
  inputs1.add(optn1);
990
 
991
  }
992
+
993
  }
994
 
995
 
 
1072
  .success (function(data){
1073
 
1074
  document.getElementById("all").style.display = "none";
1075
+ if (sections.value.startsWith('3.2') || sections.value.startsWith('3.3') ){
1076
  document.getElementById('dxfdiv').removeAttribute('hidden');
1077
  document.getElementById('pdftodxfFile').setAttribute('required',true)
1078
  }
 
1179
  document.getElementById("all").style.display = "block";
1180
 
1181
  pixelArr=[projname.value, projpart.value,projsec.value, pdfname]
1182
+ if (projsec.value.startsWith('3.2') || projsec.value.startsWith('3.3') )
1183
  downloadPdf(pdfname)
1184
 
1185
  $.get( '/pixelimg/'+JSON.stringify(pixelArr))
 
1194
  document.getElementById('measureADRbutton').onclick= function()
1195
  {
1196
  if (!areaRatio.value){
1197
+ if (!(projsec.value.startsWith('3.2')) & !(projsec.value.startsWith('2.8')) & !(projsec.value.startsWith('3.3')) )
1198
  areaRatio.style.boxShadow='0 0 8px 2px rgb(255, 0, 0)';
1199
  }
1200
  if (!prmRatio.value)
 
1221
  areaRatio.style.textAlign='right';
1222
  areaRatio.step=".0000001";
1223
 
1224
+ if( projsec.value.startsWith('3.2') || projsec.value.startsWith('2.8') || projsec.value.startsWith('3.3') ){
1225
  areaRatio.setAttribute('disabled',true)
1226
  document.getElementById('selectunitA').setAttribute('disabled',true)
1227
  }
 
1319
  ShowPopUp();
1320
  });
1321
  if (document.getElementById('arealvlinput')){
1322
+ if( projsec.value.startsWith('3.2') || projsec.value.startsWith('2.8') || projsec.value.startsWith('3.3') ){
1323
  document.getElementById('arealvlinput').setAttribute('disabled',true)
1324
  document.getElementById('selectunitA').setAttribute('disabled',true)
1325
  }
 
1465
  tomeasureproj=formvalues['measureselectname']; //proj name
1466
 
1467
 
1468
+ if( formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('3.3') ){
1469
  ratio1=1
1470
  ratio2=prminpixels/(formvalues['prmRatio']/ratioPunit);
1471
  console.log(ratio2, prminpixels,formvalues['prmRatio'],ratioPunit)
 
1491
  else{
1492
  console.log('else')
1493
 
1494
+ if ( formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('3.3') )
1495
  {
1496
  console.log('elseif')
1497
  answers.push(tomeasureproj, 0,[], ratio1, ratio2 ,pdfpath);
 
1513
 
1514
  }
1515
 
1516
+ if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('2.8') || formvalues['selectprojs'].startsWith('3.3') )
1517
  {
1518
  // console.log(formData)
1519
  $.ajax({
 
1552
  document.getElementById("loading").hidden = true;
1553
  document.getElementById("rightside").hidden = false;
1554
  document.getElementById('duplicater').removeAttribute('hidden');
1555
+ if (formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('3.3') )
1556
  {
1557
  document.getElementById('duplicater').children[8].children[1].setAttribute('disabled','True')
1558
  document.getElementById('duplicater').children[8].children[2].setAttribute('disabled','True')
 
1582
  document.getElementById('measureADRbutton').style.boxShadow='none';
1583
  });
1584
 
1585
+ if (formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('3.3') )
1586
  { //
1587
  // /* data[0]--> img , SimilarAreaDictionary.to_dict(), spreadsheet_url,spreadsheetId,[],list1.to_dict(),pdflink,hatched_areas,namepathArr]# , spreadsheetId, spreadsheet_url , list1.to_dict()]
1588
 
 
1591
  spreadsheetId=data[3];
1592
  // spreadsheetURL=data[4];
1593
  list1= data[5];
1594
+
1595
  dropboxLink=data[6];
1596
+ // console.log(dropboxLink)
1597
+
1598
 
1599
 
1600
  }
 
1659
  let delrows2 = {
1660
  content : {},
1661
  id : {},
1662
+ subject :{},
1663
+ color:{}
1664
  };
1665
 
1666
  var delrows1='';
 
1669
  pdfpath.push(formvalues['selectproj'],formvalues['selectprojp'] ,formvalues['selectprojs'])
1670
  var rightsideids=[];
1671
 
1672
+ if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('2.8') || formvalues['selectprojs'].startsWith('3.3') )
1673
  {// Set the interval in milliseconds
1674
  const interval = 20000;
1675
  const initialDelay = 0;
 
2371
  $("#"+elem.target.parentElement.id).insertBefore(clone,document.getElementById('doneebackground'));
2372
  }
2373
 
2374
+ if (thirddropdown.value.startsWith('3.2') || thirddropdown.value.startsWith('3.3'))
2375
  {
2376
  document.getElementById( 'repeatforloop'+ elem.target.parentElement.parentElement.childNodes[1].value[0] +elem.target.parentElement.parentElement.childNodes[1].value[1]).children[1].setAttribute('disabled','True')
2377
  document.getElementById( 'repeatforloop'+ elem.target.parentElement.parentElement.childNodes[1].value[0] +elem.target.parentElement.parentElement.childNodes[1].value[1]).children[2].setAttribute('disabled','True')
 
2635
  optn2.value= "Internal Doors";
2636
  inputs.add(optn2);
2637
  }
2638
+ if (section.value.startsWith('3.3'))
2639
+ {
2640
+ var opt = document.createElement("OPTION");
2641
+ opt.text= 'Select';
2642
+ opt.value= "";
2643
+ opt.hidden=true;
2644
+ inputs.add(opt);
2645
+ var optn = document.createElement("OPTION");
2646
+ optn.text= 'Ceiling';
2647
+ optn.value= "Ceiling";
2648
+ inputs.add(optn);
2649
+ }
2650
  if (section.value.startsWith('2.8'))
2651
  {
2652
  var opt = document.createElement("OPTION");
 
2847
  newlabelsec.textContent=prjSectionsforLgnd[cc];
2848
  newlabelsec.id='prjsec';
2849
  newlabelsec.className='prjsecclass';
2850
+ if (!(newlabelsec.textContent.toString().startsWith('1.0') ) && !(newlabelsec.textContent.toString().startsWith('3.2') ) && !(newlabelsec.textContent.toString().startsWith('2.8')) && !(newlabelsec.textContent.toString().startsWith('3.3')) )//|| newlabelsec.textContent.startsWith('2.2') || newlabelsec.textContent.startsWith('2.1')))
2851
  {
2852
  newlabelsec.style.color='lightgray';
2853
  i.style.color='lightgray'
 
3201
  opt=document.createElement("option");
3202
  opt.textContent=dataa[2][d];
3203
  opt.text=dataa[2][d];
3204
+ if(!(dataa[2][d].startsWith('1.0') ) || (data[i].startsWith('3.2') ) || (data[i].startsWith('2.8')) || (data[i].startsWith('3.3')) )//||data[i].startsWith('2.2')))
3205
  {
3206
  opt.style.color='#bdbcbc';
3207
  opt.style.cursor='not-allowed';