pari: trunk r310 - /trunk/config/scripts/astman.js

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Jan 31 21:23:17 MST 2007


Author: pari
Date: Wed Jan 31 22:23:16 2007
New Revision: 310

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=310
Log:
New Feature: If the GUI cannot Load a config file, stop going any futher, inform the user about the failure to load the corresponding file and redirect him to the main page 

Modified:
    trunk/config/scripts/astman.js

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=310&r1=309&r2=310
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Wed Jan 31 22:23:16 2007
@@ -1504,6 +1504,13 @@
 			widgets['status'].innerHTML = "";
 	};
 	this.doConfig = function(t, box) {
+		if(t[0].headers['message']){
+			if( t[0].headers['message'] == "Config file not found"){
+				alert( "Asterisk says it cannot find a required config file (" + box.config_file + ") \n You will be now redirected to the main page !" );
+				parent.window.location.href = parent.window.location.href ;
+				return ;
+			}
+		}
 		var x,y=0;
 		var cfg = new Object;
 		var map;



More information about the asterisk-gui-commits mailing list