Spaces:
Sleeping
Sleeping
Update templates/proposed-GUI.html
Browse files- templates/proposed-GUI.html +49 -11
templates/proposed-GUI.html
CHANGED
|
@@ -700,6 +700,13 @@
|
|
| 700 |
<div class="modal-body">
|
| 701 |
<p id="modal-bodyTextp">The console updates projects retrieved from Dropbox automatically at 9:00 am and 9:00 p.m. If you need to access any projects in between, just click on this button. Please note that it will refresh the files related to the project you chose only.
|
| 702 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 703 |
<div id="duplicaterExtra" hidden="until-found">
|
| 704 |
<div id="repeatforloopExtra" class="repeatforloopclassExtra0" name="repeatforloopExtraname " >
|
| 705 |
<label id="modalColumn">Type</label> <label id="modalGray">(from drawing)</label>
|
|
@@ -1437,6 +1444,7 @@ function removeTab(event, tabId) {
|
|
| 1437 |
}
|
| 1438 |
function downloadPdf(pdfname,downloadPDFName) {
|
| 1439 |
console.log('pdfname===',pdfname)
|
|
|
|
| 1440 |
fetch('/get-pdf/'+JSON.stringify(pdfname))
|
| 1441 |
.then(response => response.blob())
|
| 1442 |
.then(blob => {
|
|
@@ -1451,6 +1459,11 @@ function downloadPdf(pdfname,downloadPDFName) {
|
|
| 1451 |
|
| 1452 |
function downloadPDFfromLink(pdfLinksent, downloadPDFName) {
|
| 1453 |
const encodedURL = encodeURIComponent(pdfLinksent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1454 |
fetch(`/downloadPDFfromLink?url=${encodedURL}`)
|
| 1455 |
.then(response => response.blob())
|
| 1456 |
.then(blob => {
|
|
@@ -1459,6 +1472,22 @@ function downloadPDFfromLink(pdfLinksent, downloadPDFName) {
|
|
| 1459 |
link.href = url;
|
| 1460 |
link.download = downloadPDFName;
|
| 1461 |
link.dispatchEvent(new MouseEvent('click'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1462 |
})
|
| 1463 |
.catch(error => console.error('Error fetching PDF:', error));
|
| 1464 |
}
|
|
@@ -1987,8 +2016,8 @@ var doorSchedulePDF;
|
|
| 1987 |
document.getElementById('progress').textContent = '0%';
|
| 1988 |
document.getElementById("all").style.display = "none";
|
| 1989 |
// Display link or any additional data if needed
|
| 1990 |
-
window.open(data[2]);
|
| 1991 |
-
|
| 1992 |
document.getElementById("all").style.display = "none";
|
| 1993 |
|
| 1994 |
document.getElementById('measureADRbutton').onclick= function()
|
|
@@ -2513,11 +2542,16 @@ function ImgSide(imgdata, spreadsheetLink, pdfLink,pdfname) {
|
|
| 2513 |
downloadPDFfromLink(pdfLink,downloadname)
|
| 2514 |
}
|
| 2515 |
downloadPdfbutton.addEventListener('mouseover', function () {
|
|
|
|
| 2516 |
downloadPdfbutton.style.boxShadow = '0 0 8px 2px rgb(47, 131, 198)';
|
| 2517 |
});
|
|
|
|
|
|
|
| 2518 |
downloadPdfbutton.addEventListener('mouseout', function () {
|
|
|
|
| 2519 |
downloadPdfbutton.style.boxShadow = 'none';
|
| 2520 |
});
|
|
|
|
| 2521 |
////////////////////////////////////////////////////////////
|
| 2522 |
buttonContainer.appendChild(legendbutton);
|
| 2523 |
buttonContainer.appendChild(imgbutton);
|
|
@@ -2658,9 +2692,9 @@ function getData(form) {
|
|
| 2658 |
|
| 2659 |
else if ( formvalues['selectprojs'].startsWith('2.7'))
|
| 2660 |
{
|
| 2661 |
-
|
| 2662 |
-
console.log(
|
| 2663 |
-
answers.push(tomeasureproj, 0,[], ratio1, ratio2 ,pdfpath,groupedValues);
|
| 2664 |
formData.append('file',dxffile)
|
| 2665 |
formData.append('answers',JSON.stringify(answers))
|
| 2666 |
}
|
|
@@ -2698,8 +2732,8 @@ function getData(form) {
|
|
| 2698 |
console.log(response);
|
| 2699 |
},
|
| 2700 |
error: function(err) {
|
| 2701 |
-
|
| 2702 |
-
TopTextModal.textContent=
|
| 2703 |
PopupElement.textContent='Error occured. Refresh and try again. If the error continues, please contact the ADR team to fix it. ';
|
| 2704 |
ShowPopUp();
|
| 2705 |
|
|
@@ -2891,7 +2925,7 @@ if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].sta
|
|
| 2891 |
},
|
| 2892 |
error: function (err) {
|
| 2893 |
console.error('Error occurred during first AJAX call:', err);
|
| 2894 |
-
|
| 2895 |
TopTextModal.textContent='Error'
|
| 2896 |
PopupElement.textContent = 'Error occurred. Refresh and try again. If the error continues, please contact the ADR team to fix it.';
|
| 2897 |
ShowPopUp();
|
|
@@ -2954,7 +2988,7 @@ if (formvalues['selectprojs'].startsWith('1.0') || formvalues['selectprojs'].sta
|
|
| 2954 |
}
|
| 2955 |
|
| 2956 |
} catch (err) {
|
| 2957 |
-
|
| 2958 |
TopTextModal.textContent='Error'
|
| 2959 |
console.error('Error occurred during fetchAndCompareData:', err);
|
| 2960 |
PopupElement.textContent = 'Error occurred. Refresh and try again. If the error continues, please contact the ADR team to fix it.';
|
|
@@ -3029,7 +3063,7 @@ document.getElementById("myForm").addEventListener("submit", function (e) {
|
|
| 3029 |
var measitemVal='';
|
| 3030 |
|
| 3031 |
function get3rddropdown(){
|
| 3032 |
-
|
| 3033 |
// selections=measitem.value.toString() //3rd dpdwn value
|
| 3034 |
var unit;
|
| 3035 |
if (addciconval>0){
|
|
@@ -4180,6 +4214,10 @@ document.getElementById("refreshAPIbutton").onclick = function()
|
|
| 4180 |
document.getElementById("popupforextratext").disabled=false;
|
| 4181 |
document.getElementById("popupforextratext").onclick = function(){
|
| 4182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4183 |
if (sectionNumber.startsWith('2.8') || sectionNumber.startsWith('2.6'))
|
| 4184 |
{
|
| 4185 |
text1extra= document.getElementById("text1extra")
|
|
@@ -4390,7 +4428,7 @@ var groupedValues = [];
|
|
| 4390 |
function getpopuptext() {
|
| 4391 |
groupedValues = [];
|
| 4392 |
// Select all text/number input fields inside the modal
|
| 4393 |
-
const inputs = document.querySelectorAll('
|
| 4394 |
const values = [];
|
| 4395 |
|
| 4396 |
// Collect all input values
|
|
|
|
| 700 |
<div class="modal-body">
|
| 701 |
<p id="modal-bodyTextp">The console updates projects retrieved from Dropbox automatically at 9:00 am and 9:00 p.m. If you need to access any projects in between, just click on this button. Please note that it will refresh the files related to the project you chose only.
|
| 702 |
</p>
|
| 703 |
+
|
| 704 |
+
<div id="Thickness2.7" hidden="until-found">
|
| 705 |
+
<label id="modalColumn">Maximum Thickness of Walls</label>
|
| 706 |
+
<br>
|
| 707 |
+
<input type="number" id="text002extra" name="text003name" placeholder="Eg: 3" min="0">
|
| 708 |
+
</div>
|
| 709 |
+
|
| 710 |
<div id="duplicaterExtra" hidden="until-found">
|
| 711 |
<div id="repeatforloopExtra" class="repeatforloopclassExtra0" name="repeatforloopExtraname " >
|
| 712 |
<label id="modalColumn">Type</label> <label id="modalGray">(from drawing)</label>
|
|
|
|
| 1444 |
}
|
| 1445 |
function downloadPdf(pdfname,downloadPDFName) {
|
| 1446 |
console.log('pdfname===',pdfname)
|
| 1447 |
+
|
| 1448 |
fetch('/get-pdf/'+JSON.stringify(pdfname))
|
| 1449 |
.then(response => response.blob())
|
| 1450 |
.then(blob => {
|
|
|
|
| 1459 |
|
| 1460 |
function downloadPDFfromLink(pdfLinksent, downloadPDFName) {
|
| 1461 |
const encodedURL = encodeURIComponent(pdfLinksent);
|
| 1462 |
+
if (document.getElementById('downloadPdfbutton')){
|
| 1463 |
+
document.getElementById('downloadPdfbutton').setAttribute('disabled',true)
|
| 1464 |
+
document.getElementById('downloadPdfbutton').style.cursor='not-allowed';
|
| 1465 |
+
document.getElementById('downloadPdfbutton').style.backgroundColor='rgba(101, 101, 101, 0.27)'
|
| 1466 |
+
}
|
| 1467 |
fetch(`/downloadPDFfromLink?url=${encodedURL}`)
|
| 1468 |
.then(response => response.blob())
|
| 1469 |
.then(blob => {
|
|
|
|
| 1472 |
link.href = url;
|
| 1473 |
link.download = downloadPDFName;
|
| 1474 |
link.dispatchEvent(new MouseEvent('click'));
|
| 1475 |
+
|
| 1476 |
+
if (document.getElementById('downloadPdfbutton')){
|
| 1477 |
+
document.getElementById('downloadPdfbutton').removeAttribute('disabled');
|
| 1478 |
+
document.getElementById('downloadPdfbutton').style.cursor='pointer';
|
| 1479 |
+
document.getElementById('downloadPdfbutton').style.color = 'white';
|
| 1480 |
+
document.getElementById('downloadPdfbutton').style.backgroundColor="rgb(47, 131, 198)";
|
| 1481 |
+
|
| 1482 |
+
document.getElementById('downloadPdfbutton').addEventListener('mouseover',function(){
|
| 1483 |
+
document.getElementById('downloadPdfbutton').style.color='black';
|
| 1484 |
+
document.getElementById('downloadPdfbutton').style.boxShadow=' 0 0 8px 2px rgb(47, 131, 198)';
|
| 1485 |
+
})
|
| 1486 |
+
document.getElementById('downloadPdfbutton').addEventListener('mouseout',function(){
|
| 1487 |
+
document.getElementById('downloadPdfbutton').style.color='white';
|
| 1488 |
+
document.getElementById('downloadPdfbutton').style.boxShadow='none';
|
| 1489 |
+
});
|
| 1490 |
+
}
|
| 1491 |
})
|
| 1492 |
.catch(error => console.error('Error fetching PDF:', error));
|
| 1493 |
}
|
|
|
|
| 2016 |
document.getElementById('progress').textContent = '0%';
|
| 2017 |
document.getElementById("all").style.display = "none";
|
| 2018 |
// Display link or any additional data if needed
|
| 2019 |
+
//window.open(data[2]);
|
| 2020 |
+
downloadPDFfromLink(data[2],'Pixel_Conversion_File_:'+pdfname)
|
| 2021 |
document.getElementById("all").style.display = "none";
|
| 2022 |
|
| 2023 |
document.getElementById('measureADRbutton').onclick= function()
|
|
|
|
| 2542 |
downloadPDFfromLink(pdfLink,downloadname)
|
| 2543 |
}
|
| 2544 |
downloadPdfbutton.addEventListener('mouseover', function () {
|
| 2545 |
+
document.getElementById('downloadPdfbutton').style.color='black';
|
| 2546 |
downloadPdfbutton.style.boxShadow = '0 0 8px 2px rgb(47, 131, 198)';
|
| 2547 |
});
|
| 2548 |
+
|
| 2549 |
+
|
| 2550 |
downloadPdfbutton.addEventListener('mouseout', function () {
|
| 2551 |
+
document.getElementById('downloadPdfbutton').style.color='white';
|
| 2552 |
downloadPdfbutton.style.boxShadow = 'none';
|
| 2553 |
});
|
| 2554 |
+
|
| 2555 |
////////////////////////////////////////////////////////////
|
| 2556 |
buttonContainer.appendChild(legendbutton);
|
| 2557 |
buttonContainer.appendChild(imgbutton);
|
|
|
|
| 2692 |
|
| 2693 |
else if ( formvalues['selectprojs'].startsWith('2.7'))
|
| 2694 |
{
|
| 2695 |
+
var Thickness= document.getElementById("text002extra").value
|
| 2696 |
+
console.log(Thickness)
|
| 2697 |
+
answers.push(tomeasureproj, 0,[], ratio1, ratio2 ,pdfpath,groupedValues,Thickness);
|
| 2698 |
formData.append('file',dxffile)
|
| 2699 |
formData.append('answers',JSON.stringify(answers))
|
| 2700 |
}
|
|
|
|
| 2732 |
console.log(response);
|
| 2733 |
},
|
| 2734 |
error: function(err) {
|
| 2735 |
+
let TopTextModal = document.getElementById("TopTextModal");
|
| 2736 |
+
TopTextModal.textContent = "Error";
|
| 2737 |
PopupElement.textContent='Error occured. Refresh and try again. If the error continues, please contact the ADR team to fix it. ';
|
| 2738 |
ShowPopUp();
|
| 2739 |
|
|
|
|
| 2925 |
},
|
| 2926 |
error: function (err) {
|
| 2927 |
console.error('Error occurred during first AJAX call:', err);
|
| 2928 |
+
let TopTextModal = document.getElementById("TopTextModal");
|
| 2929 |
TopTextModal.textContent='Error'
|
| 2930 |
PopupElement.textContent = 'Error occurred. Refresh and try again. If the error continues, please contact the ADR team to fix it.';
|
| 2931 |
ShowPopUp();
|
|
|
|
| 2988 |
}
|
| 2989 |
|
| 2990 |
} catch (err) {
|
| 2991 |
+
let TopTextModal = document.getElementById("TopTextModal");
|
| 2992 |
TopTextModal.textContent='Error'
|
| 2993 |
console.error('Error occurred during fetchAndCompareData:', err);
|
| 2994 |
PopupElement.textContent = 'Error occurred. Refresh and try again. If the error continues, please contact the ADR team to fix it.';
|
|
|
|
| 3063 |
var measitemVal='';
|
| 3064 |
|
| 3065 |
function get3rddropdown(){
|
| 3066 |
+
|
| 3067 |
// selections=measitem.value.toString() //3rd dpdwn value
|
| 3068 |
var unit;
|
| 3069 |
if (addciconval>0){
|
|
|
|
| 4214 |
document.getElementById("popupforextratext").disabled=false;
|
| 4215 |
document.getElementById("popupforextratext").onclick = function(){
|
| 4216 |
|
| 4217 |
+
if(sectionNumber.startsWith('2.7') ){
|
| 4218 |
+
document.getElementById("Thickness2.7").removeAttribute("hidden")
|
| 4219 |
+
}
|
| 4220 |
+
|
| 4221 |
if (sectionNumber.startsWith('2.8') || sectionNumber.startsWith('2.6'))
|
| 4222 |
{
|
| 4223 |
text1extra= document.getElementById("text1extra")
|
|
|
|
| 4428 |
function getpopuptext() {
|
| 4429 |
groupedValues = [];
|
| 4430 |
// Select all text/number input fields inside the modal
|
| 4431 |
+
const inputs = document.querySelectorAll('#duplicaterExtra input[type="text"], #duplicaterExtra input[type="number"]');
|
| 4432 |
const values = [];
|
| 4433 |
|
| 4434 |
// Collect all input values
|