pari: branch asterisknow r2090 - /branches/asterisknow/config/digital.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Jan 7 17:10:15 CST 2008


Author: pari
Date: Mon Jan  7 17:10:15 2008
New Revision: 2090

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=2090
Log:
Show loadzone in the loadzone select box

Modified:
    branches/asterisknow/config/digital.html

Modified: branches/asterisknow/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/digital.html?view=diff&rev=2090&r1=2089&r2=2090
==============================================================================
--- branches/asterisknow/config/digital.html (original)
+++ branches/asterisknow/config/digital.html Mon Jan  7 17:10:15 2008
@@ -266,6 +266,7 @@
 
 
 function showtable(){ // navigates through the SPANS object and presents as a table to the user
+	try{
 	var tbl = _$('digitalcardstable') ;
 
 	var add_fRow = function(){
@@ -346,9 +347,6 @@
 
 		var newCell0 = newRow.insertCell(0);
 		newCell0.innerHTML = "No Digital Hardware detected !!";
-
-		_$('save_b').disabled = false;
-		_$('cancel_b').disabled = false;
 	}
 
 	if(foo_spans && hwchanged == -1){ // no previous hardware information found - configuring for the first time
@@ -361,6 +359,13 @@
 		}else{ // no hardware changes detected
 			//gui_alert('No Hardware Changes detected !! ');
 		}
+	}
+
+	}catch(err){}
+	finally{
+		_$('save_b').disabled = false;
+		_$('cancel_b').disabled = false;
+		loadConfigFiles.load_zaptel_conf(); // used only for retreiving loadzone
 	}
 }
 
@@ -581,10 +586,30 @@
 			showtable();
 		};
 		config2json("users.conf", 1, usersparse);
-	}
+	},
+
+	load_zaptel_conf: function(){
+		parent.astmanEngine.run_tool('cat /etc/zaptel.conf > /var/lib/asterisk/static-http/config/scan.html' , function(t) {
+			new Ajax.Request("./scan.html", {
+				method : "get",
+				asynchronous : true,
+				onComplete : function(c){
+					try{
+						var lines = c.responseText.split("\n");
+						lines.each(function(line){
+							if(line.contains('loadzone')){
+								var y = (line.split('=')[1]).strip();
+								ASTGUI.selectbox.selectOption( _$('loadZone'), y );
+							}
+						});
+					}catch(err){}
+					return true;
+				},
+				onFailure : function(){	return true; }
+			});
+		});
+	},
 };
-
-
 
 function resetmainscreen(){ top._$('mainscreen').width= 540; }
 




More information about the asterisk-gui-commits mailing list