pari: branch appliance r414 - in /branches/appliance/config: ./ setup/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Mar 12 10:55:40 MST 2007


Author: pari
Date: Mon Mar 12 12:55:40 2007
New Revision: 414

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=414
Log:
On the Appliance - Ask for saving changes to flash , at the end of setup wizard and on logout

Modified:
    branches/appliance/config/homeapp.html
    branches/appliance/config/setup/10.html

Modified: branches/appliance/config/homeapp.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/homeapp.html?view=diff&rev=414&r1=413&r2=414
==============================================================================
--- branches/appliance/config/homeapp.html (original)
+++ branches/appliance/config/homeapp.html Mon Mar 12 12:55:40 2007
@@ -76,21 +76,18 @@
 	}
 	
 	function doSaveConfig() {
-		parent.astmanEngine.run_tool("/bin/save_config");
-		alert("Configuration Saved");
+		parent.astmanEngine.run_tool("/bin/save_config",onSuccess = function() { alert("Configuration Saved"); } );
 	}
 	
 	function doReboot() {
 		if (confirm("Are you sure you want to reboot the appliance?")) {
-			parent.astmanEngine.run_tool("/bin/reboot");
-			alert("Rebooting!");
+			parent.astmanEngine.run_tool("/bin/reboot",onSuccess = function() { alert("Rebooting!"); } );
 		}
 	}
 	
 	function doFactoryDefault() {
 		if (confirm("Are you sure you want to reset to factory defaults?")) {
-			parent.astmanEngine.run_tool("/bin/reset_config");
-			alert("Resetting to defaults.  Please reboot!");
+		parent.astmanEngine.run_tool("/bin/reset_config",onSuccess = function() { alert("Resetting to defaults.  Please reboot!"); } );
 		}
 	}
 	
@@ -144,8 +141,18 @@
 	}
 	
 	function doLogoff() {
+		if (confirm("Do you want to save any changes you made before logout ?")) {
+				parent.astmanEngine.run_tool("/bin/save_config",
+					onSuccess = function() { 
+							alert("Configuration Saved"); 
+							$('statusbar').innerHTML = "<i>Logging off...</i>";
+							parent.astmanEngine.sendRequest('action=logoff', demo.logoffs);
+					}
+				);
+		}else{
 		$('statusbar').innerHTML = "<i>Logging off...</i>";
 		parent.astmanEngine.sendRequest('action=logoff', demo.logoffs);
+		}
 	}
 	function localajaminit() {	
 		parent.astmanEngine.sendRequest('action=ping', demo.pongs);

Modified: branches/appliance/config/setup/10.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/setup/10.html?view=diff&rev=414&r1=413&r2=414
==============================================================================
--- branches/appliance/config/setup/10.html (original)
+++ branches/appliance/config/setup/10.html Mon Mar 12 12:55:40 2007
@@ -40,6 +40,9 @@
 			if ( originalRequest.responseText.match("Pong") ) {
 					// load default numbnerplan settings
 				parent.astmanEngine.pollEvents();
+				if (confirm("Do you want to save these settings ?")) {
+					parent.astmanEngine.run_tool("/bin/save_config",onSuccess = function() { alert("Configuration Saved"); } );
+				}
 			}
 }
 



More information about the asterisk-gui-commits mailing list