فهرست منبع

added reboot buttons to config pages

George Ruinelli 3 سال پیش
والد
کامیت
592b93ce2b
4فایلهای تغییر یافته به همراه55 افزوده شده و 4 حذف شده
  1. 15 2
      sd-card/html/edit_alignment.html
  2. 14 2
      sd-card/html/edit_analog.html
  3. 12 0
      sd-card/html/edit_digits.html
  4. 14 0
      sd-card/html/edit_reference.html

+ 15 - 2
sd-card/html/edit_alignment.html

@@ -86,7 +86,10 @@ select {
 
 	<table>
 	  <tr>
-		<td colspan="2"><input class="button" type="submit" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini"></td>
+		<td><input class="button" type="submit" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini"></td>
+	  </tr> 
+	  <tr>
+                <td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved config</button></td>
 	  </tr>  
 	</table>
 
@@ -107,7 +110,17 @@ select {
             basepath = "http://192.168.178.26";
             basepath = "",
             param;
-
+    
+function doReboot() {
+    if (confirm("Are you sure you want to reboot? Did you save the config?")) {
+            var stringota = "/reboot";
+            window.location = stringota;
+            window.location.href = stringota;
+            window.location.assign(stringota);
+            window.location.replace(stringota);
+    }
+}
+    
 function ChangeSelection(){
     aktindex = parseInt(document.getElementById("index").value);
     UpdateReference();

+ 14 - 2
sd-card/html/edit_analog.html

@@ -129,6 +129,9 @@ th, td {
 	  <tr>
 		<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini" tabindex=7></td>
 	  </tr>  
+	  <tr>
+                <td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved config</button></td>
+	  </tr>  
     </table>	
 
 
@@ -147,8 +150,17 @@ th, td {
             enhanceCon = false;
             lockAR = true;
             basepath = "http://192.168.178.26";
-
-
+    
+function doReboot() {
+    if (confirm("Are you sure you want to reboot? Did you save the config?")) {
+            var stringota = "/reboot";
+            window.location = stringota;
+            window.location.href = stringota;
+            window.location.assign(stringota);
+            window.location.replace(stringota);
+    }
+}
+    
 function EnDisableAnalog() {
         isEnabled = document.getElementById("Category_Analog_enabled").checked;
 

+ 12 - 0
sd-card/html/edit_digits.html

@@ -119,6 +119,9 @@ th, td {
 	<table>
 	  <tr>
 		<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini" tabindex=7></td>
+	  </tr> 
+	  <tr>
+                <td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved config</button></td>
 	  </tr>  
 	</table>
 
@@ -140,6 +143,15 @@ th, td {
             lockAR = true;
             basepath = "http://192.168.178.26";
 
+    function doReboot() {
+        if (confirm("Are you sure you want to reboot? Did you save the config?")) {
+                var stringota = "/reboot";
+                window.location = stringota;
+                window.location.href = stringota;
+                window.location.assign(stringota);
+                window.location.replace(stringota);
+        }
+    }
 
 function EnDisableDigits() {
         isEnabled = document.getElementById("Category_Digits_enabled").checked;

+ 14 - 0
sd-card/html/edit_reference.html

@@ -35,6 +35,7 @@ table {
 
 <body style="font-family: arial; padding: 0px 10px;">
     <h2>Create Reference out of Raw Image</h2>
+    <p><b>Note: After saving a new Reference Image, make sure to update the Alignment Marks and the ROI's and reboot once!</b></p>
 
 	<table>
 	  <tr>
@@ -85,6 +86,9 @@ table {
 		</tr>			
 		<tr>		
 			<td><input class="button" type="button" id="updatereferenceimage" value="Update Reference Image" onclick="SaveReference()"></td>
+		</tr>		
+		<tr>		
+			<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved Reference</button></td>
 		</tr>
 	</table>
 
@@ -102,6 +106,16 @@ table {
             basepath = "http://192.168.178.26";   
             isActReference = false;
             param;
+            
+        function doReboot() {
+            if (confirm("Are you sure you want to reboot? Did you save the config?")) {
+                    var stringota = "/reboot";
+                    window.location = stringota;
+                    window.location.href = stringota;
+                    window.location.assign(stringota);
+                    window.location.replace(stringota);
+            }
+        }
 
         function doTake(){ 
             var xhttp = new XMLHttpRequest();