Pārlūkot izejas kodu

Restructure menus (#2921)

* renamed config pages
* restructured menu
CaCO3 1 gadu atpakaļ
vecāks
revīzija
d4a0ad20ff

+ 1 - 1
sd-card/html/.gitignore

@@ -1 +1 @@
-edit_config_param.html 
+edit_config.html 

+ 0 - 0
sd-card/html/edit_config.html → sd-card/html/edit_config_raw.html


+ 6 - 6
sd-card/html/edit_config_param_template.html → sd-card/html/edit_config_template.html

@@ -220,7 +220,7 @@
 					<label for="ExpertModus_enabled">Show Expert Parameters</label> 
 			</td>
 			<td>
-				<button style="display:none;" class="button" id="Edit_Config_Direct" onclick="editConfigDirect()">Edit Config file directly</button>
+				<button style="display:none;" class="button" id="Button_Edit_Config_Raw" onclick="editConfigRaw()">Edit Config file in raw mode</button>
 			</td>
 		</tr>
 
@@ -2508,11 +2508,11 @@ function UpdateExpertModus() {
         // _style = '';
         _style_pur = '';
         _hidden = false;
-        document.getElementById("Edit_Config_Direct").style.display = "";
+        document.getElementById("Button_Edit_Config_Raw").style.display = "";
         firework.launch("Expert view activated. Please use carefully", 'warning', 5000);
     }
     else {
-        document.getElementById("Edit_Config_Direct").style.display = "none"; 
+        document.getElementById("Button_Edit_Config_Raw").style.display = "none"; 
     }
 
     const expert = document.querySelectorAll(".expert");
@@ -2568,9 +2568,9 @@ function doReboot() {
 }
 
 
-function editConfigDirect() {
-    if (confirm("Proceed to switch the view? Unsaved changes get lost")) {
-        var stringota = getDomainname() + "/edit_config.html?v=$COMMIT_HASH";
+function editConfigRaw() {
+    if (confirm("Proceed to switch to raw edit mode? Unsaved changes will get lost")) {
+        var stringota = getDomainname() + "/edit_config_raw.html?v=$COMMIT_HASH";
         window.location = stringota;
         window.location.href = stringota;
         window.location.assign(stringota);

+ 6 - 6
sd-card/html/index.html

@@ -24,7 +24,7 @@
                 'channelmode=no,directories=no,fullscreen=no,' +
                 'location=no,dependent=yes,menubar=no,resizable=no,scrollbars=no,' +
                 'status=no,toolbar=no,titlebar=no,' +
-                'left=10,top=250,width=640px,height=480px';
+                'left=10,top=260,width=640px,height=480px';
 
          function loadPage(page) {
             console.log("loadPage( " + page + " )");
@@ -88,21 +88,21 @@
   <ul>
     <li><a href="#" onclick="loadPage('overview.html?v=$COMMIT_HASH');">Overview</a></li>
     <li><a>Settings <i class="arrow down"></i></a>
-      <ul class="submenu">
-        <li><a href="#" onclick="loadPage('prevalue_set.html?v=$COMMIT_HASH');">Set "Previous Value"</a></li>
-        <li><a href="#" onclick="loadPage('edit_config_param.html?v=$COMMIT_HASH');">Configuration</a></li>
-        <li><a>Alignment <i class="arrow right"></i></a>
+      <ul class="submenu" style="width: 260px">
+        <li style="width: 260px"><a href="#" onclick="loadPage('prevalue_set.html?v=$COMMIT_HASH');">Set "Previous Value"</a></li>
+        <li style="width: 260px"><a>Reference <i class="arrow right"></i></a>
             <ul style="width: 350px">
                 <li style="width: 350px"><a href="#" onclick="loadPage('edit_reference.html?v=$COMMIT_HASH');">Reference Image and Camera Settings</a></li>
                 <li style="width: 350px"><a href="#" onclick="loadPage('edit_alignment.html?v=$COMMIT_HASH');">Alignment Markers</a></li>
             </ul>
         </li>
-        <li><a><strong>R</strong>egions <strong>O</strong>f <strong>I</strong>nterest <i class="arrow right"></i></a>
+        <li style="width: 260px"><a>Regions of Interest (ROIs)<i class="arrow right"></i></a>
             <ul>
                 <li><a href="#" onclick="loadPage('edit_digits.html?v=$COMMIT_HASH');">Digit ROI</a></li>
                 <li><a href="#" onclick="loadPage('edit_analog.html?v=$COMMIT_HASH');">Analog ROI</a></li>
             </ul>
         </li>
+        <li style="width: 260px"><a href="#" onclick="loadPage('edit_config.html?v=$COMMIT_HASH');">Configuration</a></li>
       </ul>
 
 

+ 1 - 1
sd-card/html/ota_page.html

@@ -202,7 +202,7 @@
                                 if (action_runtime > 10) { // After 10 seconds, start to check if we are up again
                                     /* Check if the device is up again and forward to index page if so */
                                     fetch('reboot_page.html?v=$COMMIT_HASH&' + Math.random(), {mode: 'no-cors'}).then(
-                                        r=>{parent.location.href=('index.html?v=$COMMIT_HASH');}
+                                        r=>{parent.location.href=('index.html?v=' + Math.random());}
                                     )
                                 }
 

+ 1 - 1
sd-card/html/setup.html

@@ -268,7 +268,7 @@ body, html {
             break;
 
         case 6: // Config page
-            document.getElementById('maincontent').src = 'edit_config_param.html?v=$COMMIT_HASH#description';
+            document.getElementById('maincontent').src = 'edit_config.html?v=$COMMIT_HASH#description';
 
             document.getElementById('h_iframe_explain').style.display = "";
             document.getElementById('h_iframe_explain').style="height:100px;"

+ 2 - 2
tools/parameter-tooltip-generator/generate-param-doc-tooltips.py

@@ -8,8 +8,8 @@ import markdown
 
 parameterDocsFolder = "../../param-docs/parameter-pages"
 docsMainFolder = "../../sd-card/html"
-configPageTemplate = "edit_config_param_template.html"
-configPage = "edit_config_param.html"
+configPageTemplate = "edit_config_template.html"
+configPage = "edit_config.html"
 refImagePage = "edit_reference.html"
 
 htmlTooltipPrefix = """