pari: branch asterisknow r1900 - /branches/asterisknow/config/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Dec 4 17:50:56 CST 2007


Author: pari
Date: Tue Dec  4 17:50:55 2007
New Revision: 1900

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1900
Log:
not having to read zapscan.conf elsewhere

Modified:
    branches/asterisknow/config/incoming.html
    branches/asterisknow/config/ringgroups.html
    branches/asterisknow/config/trunks.html

Modified: branches/asterisknow/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/incoming.html?view=diff&rev=1900&r1=1899&r2=1900
==============================================================================
--- branches/asterisknow/config/incoming.html (original)
+++ branches/asterisknow/config/incoming.html Tue Dec  4 17:50:55 2007
@@ -36,7 +36,7 @@
 
 user_callbacks.format = function(t, x) {
 	var tmp = asterisk_guiTDPrefix + t.name ;
-	if (t.fieldbyname['fxochannels']){ return false; }
+
 	if ( ( t.fieldbyname['context'] == tmp ) && x == undefined ) {
 		didtrunks[tmp] = new Object();
 		didtrunks[tmp].trunkname = t.fieldbyname['trunkname'] ; 

Modified: branches/asterisknow/config/ringgroups.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/ringgroups.html?view=diff&rev=1900&r1=1899&r2=1900
==============================================================================
--- branches/asterisknow/config/ringgroups.html (original)
+++ branches/asterisknow/config/ringgroups.html Tue Dec  4 17:50:55 2007
@@ -322,7 +322,10 @@
 	// so we need to load users.conf and extensions.conf
 	//
 	//config2json('users.conf', 1, get_users) ;
-	config2json('zapscan.conf', 1, read_zapchannels) ;
+	parent.FXO_PORTS_DETECTED.each( function(y) {
+		LISTOFCHANNELS['Zap/' + y] = {};
+		LISTOFCHANNELS['Zap/' + y]['ChannelName'] = 'Analog Phone ' + y;
+	});
 
 	parent.loadscreen(this);
 }
@@ -407,20 +410,10 @@
 
 	clear_table();
 	showlist_of_rules();
-	//config2json('zapscan.conf', 1, read_zapchannels) ;
-}
-
-
-function read_zapchannels(c){
-	for( var d in c ){
-		if ( c.hasOwnProperty(d) && c[d]['port'] && (c[d]['port'] == 'fxo' ) ) {
-			LISTOFCHANNELS['Zap/'+d] = {};
-			LISTOFCHANNELS['Zap/'+d]['ChannelName'] = 'Analog Phone ' + d;
-		}
-	}
-
-	config2json('users.conf', 1, get_users) ;
-}
+}
+
+
+
 
 
 function parse_addtoringgroups(u, v){

Modified: branches/asterisknow/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/trunks.html?view=diff&rev=1900&r1=1899&r2=1900
==============================================================================
--- branches/asterisknow/config/trunks.html (original)
+++ branches/asterisknow/config/trunks.html Tue Dec  4 17:50:55 2007
@@ -23,7 +23,6 @@
 var widgets = {};
 var provwidgets = {};
 var callbacks = new Object;
-var phonecallbacks = new Object;
 var providercallbacks = new Object;
 var globalvars = new Object;
 var fieldnames =[ 'disallow','allow','signalling','callerid','cancel','contact','context','delete','dialformat','fromdomain','fromuser','canreinvite','group','hasexten','hasiax','hassip','host','insecure',
@@ -546,15 +545,7 @@
 
 callbacks.identifier = "extension";
 
-phonecallbacks.format = function(t) {
-	if (t.fieldbyname['port'] == 'fxs')
-		return "Analog Port #" + t.name;
-	return null;
-}
-
-phonecallbacks.loaded = function() {
-	parent.astmanEngine.config2list("providers.conf", _$('provider'), provwidgets, providercallbacks);
-}
+
 
 function update_zapchan(){
 	_$('save').disabled = false;
@@ -663,8 +654,12 @@
 		provwidgets[provfieldnames[x]] = _$(provfieldnames[x]);
 		provwidgets[provfieldnames[x]].disabled = true;
 	}
-	
-	parent.astmanEngine.config2list("zapscan.conf", _$('zapchan'), new Array(), phonecallbacks);
+
+	parent.FXS_PORTS_DETECTED.each( function(y) {
+		ASTGUI.selectbox.append( _$('zapchan'),"Analog Port #" + y , y );
+	});
+	parent.astmanEngine.config2list("providers.conf", _$('provider'), provwidgets, providercallbacks);
+
 }
 
 function showhidefields() {




More information about the asterisk-gui-commits mailing list