rbrindley: branch 2.0 r4695 - /branches/2.0/config/js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Apr 1 15:02:53 CDT 2009


Author: rbrindley
Date: Wed Apr  1 15:02:50 2009
New Revision: 4695

URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4695
Log:

- missed a few astgui_manage* calls in the trunks sub pages
- these now use pbx.trunks and pbx.users


Modified:
    branches/2.0/config/js/trunks_analog.js
    branches/2.0/config/js/trunks_providers.js
    branches/2.0/config/js/trunks_voip.js

Modified: branches/2.0/config/js/trunks_analog.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/trunks_analog.js?view=diff&rev=4695&r1=4694&r2=4695
==============================================================================
--- branches/2.0/config/js/trunks_analog.js (original)
+++ branches/2.0/config/js/trunks_analog.js Wed Apr  1 15:02:50 2009
@@ -42,7 +42,7 @@
 var disable_usedChannels = function(trunk){ // trunk is (optional, used while editing a trunk, for new trunk leave blank)
 	// FXOS -- list of all Analog channels
 	var used = [];
-	var c = parent.astgui_managetrunks.listOfAnalogTrunks();
+	var c = parent.pbx.trunks.list({analog: true});
 	c.each(function(item){
 		if(trunk && trunk == item ) return;
 		used = used.concat( ASTGUI.miscFunctions.chanStringToArray(parent.sessionData.pbxinfo['trunks']['analog'][item][DAHDICHANNELSTRING]) ) ;
@@ -156,7 +156,7 @@
 			tmp_object[fld] = ASTGUI.getFieldValue( _$(fld) );
 		});
 
-		parent.astgui_managetrunks.addAnalogTrunk( tmp_object , cbf ) ;
+		parent.pbx.trunks.add('analog', tmp_object , cbf ) ;
 		return;
 	}
 
@@ -209,7 +209,7 @@
 		newRow.appendChild(ntd);
 		DOM_new_agtrnk_button.style.display = 'none';
 
-		var c = parent.astgui_managetrunks.listOfAnalogTrunks();
+		var c = parent.pbx.trunks.list({analog: true});
 		if(!c.length){return;}
 	}
 
