Marthee commited on
Commit
24da474
·
verified ·
1 Parent(s): f259908

Update templates/proposed-GUI.html

Browse files
Files changed (1) hide show
  1. templates/proposed-GUI.html +226 -147
templates/proposed-GUI.html CHANGED
@@ -513,7 +513,7 @@ function displayprojsections(projectid,Partid){
513
  opt.text=data[i];
514
  thirddropdown.append(opt);
515
 
516
- if(!(data[i].startsWith('1.0') ) && !(data[i].startsWith('3.2'))) // ||data[i].startsWith('2.2')))
517
  {
518
  opt.style.color='#bdbcbc';
519
  opt.style.cursor='not-allowed';
@@ -637,7 +637,7 @@ worker.onmessage= function(event){
637
  opt=document.createElement("option");
638
  opt.textContent=data[2][d];
639
  opt.text=data[2][d];
640
- if(!(data[2][d].startsWith('1.0') ) && !(data[2][d].startsWith('3.2') )) //||data[i].startsWith('2.2')))
641
  {
642
  opt.style.color='#bdbcbc';
643
  opt.style.cursor='not-allowed';
@@ -827,15 +827,11 @@ function downloadPdf(pdfname) {
827
  .then(response => response.blob())
828
  .then(blob => {
829
  const url = URL.createObjectURL(blob);
830
- const a = document.createElement('a');
831
- a.href = url;
832
- a.download = 'downloaded_file.pdf'; // Default filename
833
- document.body.appendChild(a);
834
- a.click();
835
- a.remove();
836
-
837
- console.log('adddxffilehere')
838
- })
839
  .catch(error => console.error('Error fetching PDF:', error));
840
  }
841
 
@@ -949,6 +945,25 @@ function downloadPdf(pdfname) {
949
  optn2.text= 'Internal Doors';
950
  optn2.value= "Internal Doors";
951
  inputs1.add(optn2);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
952
  }
953
  }
954
 
@@ -992,9 +1007,30 @@ projsec.addEventListener('input',function(){
992
 
993
  var ratioAunit=1;
994
  var ratioPunit=1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
995
  //___________________________________________________________________________________________________________
996
  //___________________________________________________________________________________________________________
 
997
  //Retrieves list of projects
 
998
  function getproj(){
999
  getALLMCTNAMES();
1000
 
@@ -1106,138 +1142,145 @@ var ratioPunit=1;
1106
 
1107
  measids.forEach(function(elem) {
1108
  elem.addEventListener("change", function() {
 
 
 
 
 
 
 
1109
 
1110
- canvasimg='';
1111
- ry=[[]];
1112
- levelcheckbox.checked=false;
1113
- pdfname=elem.value;
1114
- measSelect.style.boxShadow='none';
1115
-
1116
-
1117
- document.getElementById("all").style.display = "block";
1118
-
1119
- pixelArr=[projname.value, projpart.value,projsec.value, pdfname]
1120
- if (projsec.value.startsWith('3.2'))
1121
- downloadPdf(pdfname)
1122
-
1123
- $.get( '/pixelimg/'+JSON.stringify(pixelArr))
1124
- .success( function(data) {
1125
- // downloadpdf(pdfname, data1)
1126
- document.getElementById("all").style.display = "none";
1127
- if(window.confirm("Measure the purple shape drawn on the pdf using Foxit Reader, Blueabeam, or any other external tool, then enter its area and perimeter in your desired scale. \n")){
1128
- window.open(data[2]);
1129
- }
1130
- document.getElementById("all").style.display = "none";
1131
-
1132
- document.getElementById('measureADRbutton').onclick= function()
1133
- {
1134
- if (!areaRatio.value){
1135
- if (!(projsec.value.startsWith('3.2')))
1136
- areaRatio.style.boxShadow='0 0 8px 2px rgb(255, 0, 0)';
1137
- }
1138
- if (!prmRatio.value)
1139
- prmRatio.style.boxShadow='0 0 8px 2px rgb(255, 0, 0)';
1140
-
1141
- }
1142
- document.getElementById('radiosColors').removeAttribute('hidden');
1143
- var scalelbl= document.createElement("label");
1144
- scalelbl.innerText='Scale Document';
1145
- scalelbl.id='measureLabel';
1146
- var br1= document.createElement("br");
1147
- var areadiv=document.createElement("div");
1148
- areadiv.id='areadiv'
1149
- var areaRatiolbl= document.createElement("label");
1150
- areaRatiolbl.innerText='Area:'
1151
- areaRatiolbl.id='radiolbl';
1152
-
1153
- var areaRatio= document.createElement("input");
1154
- areaRatio.type='number';
1155
- areaRatio.id='arealvlinput';
1156
- areaRatio.className='lvlinput';
1157
- areaRatio.name='areaRatio';
1158
- areaRatio.style.marginLeft='78px';
1159
- areaRatio.style.textAlign='right';
1160
- areaRatio.step=".0000001";
1161
-
1162
- if( projsec.value.startsWith('3.2')){
1163
- areaRatio.setAttribute('disabled',true)
1164
- document.getElementById('selectunitA').setAttribute('disabled',true)
1165
- }
1166
- else{
1167
- areaRatio.removeAttribute('disabled')
1168
- document.getElementById('selectunitA').removeAttribute('disabled')
1169
- }
1170
- areaRatio.addEventListener('change',function(){
1171
- areaRatio.value=(Number(areaRatio.value)).toFixed(7)
1172
- areaRatio.style.boxShadow='none';
1173
- })
1174
- areaRatio.required=true;
1175
- selectunitA=document.getElementById('selectunitA')
1176
- selectunitA.removeAttribute('hidden')
1177
-
1178
- areadiv.append(areaRatiolbl,areaRatio,selectunitA)
1179
- var br2= document.createElement("br");
1180
- var br3= document.createElement("br");
1181
- var prmdiv=document.createElement("div");
1182
- prmdiv.id='prmdiv'
1183
- var prmRatiolbl= document.createElement("label");
1184
- prmRatiolbl.innerText='Perimeter:'
1185
- prmRatiolbl.id='radiolbl';
1186
-
1187
- var prmRatio= document.createElement("input");
1188
- prmRatio.type='number';
1189
- prmRatio.id='perimlvlinput';
1190
- prmRatio.className='lvlinput';
1191
- prmRatio.name='prmRatio';
1192
- prmRatio.style.textAlign='right';
1193
- // prmRatio.onchange=setNumberDecimal();
1194
- prmRatio.style.marginLeft='49px';
1195
- prmRatio.step=".0000001";
1196
- prmRatio.addEventListener('change',function(){
1197
- prmRatio.value=(Number(prmRatio.value)).toFixed(7)
1198
- prmRatio.style.boxShadow='none';
1199
- })
1200
- prmRatio.required=true;
1201
- selectunitP=document.getElementById('selectunitP')
1202
- selectunitP.removeAttribute('hidden')
1203
-
1204
- prmdiv.append(prmRatiolbl, prmRatio,selectunitP)
1205
- var ratiosdiv= document.getElementById("ratios");
1206
- ratiosdiv.innerHTML='';
1207
- ratiosdiv.append(scalelbl);
1208
- ratiosdiv.append(br1);
1209
- ratiosdiv.append(areadiv)
1210
- ratiosdiv.append(prmdiv)
1211
- areainpixels=data[0];
1212
- prminpixels=data[1];
1213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1214
 
1215
- })
1216
- .error(function(jqXHR, textStatus, errorThrown) {
1217
- PopupElement.textContent='Error occured while uploading the pdf to the Dropbox. Refresh and try again. If the error continues, please contact the ADR team to fix it. ';
1218
- ShowPopUp();
1219
- });
1220
- selectunitA.addEventListener('change',function(){
1221
- value=document.getElementById('selectunitA').value
1222
- if (value=='mm2')
1223
- ratioAunit=1000000;
1224
- else
1225
- ratioAunit=1;
1226
- })
1227
- selectunitP.addEventListener('change',function(){
1228
- value=document.getElementById('selectunitP').value
1229
- if (value=='mm'){
1230
- ratioPunit=1000;
1231
- // if (projsec.value.startsWith('3.2'))
1232
- // ratioPunit=100;
1233
- }
1234
- else
1235
- ratioPunit=1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1236
 
1237
- })
 
 
 
 
1238
  });
1239
 
1240
  });
 
 
1241
  document.getElementById('measureADRbutton').onclick= function()
1242
  {
1243
  if (!measSelect.value)
@@ -1341,7 +1384,7 @@ function getData(form) {
1341
  console.log(ratio2, prminpixels,formvalues['prmRatio'],ratioPunit)
1342
 
1343
  }
1344
- else{
1345
  ratio1=(formvalues['areaRatio']/ratioAunit)/areainpixels;
1346
  ratio2=(formvalues['prmRatio']/ratioPunit)/prminpixels;
1347
  }
@@ -1362,16 +1405,22 @@ function getData(form) {
1362
  formData.append('file',dxffile)
1363
  formData.append('answers',JSON.stringify(answers))
1364
  }
1365
- else
1366
  {
1367
  console.log('why heree')
1368
  file=''
1369
  answers.push(tomeasureproj, 0,[] , ratio1, ratio2 ,pdfpath);
1370
  formData.append('answers',JSON.stringify(answers))
1371
  }
 
 
 
 
 
 
1372
  }
1373
 
1374
- if (formvalues['selectprojs'].startsWith('1.0')||formvalues['selectprojs'].startsWith('3.2'))
1375
  {
1376
  // console.log(formData)
1377
  $.ajax({
@@ -1433,12 +1482,25 @@ function getData(form) {
1433
 
1434
  if (formvalues['selectprojs'].startsWith('3.2'))
1435
  { //
1436
- // /* data[0]--> img , data[1]-->dataframe (goes to legend lsa ) , data [2] -->pdf dropbox shareable link ,data[3]-> spreadsheetId, data[4],spreadsheeturl */
1437
  SimilarAreaDictionary=data[1];
1438
- dropboxLink=data[2];
1439
  spreadsheetId=data[3];
1440
- spreadsheetURL=data[4];
1441
- list1= data[5]
 
 
 
 
 
 
 
 
 
 
 
 
 
1442
 
1443
 
1444
  }
@@ -1462,8 +1524,9 @@ function getData(form) {
1462
  spreadsheetURL=data[0]
1463
 
1464
  }
1465
- else{
1466
- // section 1.0
 
1467
  SimilarAreaDictionary=data[1];
1468
  spreadsheetURL= data[2];
1469
  spreadsheetId= data[3];
@@ -2494,6 +2557,22 @@ function chooseFirstdrpdwn()
2494
  optn1.value= "Wall";
2495
  inputs.add(optn1);
2496
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2497
 
2498
 
2499
  $(inputs).select2({
@@ -2678,7 +2757,7 @@ function getlegendstoDirectory(){
2678
  newlabelsec.textContent=prjSectionsforLgnd[cc];
2679
  newlabelsec.id='prjsec';
2680
  newlabelsec.className='prjsecclass';
2681
- if (!(newlabelsec.textContent.toString().startsWith('1.0') ) && !(newlabelsec.textContent.toString().startsWith('3.2') ) )//|| newlabelsec.textContent.startsWith('2.2') || newlabelsec.textContent.startsWith('2.1')))
2682
  {
2683
  newlabelsec.style.color='lightgray';
2684
  i.style.color='lightgray'
@@ -3032,7 +3111,7 @@ function refreshAPIbuutton(dataa){
3032
  opt=document.createElement("option");
3033
  opt.textContent=dataa[2][d];
3034
  opt.text=dataa[2][d];
3035
- if(!(dataa[2][d].startsWith('1.0') ) || (data[i].startsWith('3.2') ))//||data[i].startsWith('2.2')))
3036
  {
3037
  opt.style.color='#bdbcbc';
3038
  opt.style.cursor='not-allowed';
 
513
  opt.text=data[i];
514
  thirddropdown.append(opt);
515
 
516
+ if(!(data[i].startsWith('1.0') ) && !(data[i].startsWith('3.2')) && !(data[i].startsWith('2.8'))) // ||data[i].startsWith('2.2')))
517
  {
518
  opt.style.color='#bdbcbc';
519
  opt.style.cursor='not-allowed';
 
637
  opt=document.createElement("option");
638
  opt.textContent=data[2][d];
639
  opt.text=data[2][d];
640
+ if(!(data[2][d].startsWith('1.0') ) && !(data[2][d].startsWith('3.2') ) && !(data[2][d].startsWith('2.8') )) //||data[i].startsWith('2.2')))
641
  {
642
  opt.style.color='#bdbcbc';
643
  opt.style.cursor='not-allowed';
 
827
  .then(response => response.blob())
828
  .then(blob => {
829
  const url = URL.createObjectURL(blob);
830
+ var link = document.createElement('a');
831
+ link.href = url;
832
+ link.download = 'file.pdf';
833
+ link.dispatchEvent(new MouseEvent('click'));
834
+ })
 
 
 
 
835
  .catch(error => console.error('Error fetching PDF:', error));
836
  }
837
 
 
945
  optn2.text= 'Internal Doors';
946
  optn2.value= "Internal Doors";
947
  inputs1.add(optn2);
948
+ }
949
+ if (section.value.startsWith('2.8'))
950
+ {
951
+ var opt = document.createElement("OPTION");
952
+ opt.text= 'Select';
953
+ opt.value= "";
954
+ opt.hidden=true;
955
+ inputs1.add(opt);
956
+
957
+ var optn = document.createElement("OPTION");
958
+ optn.text= 'Single Door';
959
+ optn.value= "Single Door";
960
+ inputs1.add(optn);
961
+
962
+ var optn1 = document.createElement("OPTION");
963
+ optn1.text= 'Double Door';
964
+ optn1.value= "Double Door";
965
+ inputs1.add(optn1);
966
+
967
  }
968
  }
969
 
 
1007
 
1008
  var ratioAunit=1;
1009
  var ratioPunit=1;
1010
+ var pdfnames='';
1011
+ //___________________________________________________________________________________________________________
1012
+ //___________________________________________________________________________________________________________
1013
+ function getSelectValues(select) {
1014
+ var result = [];
1015
+ var options = select && select.options;
1016
+ var opt;
1017
+
1018
+ for (var i=0, iLen=options.length; i<iLen; i++) {
1019
+ opt = options[i];
1020
+
1021
+
1022
+ if (opt.selected) {
1023
+ result.push(opt.value || opt.text);
1024
+ }
1025
+ }
1026
+ console.log('selectedddddd',result)
1027
+ return result;
1028
+ }
1029
  //___________________________________________________________________________________________________________
1030
  //___________________________________________________________________________________________________________
1031
+
1032
  //Retrieves list of projects
1033
+
1034
  function getproj(){
1035
  getALLMCTNAMES();
1036
 
 
1142
 
1143
  measids.forEach(function(elem) {
1144
  elem.addEventListener("change", function() {
1145
+ if (!(projsec.value.startsWith('2.8')))
1146
+ {
1147
+ canvasimg='';
1148
+ ry=[[]];
1149
+ levelcheckbox.checked=false;
1150
+ pdfname=elem.value;
1151
+ measSelect.style.boxShadow='none';
1152
 
1153
+
1154
+ document.getElementById("all").style.display = "block";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1155
 
1156
+ pixelArr=[projname.value, projpart.value,projsec.value, pdfname]
1157
+ if (projsec.value.startsWith('3.2'))
1158
+ downloadPdf(pdfname)
1159
+
1160
+ $.get( '/pixelimg/'+JSON.stringify(pixelArr))
1161
+ .success( function(data) {
1162
+ // downloadpdf(pdfname, data1)
1163
+ document.getElementById("all").style.display = "none";
1164
+ if(window.confirm("Measure the purple shape drawn on the pdf using Foxit Reader, Blueabeam, or any other external tool, then enter its area and perimeter in your desired scale. \n")){
1165
+ window.open(data[2]);
1166
+ }
1167
+ document.getElementById("all").style.display = "none";
1168
+
1169
+ document.getElementById('measureADRbutton').onclick= function()
1170
+ {
1171
+ if (!areaRatio.value){
1172
+ if (!(projsec.value.startsWith('3.2')))
1173
+ areaRatio.style.boxShadow='0 0 8px 2px rgb(255, 0, 0)';
1174
+ }
1175
+ if (!prmRatio.value)
1176
+ prmRatio.style.boxShadow='0 0 8px 2px rgb(255, 0, 0)';
1177
 
1178
+ }
1179
+ document.getElementById('radiosColors').removeAttribute('hidden');
1180
+ var scalelbl= document.createElement("label");
1181
+ scalelbl.innerText='Scale Document';
1182
+ scalelbl.id='measureLabel';
1183
+ var br1= document.createElement("br");
1184
+ var areadiv=document.createElement("div");
1185
+ areadiv.id='areadiv'
1186
+ var areaRatiolbl= document.createElement("label");
1187
+ areaRatiolbl.innerText='Area:'
1188
+ areaRatiolbl.id='radiolbl';
1189
+
1190
+ var areaRatio= document.createElement("input");
1191
+ areaRatio.type='number';
1192
+ areaRatio.id='arealvlinput';
1193
+ areaRatio.className='lvlinput';
1194
+ areaRatio.name='areaRatio';
1195
+ areaRatio.style.marginLeft='78px';
1196
+ areaRatio.style.textAlign='right';
1197
+ areaRatio.step=".0000001";
1198
+
1199
+ if( projsec.value.startsWith('3.2')){
1200
+ areaRatio.setAttribute('disabled',true)
1201
+ document.getElementById('selectunitA').setAttribute('disabled',true)
1202
+ }
1203
+ else{
1204
+ areaRatio.removeAttribute('disabled')
1205
+ document.getElementById('selectunitA').removeAttribute('disabled')
1206
+ }
1207
+ areaRatio.addEventListener('change',function(){
1208
+ areaRatio.value=(Number(areaRatio.value)).toFixed(7)
1209
+ areaRatio.style.boxShadow='none';
1210
+ })
1211
+ areaRatio.required=true;
1212
+ selectunitA=document.getElementById('selectunitA')
1213
+ selectunitA.removeAttribute('hidden')
1214
+
1215
+ areadiv.append(areaRatiolbl,areaRatio,selectunitA)
1216
+ var br2= document.createElement("br");
1217
+ var br3= document.createElement("br");
1218
+ var prmdiv=document.createElement("div");
1219
+ prmdiv.id='prmdiv'
1220
+ var prmRatiolbl= document.createElement("label");
1221
+ prmRatiolbl.innerText='Perimeter:'
1222
+ prmRatiolbl.id='radiolbl';
1223
+
1224
+ var prmRatio= document.createElement("input");
1225
+ prmRatio.type='number';
1226
+ prmRatio.id='perimlvlinput';
1227
+ prmRatio.className='lvlinput';
1228
+ prmRatio.name='prmRatio';
1229
+ prmRatio.style.textAlign='right';
1230
+ // prmRatio.onchange=setNumberDecimal();
1231
+ prmRatio.style.marginLeft='49px';
1232
+ prmRatio.step=".0000001";
1233
+ prmRatio.addEventListener('change',function(){
1234
+ prmRatio.value=(Number(prmRatio.value)).toFixed(7)
1235
+ prmRatio.style.boxShadow='none';
1236
+ })
1237
+ prmRatio.required=true;
1238
+ selectunitP=document.getElementById('selectunitP')
1239
+ selectunitP.removeAttribute('hidden')
1240
+
1241
+ prmdiv.append(prmRatiolbl, prmRatio,selectunitP)
1242
+ var ratiosdiv= document.getElementById("ratios");
1243
+ ratiosdiv.innerHTML='';
1244
+ ratiosdiv.append(scalelbl);
1245
+ ratiosdiv.append(br1);
1246
+ ratiosdiv.append(areadiv)
1247
+ ratiosdiv.append(prmdiv)
1248
+ areainpixels=data[0];
1249
+ prminpixels=data[1];
1250
+
1251
+
1252
+ })
1253
+ .error(function(jqXHR, textStatus, errorThrown) {
1254
+ PopupElement.textContent='Error occured while uploading the pdf to the Dropbox. Refresh and try again. If the error continues, please contact the ADR team to fix it. ';
1255
+ ShowPopUp();
1256
+ });
1257
+ selectunitA.addEventListener('change',function(){
1258
+ value=document.getElementById('selectunitA').value
1259
+ if (value=='mm2')
1260
+ ratioAunit=1000000;
1261
+ else
1262
+ ratioAunit=1;
1263
+ })
1264
+ selectunitP.addEventListener('change',function(){
1265
+ value=document.getElementById('selectunitP').value
1266
+ if (value=='mm'){
1267
+ ratioPunit=1000;
1268
+ // if (projsec.value.startsWith('3.2'))
1269
+ // ratioPunit=100;
1270
+ }
1271
+ else
1272
+ ratioPunit=1;
1273
 
1274
+ })
1275
+ }
1276
+ else{
1277
+ pdfnames=getSelectValues(elem)
1278
+ }
1279
  });
1280
 
1281
  });
1282
+
1283
+
1284
  document.getElementById('measureADRbutton').onclick= function()
1285
  {
1286
  if (!measSelect.value)
 
1384
  console.log(ratio2, prminpixels,formvalues['prmRatio'],ratioPunit)
1385
 
1386
  }
1387
+ else if (formvalues['selectprojs'].startsWith('1.0')){
1388
  ratio1=(formvalues['areaRatio']/ratioAunit)/areainpixels;
1389
  ratio2=(formvalues['prmRatio']/ratioPunit)/prminpixels;
1390
  }
 
1405
  formData.append('file',dxffile)
1406
  formData.append('answers',JSON.stringify(answers))
1407
  }
1408
+ else if (formvalues['selectprojs'].startsWith('1.0'))
1409
  {
1410
  console.log('why heree')
1411
  file=''
1412
  answers.push(tomeasureproj, 0,[] , ratio1, ratio2 ,pdfpath);
1413
  formData.append('answers',JSON.stringify(answers))
1414
  }
1415
+ else if (formvalues['selectprojs'].startsWith('2.8'))
1416
+ {
1417
+ answers.push(pdfnames, 0,[] , ratio1, ratio2 ,pdfpath);
1418
+ formData.append('answers',JSON.stringify(answers))
1419
+ }
1420
+
1421
  }
1422
 
1423
+ if (formvalues['selectprojs'].startsWith('1.0')||formvalues['selectprojs'].startsWith('3.2')||formvalues['selectprojs'].startsWith('2.8'))
1424
  {
1425
  // console.log(formData)
1426
  $.ajax({
 
1482
 
1483
  if (formvalues['selectprojs'].startsWith('3.2'))
1484
  { //
1485
+ // /* data[0]--> img , SimilarAreaDictionary.to_dict(), spreadsheet_url,spreadsheetId,[],list1.to_dict(),pdflink,hatched_areas,namepathArr]# , spreadsheetId, spreadsheet_url , list1.to_dict()]
1486
  SimilarAreaDictionary=data[1];
1487
+ spreadsheetURL=data[2];
1488
  spreadsheetId=data[3];
1489
+ // spreadsheetURL=data[4];
1490
+ list1= data[5];
1491
+ dropboxLink=data[6];
1492
+
1493
+
1494
+ }
1495
+ if (formvalues['selectprojs'].startsWith('2.8'))
1496
+ { //
1497
+ // /* data[0]--> img , data[1]-->dataframe (goes to legend lsa ) , data [2] -->pdf dropbox shareable link ,data[3]-> spreadsheetId, data[4],spreadsheeturl */
1498
+ // SimilarAreaDictionary=data[1];
1499
+ console.log('link here')
1500
+ dropboxLink=data[1];
1501
+ // spreadsheetId=data[3];
1502
+ // spreadsheetURL=data[4];
1503
+ // list1= data[5]
1504
 
1505
 
1506
  }
 
1524
  spreadsheetURL=data[0]
1525
 
1526
  }
1527
+ if (formvalues['selectprojs'].startsWith('1.0'))
1528
+ {// section 1.0
1529
+ console.log('?')
1530
  SimilarAreaDictionary=data[1];
1531
  spreadsheetURL= data[2];
1532
  spreadsheetId= data[3];
 
2557
  optn1.value= "Wall";
2558
  inputs.add(optn1);
2559
  }
2560
+ if (section.value.startsWith('2.8'))
2561
+ {
2562
+ var opt = document.createElement("OPTION");
2563
+ opt.text= 'Select';
2564
+ opt.value= "";
2565
+ opt.hidden=true;
2566
+ inputs.add(opt);
2567
+ var optn = document.createElement("OPTION");
2568
+ optn.text= 'Single Door';
2569
+ optn.value= "Single Door";
2570
+ inputs.add(optn);
2571
+ var optn1 = document.createElement("OPTION");
2572
+ optn1.text= 'Double Door';
2573
+ optn1.value= "Double Door";
2574
+ inputs.add(optn1);
2575
+ }
2576
 
2577
 
2578
  $(inputs).select2({
 
2757
  newlabelsec.textContent=prjSectionsforLgnd[cc];
2758
  newlabelsec.id='prjsec';
2759
  newlabelsec.className='prjsecclass';
2760
+ 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')))
2761
  {
2762
  newlabelsec.style.color='lightgray';
2763
  i.style.color='lightgray'
 
3111
  opt=document.createElement("option");
3112
  opt.textContent=dataa[2][d];
3113
  opt.text=dataa[2][d];
3114
+ if(!(dataa[2][d].startsWith('1.0') ) || (data[i].startsWith('3.2') ) || (data[i].startsWith('2.8') ))//||data[i].startsWith('2.2')))
3115
  {
3116
  opt.style.color='#bdbcbc';
3117
  opt.style.cursor='not-allowed';