Change to html5 (#958)

* Change to html5

with Nu Html Checker

* Update scale-pages.html

* Update sign.html

* Update common.html

* Update common.html

* Update login.html
This commit is contained in:
Ludy
2024-03-21 21:58:01 +01:00
committed by GitHub
parent 77354f47bf
commit 67a1529dc7
87 changed files with 825 additions and 844 deletions

View File

@@ -53,8 +53,8 @@ $(document).ready(function () {
// Display a green banner at the bottom of the screen saying "Download complete"
let downloadCompleteText = "Download Complete";
if(window.downloadCompleteText){
downloadCompleteText = window.downloadCompleteText;
}
downloadCompleteText = window.downloadCompleteText;
}
$("body").append('<div id="download-complete-banner" style="position:fixed;bottom:0;left:0;width:100%;background-color:green;color:white;text-align:center;padding:10px;font-size:16px;z-index:1000;">'+ downloadCompleteText + '</div>');
setTimeout(function() {
$("#download-complete-banner").fadeOut("slow", function() {
@@ -79,8 +79,8 @@ async function handleSingleDownload(url, formData, isMulti = false, isZip = fals
if (!response.ok) {
if (contentType && contentType.includes("application/json")) {
return handleJsonResponse(response);
console.error("Throwing error banner, response was not okay");
return handleJsonResponse(response);
}
throw new Error(`HTTP error! status: ${response.status}`);
}
@@ -177,10 +177,10 @@ async function submitMultiPdfForm(url, files) {
const zipFiles = files.length > zipThreshold;
let jszip = null;
// Show the progress bar
$("#progressBarContainer").show();
$(".progressBarContainer").show();
// Initialize the progress bar
let progressBar = $("#progressBar");
let progressBar = $(".progressBar");
progressBar.css("width", "0%");
progressBar.attr("aria-valuenow", 0);
progressBar.attr("aria-valuemax", files.length);

View File

@@ -70,7 +70,7 @@ function initializeGame() {
handleKeys();
}
function onKeyUp(event) {
keysPressed[event.key] = false;
keysPressed[event.key] = false;
}
document.removeEventListener("keydown", onKeydown);
@@ -123,7 +123,7 @@ function initializeGame() {
function updateGame() {
if (gameOver || paused) return;
handleKeys();
handleKeys();
for (let pdfIndex = 0; pdfIndex < pdfs.length; pdfIndex++) {
const pdf = pdfs[pdfIndex];
const pdfY = parseFloat(pdf.style.top) + pdfSpeed;

View File

@@ -26,7 +26,7 @@ document.addEventListener("DOMContentLoaded", function () {
});
function setLanguageForDropdown(dropdownClass) {
const defaultLocale = document.documentElement.language || "en_GB";
const defaultLocale = document.documentElement.getAttribute("data-language") || "en_GB";
const storedLocale = localStorage.getItem("languageCode") || defaultLocale;
const dropdownItems = document.querySelectorAll(dropdownClass);

View File

@@ -11,7 +11,7 @@ class DragDropManager {
constructor(id, wrapperId) {
this.dragContainer = document.getElementById(id);
this.pageDirection = document.documentElement.getAttribute("lang-direction");
this.pageDirection = document.documentElement.getAttribute("dir");
this.wrapper = document.getElementById(wrapperId);
this.pageDragging = false;
this.hoveredEl = undefined;

View File

@@ -4,7 +4,7 @@ class PdfActionsManager {
constructor(id) {
this.pagesContainer = document.getElementById(id);
this.pageDirection = document.documentElement.getAttribute("lang-direction");
this.pageDirection = document.documentElement.getAttribute("dir");
var styleElement = document.createElement("link");
styleElement.rel = "stylesheet";

View File

@@ -248,20 +248,20 @@ document.getElementById("addOperationBtn").addEventListener("click", function ()
}
listItem.innerHTML = `
<div class="d-flex justify-content-between align-items-center w-100">
<div class="operationName">${selectedOperation}</div>
<div class="arrows d-flex">
<button class="btn btn-secondary move-up ms-1"><span>&uarr;</span></button>
<button class="btn btn-secondary move-down ms-1"><span>&darr;</span></button>
<button class="btn ${hasSettings ? "btn-warning" : "btn-secondary"} pipelineSettings ms-1" ${
<div class="d-flex justify-content-between align-items-center w-100">
<div class="operationName">${selectedOperation}</div>
<div class="arrows d-flex">
<button class="btn btn-secondary move-up ms-1"><span>&uarr;</span></button>
<button class="btn btn-secondary move-down ms-1"><span>&darr;</span></button>
<button class="btn ${hasSettings ? "btn-warning" : "btn-secondary"} pipelineSettings ms-1" ${
hasSettings ? "" : "disabled"
}>
<span style="color: ${hasSettings ? "white" : "grey"};">⚙️</span>
</button>
<button class="btn btn-danger remove ms-1"><span>X</span></button>
</div>
</div>
`;
<span style="color: ${hasSettings ? "white" : "grey"};">⚙️</span>
</button>
<button class="btn btn-danger remove ms-1"><span>X</span></button>
</div>
</div>
`;
pipelineList.appendChild(listItem);
@@ -465,13 +465,13 @@ document.getElementById("addOperationBtn").addEventListener("click", function ()
//pipelineSettingsModal.style.display = "block";
//pipelineSettingsModal.getElementsByClassName("close")[0].onclick = function() {
// pipelineSettingsModal.style.display = "none";
// pipelineSettingsModal.style.display = "none";
//}
//window.onclick = function(event) {
// if (event.target == pipelineSettingsModal) {
// pipelineSettingsModal.style.display = "none";
// }
// if (event.target == pipelineSettingsModal) {
// pipelineSettingsModal.style.display = "none";
// }
//}
}
showpipelineSettingsModal(selectedOperation);