Spaces:
Sleeping
Sleeping
Update templates/proposed-GUI.html
Browse files- templates/proposed-GUI.html +145 -142
templates/proposed-GUI.html
CHANGED
|
@@ -295,12 +295,10 @@
|
|
| 295 |
<select id="section-select"
|
| 296 |
onchange="
|
| 297 |
document.getElementById('description-section-1-0').style.display = this.value === 'section-1-0' ? 'block' : 'none';
|
| 298 |
-
document.getElementById('description-section-3-2').style.display = this.value === 'section-3-2' ? 'block' : 'none';
|
| 299 |
-
document.getElementById('description-section-3-3').style.display = this.value === 'section-3-3' ? 'block' : 'none';">
|
| 300 |
<option value="">--Select Section--</option>
|
| 301 |
<option value="section-1-0">Section 1.0</option>
|
| 302 |
<option value="section-3-2">Section 3.2</option>
|
| 303 |
-
<option value="section-3-3">Section 3.3</option>
|
| 304 |
</select>
|
| 305 |
<div id="description-section-1-0" class="description">
|
| 306 |
<label style="font-style: italic;">* Notes for section 1.0 measurement:</label>
|
|
@@ -343,41 +341,6 @@
|
|
| 343 |
</ol>
|
| 344 |
</div>
|
| 345 |
</div>
|
| 346 |
-
<div id="description-section-3-3" class="description">
|
| 347 |
-
<label style="font-style: italic;">* Notes for section 3.3 measurement:</label>
|
| 348 |
-
<p>The algorithm is designed to measure the Ceiling finishes for Ceiling plans by detecting each shape individually and measuring its area and perimeter.</p>
|
| 349 |
-
<label style="font-weight: 200;">Steps to use:</label>
|
| 350 |
-
<div style="margin-left: 20px;">
|
| 351 |
-
<ol>
|
| 352 |
-
<li>Select Section 3.3 from the drop-down list.</li>
|
| 353 |
-
<li>Choose the PDF you wish to measure. A pdf will be downloaded for the next step.</li>
|
| 354 |
-
<li>A pop window will appear in which it contains the pdf drawn on it a big blue shape. Measure its perimeter and input the value in the corresponding cell in the console. Be sure to adjust the unit (e.g., m, cm).</li>
|
| 355 |
-
<li>Open AutoCAD and import the PDF.</li>
|
| 356 |
-
<li>When a pop-up window appears in AutoCAD, ensure the following options are selected:
|
| 357 |
-
<ol class="sub-item">
|
| 358 |
-
<li>PDF Data to Import:
|
| 359 |
-
<ol class="nested-item">
|
| 360 |
-
<li>Vector geometry (Solid Fills)</li>
|
| 361 |
-
<li>TrueType text</li>
|
| 362 |
-
</ol>
|
| 363 |
-
</li>
|
| 364 |
-
<li>Layers:
|
| 365 |
-
<ol class="nested-item">
|
| 366 |
-
<li>Use PDF Layers</li>
|
| 367 |
-
</ol>
|
| 368 |
-
</li>
|
| 369 |
-
<li>Import Options:
|
| 370 |
-
<ol class="nested-item">
|
| 371 |
-
<li>Convert solid fills to hatches</li>
|
| 372 |
-
<li>Apply line weight properties</li>
|
| 373 |
-
</ol>
|
| 374 |
-
</li>
|
| 375 |
-
</ol>
|
| 376 |
-
</li>
|
| 377 |
-
<li>Upload the generated DXF file to the console, input the measured perimeter, and click the green button.</li>
|
| 378 |
-
</ol>
|
| 379 |
-
</div>
|
| 380 |
-
</div>
|
| 381 |
</body>
|
| 382 |
<br>
|
| 383 |
<i id="secondpage" class="fa fa-arrow-right" aria-hidden="true"></i>
|
|
@@ -439,11 +402,9 @@
|
|
| 439 |
<label for="section-select" style="font-style: italic;">Further Output Notes:</label>
|
| 440 |
<select id="section-select"
|
| 441 |
onchange="
|
| 442 |
-
document.getElementById('Output-section-3-2').style.display = this.value === 'section-3-2' ? 'block' : 'none';
|
| 443 |
-
document.getElementById('Output-section-3-3').style.display = this.value === 'section-3-3' ? 'block' : 'none';">
|
| 444 |
<option value="">--Select Section--</option>
|
| 445 |
<option value="section-3-2">Section 3.2</option>
|
| 446 |
-
<option value="section-3-3">Section 3.3</option>
|
| 447 |
</select>
|
| 448 |
<div id="Output-section-3-2" class="description">
|
| 449 |
<label style="font-style: italic;">* Output Notes for section 3.2 measurement:</label>
|
|
@@ -457,31 +418,6 @@
|
|
| 457 |
<li>After setting the scale, all annotations will appear and dynamically update in the measurement column, along with their corresponding labels.</li>
|
| 458 |
<li>This section works correctly only if the PDF was originally created in AutoCAD.</li>
|
| 459 |
<li>Double check the required items in the pop up window in AutoCAD while importing the pdf, if something is missing in it, the markups might appear as X shapes.</li>
|
| 460 |
-
<li>If the perimeter is not an accurate number, the markups may shift.</li>
|
| 461 |
-
<li>Some tiny shapes might be missed during processing.</li>
|
| 462 |
-
<li>The annotation shapes are primarily based on the DXF file's shape.</li>
|
| 463 |
-
<li>The annotations might appear duplicated in a very small percentage of the pdfs</li>
|
| 464 |
-
<li>Thoroughly review the generated markups, as they may include elements outside your measurement scope. For example, parts of the title block may appear as markups. </li>
|
| 465 |
-
</ol>
|
| 466 |
-
</div>
|
| 467 |
-
</div>
|
| 468 |
-
<div id="Output-section-3-3" class="description">
|
| 469 |
-
<label style="font-style: italic;">* Output Notes for section 3.3 measurement:</label>
|
| 470 |
-
<p>Image will appear contains the pdf and its annotations.Below this image, will be the same output buttons as all other sections.If the user wants to download the PDF file and open it in Bluebeam, </p>
|
| 471 |
-
<label style="font-weight: 200;">They need to follow these steps:</label>
|
| 472 |
-
<div style="margin-left: 20px;">
|
| 473 |
-
<ol>
|
| 474 |
-
<li>Download the output PDF file.</li>
|
| 475 |
-
<li>Open the file in Bluebeam.</li>
|
| 476 |
-
<li>Set the scale of the PDF in Bluebeam by navigating to Tools → Measure → Set Scale.</li>
|
| 477 |
-
<li>After setting the scale, all annotations will appear and dynamically update in the measurement column, along with their corresponding labels.</li>
|
| 478 |
-
<li>This section works correctly only if the PDF was originally created in AutoCAD.</li>
|
| 479 |
-
<li>Double check the required items in the pop up window in AutoCAD while importing the pdf, if something is missing in it, the markups might appear as X shapes.</li>
|
| 480 |
-
<li>If the perimeter is not an accurate number, the markups may shift.</li>
|
| 481 |
-
<li>Some tiny shapes might be missed during processing.</li>
|
| 482 |
-
<li>The annotation shapes are primarily based on the DXF file's shape.</li>
|
| 483 |
-
<li>The annotations might appear duplicated in a very small percentage of the pdfs</li>
|
| 484 |
-
<li>Thoroughly review the generated markups, as they may include elements outside your measurement scope. For example, parts of the title block may appear as markups. </li>
|
| 485 |
</ol>
|
| 486 |
</div>
|
| 487 |
</div>
|
|
@@ -681,7 +617,7 @@ function displayprojsections(projectid,Partid){
|
|
| 681 |
opt.text=data[i];
|
| 682 |
thirddropdown.append(opt);
|
| 683 |
|
| 684 |
-
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')))
|
| 685 |
{
|
| 686 |
opt.style.color='#bdbcbc';
|
| 687 |
opt.style.cursor='not-allowed';
|
|
@@ -807,7 +743,7 @@ worker.onmessage= function(event){
|
|
| 807 |
opt=document.createElement("option");
|
| 808 |
opt.textContent=data[2][d];
|
| 809 |
opt.text=data[2][d];
|
| 810 |
-
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')))
|
| 811 |
{
|
| 812 |
opt.style.color='#bdbcbc';
|
| 813 |
opt.style.cursor='not-allowed';
|
|
@@ -1033,7 +969,7 @@ console.log('ayhaga', clone.children[5])
|
|
| 1033 |
clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('id', 'repeatforloop'+addciconval+'0');
|
| 1034 |
clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('name', 'repeatforloopname'+addciconval+'0');
|
| 1035 |
clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('class', 'repeatforloopclass'+addciconval+'0');
|
| 1036 |
-
if (thirddropdown.value.startsWith('3.2') || thirddropdown.value.startsWith('3.3')
|
| 1037 |
{
|
| 1038 |
|
| 1039 |
clone.children[5].children[1].setAttribute('disabled','True')
|
|
@@ -1151,7 +1087,25 @@ console.log('ayhaga', clone.children[5])
|
|
| 1151 |
inputs1.add(optn1);
|
| 1152 |
|
| 1153 |
}
|
| 1154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1155 |
}
|
| 1156 |
|
| 1157 |
|
|
@@ -1333,10 +1287,13 @@ function getSelectValues(select) {
|
|
| 1333 |
// if (!(projsec.value.startsWith('2.8')))
|
| 1334 |
// {
|
| 1335 |
// Show alert immediately to prompt the user
|
| 1336 |
-
if (projsec.value.startsWith('3.2') || projsec.value.startsWith('3.3')
|
| 1337 |
downloadPdf(elem.value);
|
| 1338 |
window.alert("Measure the purple shape drawn on the PDF using Foxit Reader, Bluebeam, or any other external tool, then enter its area and perimeter in your desired scale.");
|
| 1339 |
}
|
|
|
|
|
|
|
|
|
|
| 1340 |
canvasimg='';
|
| 1341 |
ry=[[]];
|
| 1342 |
levelcheckbox.checked=false;
|
|
@@ -1389,11 +1346,11 @@ function getSelectValues(select) {
|
|
| 1389 |
areaRatio.style.textAlign='right';
|
| 1390 |
areaRatio.step=".0000001";
|
| 1391 |
|
| 1392 |
-
if( projsec.value.startsWith('3.2') || projsec.value.startsWith('2.8') || projsec.value.startsWith('3.3') ){
|
| 1393 |
areaRatio.setAttribute('disabled',true)
|
| 1394 |
document.getElementById('selectunitA').setAttribute('disabled',true)
|
| 1395 |
}
|
| 1396 |
-
else{
|
| 1397 |
areaRatio.removeAttribute('disabled')
|
| 1398 |
document.getElementById('selectunitA').removeAttribute('disabled')
|
| 1399 |
}
|
|
@@ -1487,11 +1444,11 @@ function getSelectValues(select) {
|
|
| 1487 |
ShowPopUp();
|
| 1488 |
});
|
| 1489 |
if (document.getElementById('arealvlinput')){
|
| 1490 |
-
if( projsec.value.startsWith('3.2') || projsec.value.startsWith('2.8') || projsec.value.startsWith('3.3') ){
|
| 1491 |
document.getElementById('arealvlinput').setAttribute('disabled',true)
|
| 1492 |
document.getElementById('selectunitA').setAttribute('disabled',true)
|
| 1493 |
}
|
| 1494 |
-
else{
|
| 1495 |
document.getElementById('arealvlinput').removeAttribute('disabled')
|
| 1496 |
document.getElementById('selectunitA').removeAttribute('disabled')
|
| 1497 |
}
|
|
@@ -1733,7 +1690,7 @@ function getData(form) {
|
|
| 1733 |
ratio2=(formvalues['prmRatio']/ratioPunit)/prminpixels;
|
| 1734 |
console.log('ratioss',ratio1,ratio2)
|
| 1735 |
}
|
| 1736 |
-
else if (formvalues['selectprojs'].startsWith('2.8') ){
|
| 1737 |
ratio1=1;
|
| 1738 |
ratio2=(formvalues['prmRatio']/ratioPunit)/prminpixels;
|
| 1739 |
console.log('ratioss',ratio1,ratio2)
|
|
@@ -1764,7 +1721,7 @@ function getData(form) {
|
|
| 1764 |
answers.push(tomeasureproj, 0,[] , ratio1, ratio2 ,pdfpath);
|
| 1765 |
formData.append('answers',JSON.stringify(answers))
|
| 1766 |
}
|
| 1767 |
-
else if (formvalues['selectprojs'].startsWith('2.8'))
|
| 1768 |
{
|
| 1769 |
answers.push(tomeasureproj, 0,[] , ratio1, ratio2 ,pdfpath);
|
| 1770 |
formData.append('answers',JSON.stringify(answers))
|
|
@@ -1772,7 +1729,7 @@ function getData(form) {
|
|
| 1772 |
|
| 1773 |
}
|
| 1774 |
|
| 1775 |
-
if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('2.8') || formvalues['selectprojs'].startsWith('3.3') )
|
| 1776 |
{
|
| 1777 |
// console.log(formData)
|
| 1778 |
$.ajax({
|
|
@@ -1929,7 +1886,7 @@ function getData(form) {
|
|
| 1929 |
var flag=0;
|
| 1930 |
pdfpath=[];
|
| 1931 |
pdfpath.push(formvalues['selectproj'],formvalues['selectprojp'] ,formvalues['selectprojs'])
|
| 1932 |
-
if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('3.3')) {
|
| 1933 |
const interval = 6000; // Interval in milliseconds
|
| 1934 |
let delrows1 = ''; // Initial data storage
|
| 1935 |
let delrows2 = ''; // Updated data storage
|
|
@@ -2041,71 +1998,72 @@ if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].sta
|
|
| 2041 |
});
|
| 2042 |
}
|
| 2043 |
// trial for 2.1 - tameem's code--- delete and deploy in the above if statement
|
| 2044 |
-
|
| 2045 |
-
|
| 2046 |
-
|
| 2047 |
-
|
| 2048 |
-
|
| 2049 |
-
|
| 2050 |
-
|
| 2051 |
-
|
| 2052 |
-
|
| 2053 |
-
|
| 2054 |
-
|
| 2055 |
-
|
| 2056 |
-
|
| 2057 |
-
|
| 2058 |
-
|
| 2059 |
-
|
| 2060 |
-
|
| 2061 |
-
|
| 2062 |
-
|
| 2063 |
-
|
| 2064 |
-
|
| 2065 |
-
|
| 2066 |
-
|
| 2067 |
-
|
| 2068 |
-
|
| 2069 |
-
|
| 2070 |
-
|
| 2071 |
-
|
| 2072 |
-
|
| 2073 |
-
|
| 2074 |
-
|
| 2075 |
-
|
| 2076 |
-
|
| 2077 |
-
|
| 2078 |
-
|
| 2079 |
-
|
| 2080 |
-
|
| 2081 |
-
|
| 2082 |
-
|
| 2083 |
-
|
| 2084 |
-
|
| 2085 |
-
|
| 2086 |
-
|
| 2087 |
-
|
| 2088 |
-
|
| 2089 |
-
var legendbutton= document.createElement("button");
|
| 2090 |
-
legendbutton.className='measureADRbutton2';
|
| 2091 |
-
legendbutton.innerText='Legend and Data created';
|
| 2092 |
-
legendbutton.style.backgroundColor='rgb(5, 43, 235)';
|
| 2093 |
-
legendbutton.addEventListener('mouseover',function(){
|
| 2094 |
-
legendbutton.style.boxShadow='0 0 8px 2px rgb(5, 43, 235)';
|
| 2095 |
-
})
|
| 2096 |
-
legendbutton.addEventListener('mouseout',function(){
|
| 2097 |
-
legendbutton.style.boxShadow='none';
|
| 2098 |
-
})
|
| 2099 |
|
| 2100 |
-
|
| 2101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2102 |
|
| 2103 |
-
|
| 2104 |
-
|
| 2105 |
|
| 2106 |
-
|
|
|
|
|
|
|
| 2107 |
|
| 2108 |
-
}
|
| 2109 |
}
|
| 2110 |
//___________________________________________________________________________________________________________
|
| 2111 |
//___________________________________________________________________________________________________________
|
|
@@ -2136,6 +2094,22 @@ function get3rddropdown(){
|
|
| 2136 |
selections1.innerHTML='';
|
| 2137 |
|
| 2138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2139 |
for (let m=0;m<MCTNames.length;m++)
|
| 2140 |
{
|
| 2141 |
var opt0 = document.createElement("OPTION") ;
|
|
@@ -2276,6 +2250,20 @@ function get3rddropdown(){
|
|
| 2276 |
selections.add(opt0);
|
| 2277 |
}
|
| 2278 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2279 |
}
|
| 2280 |
else if(( (inputs.value=='Floor' ) || (inputs.value=='Wall' ) ) & (!selections.value))//& (selections.value.startsWith('Pile') || !selections.value )) || (inputs.children[0].value=='pile caps' & (selections.value.startsWith('Ground') || !selections.value )))
|
| 2281 |
{
|
|
@@ -2961,7 +2949,22 @@ function chooseFirstdrpdwn()
|
|
| 2961 |
optn1.value= "Double Door";
|
| 2962 |
inputs.add(optn1);
|
| 2963 |
}
|
| 2964 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2965 |
|
| 2966 |
$(inputs).select2({
|
| 2967 |
|
|
@@ -3203,7 +3206,7 @@ function refreshAPIbuutton(dataa){
|
|
| 3203 |
opt=document.createElement("option");
|
| 3204 |
opt.textContent=dataa[2][d];
|
| 3205 |
opt.text=dataa[2][d];
|
| 3206 |
-
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')))
|
| 3207 |
{
|
| 3208 |
opt.style.color='#bdbcbc';
|
| 3209 |
opt.style.cursor='not-allowed';
|
|
|
|
| 295 |
<select id="section-select"
|
| 296 |
onchange="
|
| 297 |
document.getElementById('description-section-1-0').style.display = this.value === 'section-1-0' ? 'block' : 'none';
|
| 298 |
+
document.getElementById('description-section-3-2').style.display = this.value === 'section-3-2' ? 'block' : 'none';">
|
|
|
|
| 299 |
<option value="">--Select Section--</option>
|
| 300 |
<option value="section-1-0">Section 1.0</option>
|
| 301 |
<option value="section-3-2">Section 3.2</option>
|
|
|
|
| 302 |
</select>
|
| 303 |
<div id="description-section-1-0" class="description">
|
| 304 |
<label style="font-style: italic;">* Notes for section 1.0 measurement:</label>
|
|
|
|
| 341 |
</ol>
|
| 342 |
</div>
|
| 343 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 344 |
</body>
|
| 345 |
<br>
|
| 346 |
<i id="secondpage" class="fa fa-arrow-right" aria-hidden="true"></i>
|
|
|
|
| 402 |
<label for="section-select" style="font-style: italic;">Further Output Notes:</label>
|
| 403 |
<select id="section-select"
|
| 404 |
onchange="
|
| 405 |
+
document.getElementById('Output-section-3-2').style.display = this.value === 'section-3-2' ? 'block' : 'none';">
|
|
|
|
| 406 |
<option value="">--Select Section--</option>
|
| 407 |
<option value="section-3-2">Section 3.2</option>
|
|
|
|
| 408 |
</select>
|
| 409 |
<div id="Output-section-3-2" class="description">
|
| 410 |
<label style="font-style: italic;">* Output Notes for section 3.2 measurement:</label>
|
|
|
|
| 418 |
<li>After setting the scale, all annotations will appear and dynamically update in the measurement column, along with their corresponding labels.</li>
|
| 419 |
<li>This section works correctly only if the PDF was originally created in AutoCAD.</li>
|
| 420 |
<li>Double check the required items in the pop up window in AutoCAD while importing the pdf, if something is missing in it, the markups might appear as X shapes.</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
</ol>
|
| 422 |
</div>
|
| 423 |
</div>
|
|
|
|
| 617 |
opt.text=data[i];
|
| 618 |
thirddropdown.append(opt);
|
| 619 |
|
| 620 |
+
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.1')) ) // ||data[i].startsWith('2.2')))
|
| 621 |
{
|
| 622 |
opt.style.color='#bdbcbc';
|
| 623 |
opt.style.cursor='not-allowed';
|
|
|
|
| 743 |
opt=document.createElement("option");
|
| 744 |
opt.textContent=data[2][d];
|
| 745 |
opt.text=data[2][d];
|
| 746 |
+
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[2][d].startsWith('2.1')) ) //||data[i].startsWith('2.2')))
|
| 747 |
{
|
| 748 |
opt.style.color='#bdbcbc';
|
| 749 |
opt.style.cursor='not-allowed';
|
|
|
|
| 969 |
clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('id', 'repeatforloop'+addciconval+'0');
|
| 970 |
clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('name', 'repeatforloopname'+addciconval+'0');
|
| 971 |
clone.getElementsByClassName('repeatforloopclasshidden')[0].setAttribute('class', 'repeatforloopclass'+addciconval+'0');
|
| 972 |
+
if (thirddropdown.value.startsWith('3.2') || thirddropdown.value.startsWith('3.3'))
|
| 973 |
{
|
| 974 |
|
| 975 |
clone.children[5].children[1].setAttribute('disabled','True')
|
|
|
|
| 1087 |
inputs1.add(optn1);
|
| 1088 |
|
| 1089 |
}
|
| 1090 |
+
if (section.value.startsWith('2.1'))
|
| 1091 |
+
{
|
| 1092 |
+
var opt = document.createElement("OPTION");
|
| 1093 |
+
opt.text= 'Select';
|
| 1094 |
+
opt.value= "";
|
| 1095 |
+
opt.hidden=true;
|
| 1096 |
+
inputs1.add(opt);
|
| 1097 |
+
|
| 1098 |
+
var optn = document.createElement("OPTION");
|
| 1099 |
+
optn.text= 'Column';
|
| 1100 |
+
optn.value= "Column";
|
| 1101 |
+
inputs1.add(optn);
|
| 1102 |
+
|
| 1103 |
+
var optn1 = document.createElement("OPTION");
|
| 1104 |
+
optn1.text= 'Wall';
|
| 1105 |
+
optn1.value= "Wall";
|
| 1106 |
+
inputs1.add(optn1);
|
| 1107 |
+
|
| 1108 |
+
}
|
| 1109 |
}
|
| 1110 |
|
| 1111 |
|
|
|
|
| 1287 |
// if (!(projsec.value.startsWith('2.8')))
|
| 1288 |
// {
|
| 1289 |
// Show alert immediately to prompt the user
|
| 1290 |
+
if (projsec.value.startsWith('3.2') || projsec.value.startsWith('3.3') ) {
|
| 1291 |
downloadPdf(elem.value);
|
| 1292 |
window.alert("Measure the purple shape drawn on the PDF using Foxit Reader, Bluebeam, or any other external tool, then enter its area and perimeter in your desired scale.");
|
| 1293 |
}
|
| 1294 |
+
else{
|
| 1295 |
+
window.alert("Measure the purple shape drawn on the PDF using Foxit Reader, Bluebeam, or any other external tool, then enter its area and perimeter in your desired scale.");
|
| 1296 |
+
}
|
| 1297 |
canvasimg='';
|
| 1298 |
ry=[[]];
|
| 1299 |
levelcheckbox.checked=false;
|
|
|
|
| 1346 |
areaRatio.style.textAlign='right';
|
| 1347 |
areaRatio.step=".0000001";
|
| 1348 |
|
| 1349 |
+
if( projsec.value.startsWith('3.2') || projsec.value.startsWith('2.8') || projsec.value.startsWith('3.3') || projsec.value.startsWith('2.1') ){
|
| 1350 |
areaRatio.setAttribute('disabled',true)
|
| 1351 |
document.getElementById('selectunitA').setAttribute('disabled',true)
|
| 1352 |
}
|
| 1353 |
+
else{ // section 1.0
|
| 1354 |
areaRatio.removeAttribute('disabled')
|
| 1355 |
document.getElementById('selectunitA').removeAttribute('disabled')
|
| 1356 |
}
|
|
|
|
| 1444 |
ShowPopUp();
|
| 1445 |
});
|
| 1446 |
if (document.getElementById('arealvlinput')){
|
| 1447 |
+
if( projsec.value.startsWith('3.2') || projsec.value.startsWith('2.8') || projsec.value.startsWith('3.3') || projsec.value.startsWith('2.1') ){
|
| 1448 |
document.getElementById('arealvlinput').setAttribute('disabled',true)
|
| 1449 |
document.getElementById('selectunitA').setAttribute('disabled',true)
|
| 1450 |
}
|
| 1451 |
+
else{ // section 1.0
|
| 1452 |
document.getElementById('arealvlinput').removeAttribute('disabled')
|
| 1453 |
document.getElementById('selectunitA').removeAttribute('disabled')
|
| 1454 |
}
|
|
|
|
| 1690 |
ratio2=(formvalues['prmRatio']/ratioPunit)/prminpixels;
|
| 1691 |
console.log('ratioss',ratio1,ratio2)
|
| 1692 |
}
|
| 1693 |
+
else if (formvalues['selectprojs'].startsWith('2.8') || formvalues['selectprojs'].startsWith('2.1') ){
|
| 1694 |
ratio1=1;
|
| 1695 |
ratio2=(formvalues['prmRatio']/ratioPunit)/prminpixels;
|
| 1696 |
console.log('ratioss',ratio1,ratio2)
|
|
|
|
| 1721 |
answers.push(tomeasureproj, 0,[] , ratio1, ratio2 ,pdfpath);
|
| 1722 |
formData.append('answers',JSON.stringify(answers))
|
| 1723 |
}
|
| 1724 |
+
else if (formvalues['selectprojs'].startsWith('2.8') || formvalues['selectprojs'].startsWith('2.1'))
|
| 1725 |
{
|
| 1726 |
answers.push(tomeasureproj, 0,[] , ratio1, ratio2 ,pdfpath);
|
| 1727 |
formData.append('answers',JSON.stringify(answers))
|
|
|
|
| 1729 |
|
| 1730 |
}
|
| 1731 |
|
| 1732 |
+
if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('2.8') || formvalues['selectprojs'].startsWith('3.3') ) //formvalues['selectprojs'].startsWith('2.1')
|
| 1733 |
{
|
| 1734 |
// console.log(formData)
|
| 1735 |
$.ajax({
|
|
|
|
| 1886 |
var flag=0;
|
| 1887 |
pdfpath=[];
|
| 1888 |
pdfpath.push(formvalues['selectproj'],formvalues['selectprojp'] ,formvalues['selectprojs'])
|
| 1889 |
+
if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].startsWith('3.2') || formvalues['selectprojs'].startsWith('2.8') || formvalues['selectprojs'].startsWith('3.3')) {
|
| 1890 |
const interval = 6000; // Interval in milliseconds
|
| 1891 |
let delrows1 = ''; // Initial data storage
|
| 1892 |
let delrows2 = ''; // Updated data storage
|
|
|
|
| 1998 |
});
|
| 1999 |
}
|
| 2000 |
// trial for 2.1 - tameem's code--- delete and deploy in the above if statement
|
| 2001 |
+
// else{
|
| 2002 |
+
// $.ajax({
|
| 2003 |
+
// type: "POST",
|
| 2004 |
+
// url: "/2.1Trial/",
|
| 2005 |
+
|
| 2006 |
+
// // set content type header to use Flask response.get_json()
|
| 2007 |
+
// contentType: "application/json",
|
| 2008 |
+
|
| 2009 |
+
// // convert data/object to JSON to send
|
| 2010 |
+
// data: JSON.stringify({allvalues:answers}),
|
| 2011 |
+
|
| 2012 |
+
// // expect JSON data in return (e.g. Flask jsonify)
|
| 2013 |
+
// dataType: "json",
|
| 2014 |
+
|
| 2015 |
+
// // handle response
|
| 2016 |
+
// success: function(response) {
|
| 2017 |
+
// console.log(response);
|
| 2018 |
+
// },
|
| 2019 |
+
// error: function(err) {
|
| 2020 |
+
// PopupElement.textContent='Error occured. Refresh and try again. If the error continues, please contact the ADR team to fix it. ';
|
| 2021 |
+
// ShowPopUp();
|
| 2022 |
+
// }
|
| 2023 |
+
// }).done(function(data){
|
| 2024 |
+
// spreadsheetURL=data[0];
|
| 2025 |
+
// var backimg=document.getElementById('backgroundimg');
|
| 2026 |
+
// var rightside=document.getElementById('rightside');
|
| 2027 |
+
// document.getElementById("loading").hidden = true;
|
| 2028 |
+
// document.getElementById('duplicater').removeAttribute('hidden');
|
| 2029 |
+
// document.getElementById('doneebackground').removeAttribute('hidden');
|
| 2030 |
+
// document.getElementById('summarytoXML').removeAttribute('hidden');
|
| 2031 |
+
// document.getElementById('measureADRbutton').removeAttribute('disabled');
|
| 2032 |
+
// document.getElementById('measureADRbutton').style.cursor='pointer';
|
| 2033 |
+
// document.getElementById('measureADRbutton').style.color = 'white';
|
| 2034 |
+
// document.getElementById('measureADRbutton').style.backgroundColor="#16c72e";
|
| 2035 |
+
|
| 2036 |
+
// document.getElementById('measureADRbutton').addEventListener('mouseover',function(){
|
| 2037 |
+
// document.getElementById('measureADRbutton').style.color='black';
|
| 2038 |
+
// document.getElementById('measureADRbutton').style.boxShadow=' 0 0 8px 2px #16c72e';
|
| 2039 |
+
// })
|
| 2040 |
+
|
| 2041 |
+
// document.getElementById('measureADRbutton').addEventListener('mouseout',function(){
|
| 2042 |
+
// document.getElementById('measureADRbutton').style.color='white';
|
| 2043 |
+
// document.getElementById('measureADRbutton').style.boxShadow='none';
|
| 2044 |
+
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2045 |
|
| 2046 |
+
// var legendbutton= document.createElement("button");
|
| 2047 |
+
// legendbutton.className='measureADRbutton2';
|
| 2048 |
+
// legendbutton.innerText='Legend and Data created';
|
| 2049 |
+
// legendbutton.style.backgroundColor='rgb(5, 43, 235)';
|
| 2050 |
+
// legendbutton.addEventListener('mouseover',function(){
|
| 2051 |
+
// legendbutton.style.boxShadow='0 0 8px 2px rgb(5, 43, 235)';
|
| 2052 |
+
// })
|
| 2053 |
+
// legendbutton.addEventListener('mouseout',function(){
|
| 2054 |
+
// legendbutton.style.boxShadow='none';
|
| 2055 |
+
// })
|
| 2056 |
+
|
| 2057 |
+
// legendbutton.addEventListener('click',function(){
|
| 2058 |
+
// window.open( spreadsheetURL);
|
| 2059 |
|
| 2060 |
+
// })
|
| 2061 |
+
// underimg.append(legendbutton);
|
| 2062 |
|
| 2063 |
+
// })
|
| 2064 |
+
|
| 2065 |
+
// }
|
| 2066 |
|
|
|
|
| 2067 |
}
|
| 2068 |
//___________________________________________________________________________________________________________
|
| 2069 |
//___________________________________________________________________________________________________________
|
|
|
|
| 2094 |
selections1.innerHTML='';
|
| 2095 |
|
| 2096 |
|
| 2097 |
+
for (let m=0;m<MCTNames.length;m++)
|
| 2098 |
+
{
|
| 2099 |
+
var opt0 = document.createElement("OPTION") ;
|
| 2100 |
+
opt0.text= MCTNames[m][0];
|
| 2101 |
+
opt0.textContent= MCTNames[m][0];
|
| 2102 |
+
opt0.value= MCTNames[m][0];
|
| 2103 |
+
selections1.add(opt0);
|
| 2104 |
+
}
|
| 2105 |
+
console.log(section.value.toString())
|
| 2106 |
+
|
| 2107 |
+
}
|
| 2108 |
+
else if(( (inputs1.value=='Wall' ) || (inputs1.value=='Column' ) ) & (!selections1.value))//& (selections.value.startsWith('Pile') || !selections.value )) || (inputs.children[0].value=='pile caps' & (selections.value.startsWith('Ground') || !selections.value )))
|
| 2109 |
+
{ //1.0
|
| 2110 |
+
selections1.innerHTML='';
|
| 2111 |
+
|
| 2112 |
+
|
| 2113 |
for (let m=0;m<MCTNames.length;m++)
|
| 2114 |
{
|
| 2115 |
var opt0 = document.createElement("OPTION") ;
|
|
|
|
| 2250 |
selections.add(opt0);
|
| 2251 |
}
|
| 2252 |
|
| 2253 |
+
}
|
| 2254 |
+
if(( (inputs.value=='Wall' ) || (inputs.value=='Column' ) ) & (!selections.value))//& (selections.value.startsWith('Pile') || !selections.value )) || (inputs.children[0].value=='pile caps' & (selections.value.startsWith('Ground') || !selections.value )))
|
| 2255 |
+
{
|
| 2256 |
+
selections.innerHTML='';
|
| 2257 |
+
|
| 2258 |
+
for (let m=0;m<MCTNames.length;m++)
|
| 2259 |
+
{
|
| 2260 |
+
var opt0 = document.createElement("OPTION") ;
|
| 2261 |
+
opt0.text= MCTNames[m][0];
|
| 2262 |
+
opt0.textContent= MCTNames[m][0];
|
| 2263 |
+
opt0.value= MCTNames[m][0];
|
| 2264 |
+
selections.add(opt0);
|
| 2265 |
+
}
|
| 2266 |
+
|
| 2267 |
}
|
| 2268 |
else if(( (inputs.value=='Floor' ) || (inputs.value=='Wall' ) ) & (!selections.value))//& (selections.value.startsWith('Pile') || !selections.value )) || (inputs.children[0].value=='pile caps' & (selections.value.startsWith('Ground') || !selections.value )))
|
| 2269 |
{
|
|
|
|
| 2949 |
optn1.value= "Double Door";
|
| 2950 |
inputs.add(optn1);
|
| 2951 |
}
|
| 2952 |
+
if (section.value.startsWith('2.1'))
|
| 2953 |
+
{
|
| 2954 |
+
var opt = document.createElement("OPTION");
|
| 2955 |
+
opt.text= 'Select';
|
| 2956 |
+
opt.value= "";
|
| 2957 |
+
opt.hidden=true;
|
| 2958 |
+
inputs.add(opt);
|
| 2959 |
+
var optn = document.createElement("OPTION");
|
| 2960 |
+
optn.text= 'Column';
|
| 2961 |
+
optn.value= "Column";
|
| 2962 |
+
inputs.add(optn);
|
| 2963 |
+
var optn1 = document.createElement("OPTION");
|
| 2964 |
+
optn1.text= 'Wall';
|
| 2965 |
+
optn1.value= "Wall";
|
| 2966 |
+
inputs.add(optn1);
|
| 2967 |
+
}
|
| 2968 |
|
| 2969 |
$(inputs).select2({
|
| 2970 |
|
|
|
|
| 3206 |
opt=document.createElement("option");
|
| 3207 |
opt.textContent=dataa[2][d];
|
| 3208 |
opt.text=dataa[2][d];
|
| 3209 |
+
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.1')) )//||data[i].startsWith('2.2')))
|
| 3210 |
{
|
| 3211 |
opt.style.color='#bdbcbc';
|
| 3212 |
opt.style.cursor='not-allowed';
|