diff --git a/sd-card/html/edit_alignment.html b/sd-card/html/edit_alignment.html index 0ba6b387..6445144a 100644 --- a/sd-card/html/edit_alignment.html +++ b/sd-card/html/edit_alignment.html @@ -79,6 +79,18 @@ transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%); } + + #reboot_button { + float: none; + background-color: #f44336; + color: white; + padding: 5px; + border-radius: + 5px; font-weight: bold; + text-align: center; + text-decoration: none; + display: inline-block; + } @@ -188,13 +200,11 @@ param; function doReboot() { - if (confirm("Are you sure you want to reboot? Did you save your changes?")) { - var stringota = domainname + "/reboot"; - window.location = stringota; - window.location.href = stringota; - window.location.assign(stringota); - window.location.replace(stringota); - } + var stringota = domainname + "/reboot"; + window.location = stringota; + window.location.href = stringota; + window.location.assign(stringota); + window.location.replace(stringota); } function ChangeSelection(){ @@ -215,50 +225,45 @@ document.getElementById("overlay").style.display = "block"; document.getElementById("overlaytext").innerHTML = "Save Alignment Marker..."; - if (confirm("Are you sure you want to save the new alignment marker configuration?")) { - function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); - } + function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + } - async function task() { - while (true) { - WriteConfigININew(); - - if (neueref1 == 1 && neueref2 == 1) { - UpdateConfigReferences(domainname); - } - else if (neueref1 == 1) { - var anzneueref = 1; - UpdateConfigReference(anzneueref, domainname); - } - else if (neueref2 == 1) { - var anzneueref = 2; - UpdateConfigReference(anzneueref, domainname); - } - - SaveConfigToServer(domainname); - - document.getElementById("updatemarker").disabled = false; - // document.getElementById("savemarker").disabled = true; - // document.getElementById("enhancecontrast").disabled = true; - - EnDisableItem(false, "savemarker", true); - EnDisableItem(false, "enhancecontrast", true); - - document.getElementById("overlay").style.display = "none"; - firework.launch('Alignment marker saved. They will get applied after next reboot', 'success', 5000); - return; + async function task() { + while (true) { + WriteConfigININew(); + + if (neueref1 == 1 && neueref2 == 1) { + UpdateConfigReferences(domainname); + } + else if (neueref1 == 1) { + var anzneueref = 1; + UpdateConfigReference(anzneueref, domainname); + } + else if (neueref2 == 1) { + var anzneueref = 2; + UpdateConfigReference(anzneueref, domainname); } - } - setTimeout(function () { - // Delay so the overlay gets shown - task(); - }, 1); - } - else { - document.getElementById("overlay").style.display = "none"; + SaveConfigToServer(domainname); + + document.getElementById("updatemarker").disabled = false; + // document.getElementById("savemarker").disabled = true; + // document.getElementById("enhancecontrast").disabled = true; + + EnDisableItem(false, "savemarker", true); + EnDisableItem(false, "enhancecontrast", true); + + document.getElementById("overlay").style.display = "none"; + firework.launch('Alignment marker saved. They will get applied after the next reboot!

\nreboot now', 'success', 5000); + return; + } } + + setTimeout(function () { + // Delay so the overlay gets shown + task(); + }, 1); } function EnhanceContrast() { diff --git a/sd-card/html/edit_analog.html b/sd-card/html/edit_analog.html index 8b713dbb..bc2ab661 100644 --- a/sd-card/html/edit_analog.html +++ b/sd-card/html/edit_analog.html @@ -5,6 +5,20 @@ Analog ROI + + @@ -185,13 +199,11 @@ The following settings are only used for easier setup, they are not persi domainname = getDomainname(); function doReboot() { - if (confirm("Are you sure you want to reboot? Did you save your changes?")) { - var stringota = getDomainname() + "/reboot"; - window.location = stringota; - window.location.href = stringota; - window.location.assign(stringota); - window.location.replace(stringota); - } + var stringota = getDomainname() + "/reboot"; + window.location = stringota; + window.location.href = stringota; + window.location.assign(stringota); + window.location.replace(stringota); } function EnDisableAnalog() { @@ -331,16 +343,14 @@ The following settings are only used for easier setup, they are not persi } function SaveToConfig() { - if (confirm("Are you sure you want to save the new analog ROI configuration?")) { - //_zwcat = getConfigCategory(); - cofcat["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked; - WriteConfigININew(); - SaveConfigToServer(domainname); - UpdateROIs(); - document.getElementById("saveroi").disabled = true; + //_zwcat = getConfigCategory(); + cofcat["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked; + WriteConfigININew(); + SaveConfigToServer(domainname); + UpdateROIs(); + document.getElementById("saveroi").disabled = true; - firework.launch('Configuration saved. It will get applied after next reboot', 'success', 5000); - } + firework.launch('Configuration saved. It will get applied after the next reboot!

