diff --git a/remote-server/control-panel b/remote-server/control-panel deleted file mode 120000 index 8a25e87c..00000000 --- a/remote-server/control-panel +++ /dev/null @@ -1 +0,0 @@ -/home/s/projects/raspicam/zanzocam/control-panel \ No newline at end of file diff --git a/remote-server/config/backup/.gitkeep b/remote-server/control-panel/config/backup/.gitkeep similarity index 100% rename from remote-server/config/backup/.gitkeep rename to remote-server/control-panel/config/backup/.gitkeep diff --git a/remote-server/config/configuration.json b/remote-server/control-panel/config/configuration.json similarity index 100% rename from remote-server/config/configuration.json rename to remote-server/control-panel/config/configuration.json diff --git a/remote-server/config/images/.gitkeep b/remote-server/control-panel/config/images/.gitkeep similarity index 100% rename from remote-server/config/images/.gitkeep rename to remote-server/control-panel/config/images/.gitkeep diff --git a/control-panel/fonts/raleway-v18-latin-ext_latin-regular.eot b/remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.eot similarity index 100% rename from control-panel/fonts/raleway-v18-latin-ext_latin-regular.eot rename to remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.eot diff --git a/control-panel/fonts/raleway-v18-latin-ext_latin-regular.svg b/remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.svg similarity index 100% rename from control-panel/fonts/raleway-v18-latin-ext_latin-regular.svg rename to remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.svg diff --git a/control-panel/fonts/raleway-v18-latin-ext_latin-regular.ttf b/remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.ttf similarity index 100% rename from control-panel/fonts/raleway-v18-latin-ext_latin-regular.ttf rename to remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.ttf diff --git a/control-panel/fonts/raleway-v18-latin-ext_latin-regular.woff b/remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.woff similarity index 100% rename from control-panel/fonts/raleway-v18-latin-ext_latin-regular.woff rename to remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.woff diff --git a/control-panel/fonts/raleway-v18-latin-ext_latin-regular.woff2 b/remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.woff2 similarity index 100% rename from control-panel/fonts/raleway-v18-latin-ext_latin-regular.woff2 rename to remote-server/control-panel/fonts/raleway-v18-latin-ext_latin-regular.woff2 diff --git a/control-panel/index.html b/remote-server/control-panel/index.html similarity index 98% rename from control-panel/index.html rename to remote-server/control-panel/index.html index a4b40f32..55f6c35a 100644 --- a/control-panel/index.html +++ b/remote-server/control-panel/index.html @@ -134,17 +134,7 @@ document.getElementById("main-form").style.display="block"; // Get all the form input elements - const { elements } = document.querySelector('form') - - // Check to Niente all the radio boxes for the overlays - //for (const radio of elements){ - // if (radio.type === "radio"){ - // keys = radio.name.split("__"); - // if (keys.length===3 && keys[0]==="overlays" && keys[2]==="type"){ - - // } - // } - //} + const { elements } = document.querySelector('form'); for (const [ key, value ] of Object.entries(data) ) { // Nested objects should be processed recursively @@ -180,12 +170,12 @@ } } // Special processing is needed for the server protocol radio switch - if (prefix == "server__" && key == "protocol"){ + if (prefix === "server__" && key === "protocol"){ toggle_server_protocol(value); } // Special processing is needed for the overlay type radio switch prefixes = prefix.split("__"); - if (prefixes[0] == "overlays" && key == "type"){ + if (prefixes[0] === "overlays" && key === "type"){ toggle_type_of_overlay(prefixes[1], value); } } @@ -394,13 +384,10 @@ // Toggle http or ftp in the server section function toggle_server_protocol(value) { - var http_block = document.getElementById("server_protocol_http-vars"); - var ftp_block = document.getElementById("server_protocol_ftp-vars"); - http_block.style.display = value==="http" ? "block" : "none"; - ftp_block.style.display = value==="ftp" ? "block" : "none"; - document.querySelectorAll('[name^="server__protocol__'+ value +'"]').forEach((item) => { - item.value = ""; - }); + var http_block = document.getElementById("server_protocol_HTTP-vars"); + var ftp_block = document.getElementById("server_protocol_FTP-vars"); + http_block.style.display = value==="HTTP" ? "block" : "none"; + ftp_block.style.display = value==="FTP" ? "block" : "none"; } // Toggle text or image config in the overlays section @@ -409,9 +396,6 @@ var image_block = document.getElementById(position+"_image-vars"); text_block.style.display = value==="text" ? "block" : "none"; image_block.style.display = value==="image" ? "block" : "none"; - document.querySelectorAll('[name^="overlays__'+position+'__'+ value +'"]').forEach((item) => { - item.value = ""; - }); } @@ -457,21 +441,21 @@

Scegli il file di configurazione da modificare:

Server:



-
+
-