Spaces:
Sleeping
Sleeping
Update templates/proposed-GUI.html
Browse files- templates/proposed-GUI.html +30 -6
templates/proposed-GUI.html
CHANGED
|
@@ -2145,7 +2145,7 @@ document.getElementById('pdftodxfFile').addEventListener('input',function(){
|
|
| 2145 |
dxffile=files.files[0];
|
| 2146 |
console.log(dxffile)
|
| 2147 |
});
|
| 2148 |
-
function ImgSide(imgdata, spreadsheetLink, pdfLink) {
|
| 2149 |
var backimg = document.getElementById('backgroundimg');
|
| 2150 |
backimg.innerHTML=''
|
| 2151 |
|
|
@@ -2217,7 +2217,7 @@ function ImgSide(imgdata, spreadsheetLink, pdfLink) {
|
|
| 2217 |
var refreshpdfmarkups = document.createElement("button");
|
| 2218 |
refreshpdfmarkups.className = 'measureADRbutton2';
|
| 2219 |
refreshpdfmarkups.id='refreshpdfmarkups'
|
| 2220 |
-
refreshpdfmarkups.style.backgroundColor = 'rgb(255,
|
| 2221 |
refreshpdfmarkups.style.padding = '10px 20px';
|
| 2222 |
|
| 2223 |
// Create the icon element
|
|
@@ -2229,16 +2229,40 @@ function ImgSide(imgdata, spreadsheetLink, pdfLink) {
|
|
| 2229 |
// refreshpdfmarkups.textContent = ' Refresh';
|
| 2230 |
refreshpdfmarkups.prepend(icon); // Add icon before the text
|
| 2231 |
|
| 2232 |
-
|
| 2233 |
-
refreshpdfmarkups.style.boxShadow = '0 0 8px 2px rgb(255,
|
| 2234 |
});
|
| 2235 |
refreshpdfmarkups.addEventListener('mouseout', function () {
|
| 2236 |
refreshpdfmarkups.style.boxShadow = 'none';
|
| 2237 |
});
|
| 2238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2239 |
////////////////////////////////////////////////////////////
|
| 2240 |
buttonContainer.appendChild(legendbutton);
|
| 2241 |
buttonContainer.appendChild(imgbutton);
|
|
|
|
| 2242 |
buttonContainer.appendChild(refreshpdfmarkups);
|
| 2243 |
|
| 2244 |
|
|
@@ -2253,7 +2277,7 @@ function updatepreview(pdfname){
|
|
| 2253 |
$.get( '/updatepreviewimg/'+ JSON.stringify(pdfname))
|
| 2254 |
.success( function(data) {
|
| 2255 |
document.getElementById("loading").hidden = true;
|
| 2256 |
-
ImgSide(data,spreadsheetURL,dropboxLink)
|
| 2257 |
|
| 2258 |
})
|
| 2259 |
}
|
|
@@ -2540,7 +2564,7 @@ function getData(form) {
|
|
| 2540 |
|
| 2541 |
// if (!(formvalues['selectprojs'].startsWith('2.8')))
|
| 2542 |
// {
|
| 2543 |
-
ImgSide(data[0],spreadsheetURL,dropboxLink)
|
| 2544 |
if (formvalues['selectprojs'].startsWith('2.8') || formvalues['selectprojs'].startsWith('2.6')) {
|
| 2545 |
let messages = [];
|
| 2546 |
if (Repeated_Labels2_8)
|
|
|
|
| 2145 |
dxffile=files.files[0];
|
| 2146 |
console.log(dxffile)
|
| 2147 |
});
|
| 2148 |
+
function ImgSide(imgdata, spreadsheetLink, pdfLink,pdfname) {
|
| 2149 |
var backimg = document.getElementById('backgroundimg');
|
| 2150 |
backimg.innerHTML=''
|
| 2151 |
|
|
|
|
| 2217 |
var refreshpdfmarkups = document.createElement("button");
|
| 2218 |
refreshpdfmarkups.className = 'measureADRbutton2';
|
| 2219 |
refreshpdfmarkups.id='refreshpdfmarkups'
|
| 2220 |
+
refreshpdfmarkups.style.backgroundColor = 'rgb(255, 89, 0)';
|
| 2221 |
refreshpdfmarkups.style.padding = '10px 20px';
|
| 2222 |
|
| 2223 |
// Create the icon element
|
|
|
|
| 2229 |
// refreshpdfmarkups.textContent = ' Refresh';
|
| 2230 |
refreshpdfmarkups.prepend(icon); // Add icon before the text
|
| 2231 |
|
| 2232 |
+
refreshpdfmarkups.addEventListener('mouseover', function () {
|
| 2233 |
+
refreshpdfmarkups.style.boxShadow = '0 0 8px 2px rgb(255, 89, 0)';
|
| 2234 |
});
|
| 2235 |
refreshpdfmarkups.addEventListener('mouseout', function () {
|
| 2236 |
refreshpdfmarkups.style.boxShadow = 'none';
|
| 2237 |
});
|
| 2238 |
|
| 2239 |
+
/////
|
| 2240 |
+
var downloadPdfbutton = document.createElement("button");
|
| 2241 |
+
downloadPdfbutton.className = 'measureADRbutton2';
|
| 2242 |
+
downloadPdfbutton.id='downloadPdfbutton'
|
| 2243 |
+
downloadPdfbutton.style.backgroundColor = 'rgb(47, 131, 198)';
|
| 2244 |
+
downloadPdfbutton.style.padding = '10px 20px';
|
| 2245 |
+
const icon1 = document.createElement('i');
|
| 2246 |
+
icon1.className = 'fa fa-download'; // Add Font Awesome classes
|
| 2247 |
+
icon1.setAttribute('aria-hidden', 'true'); // Add accessibility attribute
|
| 2248 |
+
|
| 2249 |
+
// Set button text and append the icon
|
| 2250 |
+
// refreshpdfmarkups.textContent = ' Refresh';
|
| 2251 |
+
downloadPdfbutton.prepend(icon1); // Add icon before the text
|
| 2252 |
+
downloadPdfbutton.onclick=function(){
|
| 2253 |
+
downloadname='Measured_PDF_'+pdfname;
|
| 2254 |
+
downloadPdf(pdfname,downloadname)
|
| 2255 |
+
}
|
| 2256 |
+
downloadPdfbutton.addEventListener('mouseover', function () {
|
| 2257 |
+
downloadPdfbutton.style.boxShadow = '0 0 8px 2px rgb(47, 131, 198)';
|
| 2258 |
+
});
|
| 2259 |
+
downloadPdfbutton.addEventListener('mouseout', function () {
|
| 2260 |
+
downloadPdfbutton.style.boxShadow = 'none';
|
| 2261 |
+
});
|
| 2262 |
////////////////////////////////////////////////////////////
|
| 2263 |
buttonContainer.appendChild(legendbutton);
|
| 2264 |
buttonContainer.appendChild(imgbutton);
|
| 2265 |
+
buttonContainer.appendChild(downloadPdfbutton);
|
| 2266 |
buttonContainer.appendChild(refreshpdfmarkups);
|
| 2267 |
|
| 2268 |
|
|
|
|
| 2277 |
$.get( '/updatepreviewimg/'+ JSON.stringify(pdfname))
|
| 2278 |
.success( function(data) {
|
| 2279 |
document.getElementById("loading").hidden = true;
|
| 2280 |
+
ImgSide(data,spreadsheetURL,dropboxLink,pdfname)
|
| 2281 |
|
| 2282 |
})
|
| 2283 |
}
|
|
|
|
| 2564 |
|
| 2565 |
// if (!(formvalues['selectprojs'].startsWith('2.8')))
|
| 2566 |
// {
|
| 2567 |
+
ImgSide(data[0],spreadsheetURL,dropboxLink,tomeasureproj)
|
| 2568 |
if (formvalues['selectprojs'].startsWith('2.8') || formvalues['selectprojs'].startsWith('2.6')) {
|
| 2569 |
let messages = [];
|
| 2570 |
if (Repeated_Labels2_8)
|