@@ -222,7 +222,7 @@
 	})();
 
 	(function (){
-		var c = parent.astgui_managetrunks.listOfAnalogTrunks();
+		var c = parent.pbx.trunks.list({analog: true});
 		c.each( function(item){
 			 tmp = "<span class='guiButton' onclick=\"selectedTrunk_editOptions_form('" + item +"')\">Edit</span>" + 
 				"<span class='guiButtonDelete' onclick=\"delete_trunk_confirm('" + item +"')\">Delete</span>" ;
@@ -247,7 +247,7 @@
 
 	var trunk_name = parent.sessionData.pbxinfo['trunks']['analog'][EDIT_TRUNK].getProperty('trunkname') || EDIT_TRUNK ;
 	if(!confirm("Delete trunk '"+ trunk_name + "' ?")) { return true; }
-	if( parent.astgui_managetrunks.deletetrunk(EDIT_TRUNK) ){ 
+	if( parent.pbx.trunks.remove(EDIT_TRUNK) ){ 
 		ASTGUI.feedback({msg:'Deleted Analog trunk ' + "'" + trunk_name + "'" , showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
 		window.location.reload();
 	};
@@ -274,7 +274,7 @@
 		}
 		ASTGUI.tabbedOptions( _$('tabbedMenu') , t);
 
-		var y = parent.astgui_manageusers.listOfUsers();
+		var y = parent.pbx.users.list();
 		y.each( function(user){
 			if( parent.sessionData.pbxinfo.users[user].getProperty('hasvoicemail').isAstTrue() ){
 				ASTGUI.selectbox.append('mailbox', user, user);

Modified: branches/2.0/config/js/trunks_providers.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/trunks_providers.js?view=diff&rev=4695&r1=4694&r2=4695
==============================================================================
--- branches/2.0/config/js/trunks_providers.js (original)
+++ branches/2.0/config/js/trunks_providers.js Wed Apr  1 15:02:50 2009
@@ -107,7 +107,7 @@
 
 	delete_ProviderForm : function(e){ // providers_MiscFunctions.delete_ProviderForm(e);
 		if( !confirm('Are you sure you want to delete this Service Provider trunk ?') ){ return; }
-		if( parent.astgui_managetrunks.deletetrunk(e) ){ window.location.reload(); };
+		if( parent.pbx.trunks.remove(e) ){ window.location.reload(); };
 	},
 	
 	updateProvider : function(){
@@ -162,7 +162,7 @@
 		}
 
 		if( !trunkname ){
-			trunkname = parent.astgui_managetrunks.misc.nextAvailableTrunk_x() ;
+			trunkname = parent.pbx.trunks.nextAvailTrunk() ;
 		}
 		var ct = ASTGUI.contexts.TrunkDIDPrefix + trunkname ;
 

Modified: branches/2.0/config/js/trunks_voip.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/trunks_voip.js?view=diff&rev=4695&r1=4694&r2=4695
==============================================================================
--- branches/2.0/config/js/trunks_voip.js (original)
+++ branches/2.0/config/js/trunks_voip.js Wed Apr  1 15:02:50 2009
@@ -76,7 +76,7 @@
 	} else {
 		$('#TR_trunktype').hide();
 		$('#TR_contextbasis').hide();
-		var ttype = parent.astgui_managetrunks.misc.getTrunkType(EDIT_TRUNK) ;
+		var ttype = parent.pbx.trunks.getType(EDIT_TRUNK);
 		var tinfo = parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK];
 
 		DOM_edit_VOIPTrunk_Type.disabled = true;
@@ -171,14 +171,14 @@
 	// New Trunk
 		var tcv = edit_VOIPTrunk_Context_Basis.value;  /* How do we assign context name ? */
 		if (tcv == 'FromUser') {
-			var tmp_ttype = parent.astgui_managetrunks.misc.getTrunkType( DOM_edit_VOIPTrunk_Username.value );
+			var tmp_ttype = parent.pbx.trunks.getType(DOM_edit_VOIPTrunk_Username.value);
 			if( tmp_ttype ){
 				ASTGUI.highlightField( DOM_edit_VOIPTrunk_Username , "Another trunk exists with this name !!" );
 				return;
 			}
 		}
 		else if (tcv == 'FromProvider') {
-			var tmp_ttype = parent.astgui_managetrunks.misc.getTrunkType( ASTGUI.getFieldValue('edit_VOIPTrunk_Providername') );
+			var tmp_ttype = parent.pbx.trunks.getType(ASTGUI.getFieldValue('edit_VOIPTrunk_Providername'));
 			if( tmp_ttype ){
 				ASTGUI.highlightField( 'edit_VOIPTrunk_Providername' , "Another trunk exists with this name !!" );
 				return;
@@ -199,9 +199,9 @@
 			window.location.reload();
 		};
 
-		if(ttv =='SIP'){ parent.astgui_managetrunks.addSIPTrunk( trp , cbf,
+		if(ttv =='SIP'){ parent.pbx.trunks.add('sip', trp , cbf,
 						DOM_edit_VOIPTrunk_Context_Basis.value ) ; }
-		if(ttv =='IAX'){ parent.astgui_managetrunks.addIAXTrunk( trp , cbf,
+		if(ttv =='IAX'){ parent.pbx.trunks.add('iax', trp , cbf,
 						DOM_edit_VOIPTrunk_Context_Basis.value ) ; }
 
 	}else if(isNewTrunk == false){
@@ -214,7 +214,7 @@
 			if( ASTGUI.getFieldValue('codec_fourth') ){ codecs = codecs + ',' + ASTGUI.getFieldValue('codec_fourth') }
 			if( ASTGUI.getFieldValue('codec_fifth') ){ codecs = codecs + ',' + ASTGUI.getFieldValue('codec_fifth') }
 
-		var ttype = parent.astgui_managetrunks.misc.getTrunkType(EDIT_TRUNK) ;
+		var ttype = parent.pbx.trunks.getType(EDIT_TRUNK);
 		var x = new listOfActions('users.conf');
 		var v = new listOfActions('extensions.conf') ;
 
@@ -336,10 +336,10 @@
 var delete_trunk_confirm = function(ET){
 	EDIT_TRUNK = ET ;
 	if(!EDIT_TRUNK){return;}
-	var ttype = parent.astgui_managetrunks.misc.getTrunkType(EDIT_TRUNK) ;
+	var ttype = parent.pbx.trunks.getType(EDIT_TRUNK);
 	var tmp_name = parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['trunkname'] + ' -- ' + EDIT_TRUNK ;
 	if(! confirm(' Delete VOIP trunk "' + tmp_name + '" ?' ) ){return;}
-	parent.astgui_managetrunks.deletetrunk(EDIT_TRUNK) ;
+	parent.pbx.trunks.remove(EDIT_TRUNK);
 	ASTGUI.feedback( { msg:'deleted VOIP Trunk ' + tmp_name, showfor: 5, color:'red', bgcolor:'#FFFFFF' } );
 	window.location.reload();
 };
@@ -358,9 +358,9 @@
 	})();
 	(function (){
 		var c = [] ;
-		var d = c.concat( parent.astgui_managetrunks.listOfSIPTrunks() , parent.astgui_managetrunks.listOfIAXTrunks() );
+		var d = parent.pbx.trunks.list({sip: true, iax: true});
 		d.each(function(item){
-			var ttype = parent.astgui_managetrunks.misc.getTrunkType(item) ;
+			var ttype = parent.pbx.trunks.getType(item);
 			var newRow = DOM_table_VOIPTrunks_list.insertRow(-1);
 			newRow.className = ((DOM_table_VOIPTrunks_list.rows.length)%2==1)?'odd':'even';
 
@@ -416,7 +416,7 @@
 			this.optionValue = '' ;
 		};
 
-		var y = parent.astgui_manageusers.listOfUsers();
+		var y = parent.pbx.users.list();
 		y.each(function(user){
 			var f = new destination;
 			f.optionText = f.optionValue = user ;




More information about the asterisk-gui-commits mailing list