Notes persist now

This commit is contained in:
Felix Homa 2023-09-14 23:58:34 +02:00
parent f2119adcef
commit 8b0760bc3d
Signed by: felix.homa
GPG Key ID: 43610F311720D3DA
1 changed files with 13 additions and 1 deletions

View File

@ -212,7 +212,7 @@
var on_load_time = new Date();
console.log(on_load_time.toLocaleString('sv'));
var inputs=["inputExamDuration","inputExtraDuration","inputEarlyCutoff","inputHelpSheet","inputSeatingRowsUsed","inputSeatingRowsFree","inputSeatingSeatsFree","inputExamTitle","inputDarkMode"];
var inputs=["inputExamDuration","inputExtraDuration","inputEarlyCutoff","inputHelpSheet","inputSeatingRowsUsed","inputSeatingRowsFree","inputSeatingSeatsFree","inputExamTitle","inputDarkMode","notes"];
function start_exam() {
document.getElementById("start_btn").onclick=""; // Aktion für den Start-Button deaktivieren
document.getElementById("start_btn").innerHTML=""; // Start-Button entfernen
@ -483,6 +483,18 @@
document.getElementById("inputDarkMode").value=document.getElementById("inputDarkMode").checked;
}
document.getElementById("inputDarkMode").onchange();
document.getElementById("notes").onchange=function() {
var queryString="";
for(var i in inputs) {
queryString+="&"+inputs[i]+"="+encodeURIComponent(document.getElementById(inputs[i]).value);
}
if(document.getElementById("inputExamStart").value!="") {
queryString+="&inputExamStart="+encodeURIComponent(document.getElementById("inputExamStart").value);
}
queryString="?"+queryString.substr(1);
window.history.pushState({},"", queryString);
}
if(("inputExamStart" in get_params)) {
console.log(document.getElementById("fullscreen_btn").style.display="block");
settingsFormSubmitFunc();