\nreboot now', 'success', 5000); } function ShowMultiplier() { diff --git a/sd-card/html/edit_config_raw.html b/sd-card/html/edit_config_raw.html index 803a6d46..91deb2b5 100644 --- a/sd-card/html/edit_config_raw.html +++ b/sd-card/html/edit_config_raw.html @@ -20,6 +20,18 @@ textarea { font-size: 15px; } + + #reboot_button { + float: none; + background-color: #f44336; + color: white; + padding: 5px; + border-radius: + 5px; font-weight: bold; + text-align: center; + text-decoration: none; + display: inline-block; + } @@ -38,15 +50,8 @@ - - - -
- - - -
- +
+ @@ -64,23 +69,19 @@ function saveTextAsFile() { - if (confirm("Are you sure you want to save the configuration?")) { - FileDeleteOnServer("/config/config.ini", domainname); - var textToSave = document.getElementById("inputTextToSave").value; - FileSendContent(textToSave, "/config/config.ini", domainname); + FileDeleteOnServer("/config/config.ini", domainname); + var textToSave = document.getElementById("inputTextToSave").value; + FileSendContent(textToSave, "/config/config.ini", domainname); - firework.launch('Configuration saved. It will get applied after next reboot', 'success', 5000); - } + firework.launch('Configuration saved. It will get applied after the next reboot!

\nreboot now', 'success', 5000); } function doReboot() { - if (confirm("Are you sure you want to reboot?")) { - var stringota = "/reboot"; - window.location = stringota; - window.location.href = stringota; - window.location.assign(stringota); - window.location.replace(stringota); - } + var stringota = "/reboot"; + window.location = stringota; + window.location.href = stringota; + window.location.assign(stringota); + window.location.replace(stringota); } LoadConfigNeu(); diff --git a/sd-card/html/edit_config_template.html b/sd-card/html/edit_config_template.html index 0f7b7b6b..7176c72d 100644 --- a/sd-card/html/edit_config_template.html +++ b/sd-card/html/edit_config_template.html @@ -183,7 +183,19 @@ color: white; transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%); - } + } + + #reboot_button { + float: none; + background-color: #f44336; + color: white; + padding: 5px; + border-radius: + 5px; font-weight: bold; + text-align: center; + text-decoration: none; + display: inline-block; + } @@ -2110,14 +2122,9 @@ - - - -
- - - -
+
+ + @@ -2673,18 +2680,16 @@ function saveTextAsFile() { return; } - if (confirm("Are you sure you want to save the configuration?")) { - ReadParameterAll(); - WriteConfigININew(); - SaveConfigToServer(domainname); + ReadParameterAll(); + WriteConfigININew(); + SaveConfigToServer(domainname); - firework.launch('Configuration saved. It will get applied after the next reboot!', 'success', 5000); + firework.launch('Configuration saved. It will get applied after the next reboot!

\nreboot now', 'success', 5000); - if (changeCamValue == 1) { - camSettingsSet(); - firework.launch('You have changed the camera settings, so creating a new reference image and updating the alignment marks is mandatory!', 'success', 10000); - } - } + if (changeCamValue == 1) { + camSettingsSet(); + firework.launch('You have changed the camera settings, creating a new reference image and updating the alignment marks is mandatory!', 'success', 5000); + } } function camSettingsSet(){ @@ -2875,7 +2880,7 @@ function camSettingsSet(){ if (xhttp.responseText == "CamSettingsSet") { document.getElementById("overlay").style.display = "none"; - firework.launch('Cam Settings saved', 'success', 2000); + firework.launch('Cam Settings saved', 'success', 5000); return; } else { @@ -2903,13 +2908,11 @@ function camSettingsSet(){ } function doReboot() { - if (confirm("Are you sure you want to reboot?")) { - var stringota = domainname + "/reboot"; - window.location = stringota; - window.location.href = stringota; - window.location.assign(stringota); - window.location.replace(stringota); - } + var stringota = domainname + "/reboot"; + window.location = stringota; + window.location.href = stringota; + window.location.assign(stringota); + window.location.replace(stringota); } function FormatDecimalValue(_param, _cat, _name) { diff --git a/sd-card/html/edit_digits.html b/sd-card/html/edit_digits.html index 42d025eb..a4aadbb7 100644 --- a/sd-card/html/edit_digits.html +++ b/sd-card/html/edit_digits.html @@ -4,6 +4,19 @@ Digit ROI + @@ -204,13 +217,11 @@ domainname = getDomainname(); function doReboot() { - if (confirm("Are you sure you want to reboot? Did you save your changes?")) { - var stringota = getDomainname() + "/reboot"; - window.location = stringota; - window.location.href = stringota; - window.location.assign(stringota); - window.location.replace(stringota); - } + var stringota = getDomainname() + "/reboot"; + window.location = stringota; + window.location.href = stringota; + window.location.assign(stringota); + window.location.replace(stringota); } function EnDisableDigits() { @@ -359,16 +370,14 @@ } function SaveToConfig() { - if (confirm("Are you sure you want to save the new digit ROI configuration?")) { - // _zwcat = getConfigCategory(); - cofcat["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked; - WriteConfigININew(); - SaveConfigToServer(domainname); - UpdateROIs(); - document.getElementById("saveroi").disabled = true; + // _zwcat = getConfigCategory(); + cofcat["Digits"]["enabled"] = document.getElementById("Category_Digits_enabled").checked; + WriteConfigININew(); + SaveConfigToServer(domainname); + UpdateROIs(); + document.getElementById("saveroi").disabled = true; - firework.launch('Configuration saved. It will get applied after next reboot', 'success', 5000); - } + firework.launch('Configuration saved. It will get applied after the next reboot!

\nreboot now', 'success', 5000); } function ShowMultiplier() { diff --git a/sd-card/html/edit_reference.html b/sd-card/html/edit_reference.html index 11f7b361..a9ab1b9a 100644 --- a/sd-card/html/edit_reference.html +++ b/sd-card/html/edit_reference.html @@ -395,22 +395,12 @@ diff --git a/sd-card/html/wlan_config.html b/sd-card/html/wlan_config.html index 672c9c54..89fb15e9 100644 --- a/sd-card/html/wlan_config.html +++ b/sd-card/html/wlan_config.html @@ -29,7 +29,7 @@ // var xhttp = new XMLHttpRequest(); // xhttp.onreadystatechange = function() {if (xhttp.readyState == 4) {if (xhttp.status == 200) {document.reload();}}}; if (!file.name.includes("remote-setup")){ - if (!confirm("The zip file name should contain \"...remote-setup...\". Are you sure that you have downloaded the correct file?")) + if (!confirm("The zip file name should contain \"...remote-setup...\". Are you sure you have downloaded the correct file?")) return; } @@ -41,7 +41,7 @@ if (!file.name.includes("remote-setup")){ var file = document.getElementById("newfile").files[0]; if (!file.name.includes("remote-setup")) { - if (!confirm("The zip file name should contain \"...remote-setup...\". Are you sure that you have downloaded the correct file?")) + if (!confirm("The zip file name should contain \"...remote-setup...\". Are you sure you have downloaded the correct file?")) return; }