pari: branch pari/dahdi_support r4397 - /team/pari/dahdi_support/config/js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Jan 6 15:38:53 CST 2009


Author: pari
Date: Tue Jan  6 15:38:52 2009
New Revision: 4397

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4397
Log:
 Get rid of providers page (providers.conf)
 as the list has been empty for a while now and also
 that the CustomVOIP providers page has an advanced Edit Option
 where all these parameters are set and also an option to choose
 how the trunk context should be named.



Modified:
    team/pari/dahdi_support/config/js/index.js
    team/pari/dahdi_support/config/js/trunks_analog.js
    team/pari/dahdi_support/config/js/trunks_digital.js
    team/pari/dahdi_support/config/js/trunks_sps.js
    team/pari/dahdi_support/config/js/trunks_voip.js

Modified: team/pari/dahdi_support/config/js/index.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/index.js?view=diff&rev=4397&r1=4396&r2=4397
==============================================================================
--- team/pari/dahdi_support/config/js/index.js (original)
+++ team/pari/dahdi_support/config/js/index.js Tue Jan  6 15:38:52 2009
@@ -449,7 +449,9 @@
 				sessionData.DahdiDeviceString = 'Zap' ;
 				sessionData.directories.app_DahdiScan = 'ztscan > ' + sessionData.directories.asteriskConfig + ASTGUI.globals.dahdiScanOutput ;
 				miscFunctions.hide_panel('misdn.html', 1);
-			} // else if( op.contains('dahdi') ){ }else if( op.contains('none') ){}
+			}else{
+				miscFunctions.hide_panel('misdn.html', -1);
+			}
 
 			ASTGUI.systemCmd( sessionData.directories.app_DahdiScan , onLogInFunctions.updatePanels4Platform );
 		});
@@ -572,15 +574,13 @@
 		return TI_LIST;
 	},
 
-	hide_panel: function(fname , show){ // parent.miscFunctions.hide_panel('page.html' , 0/1 )
+	hide_panel: function(fname , show){ // parent.miscFunctions.hide_panel('page.html' , 0/1/-1 ) , use -1 for deleteing a panel
 		var t = $('.ui-accordion-link') ;
 		for(var p=0; p < t.length ; p++){
 			if( $(t[p].parentNode).attr("page") == fname ){
-				if(show){
-					$(t[p].parentNode).show();
-				}else{
-					$(t[p].parentNode).hide();
-				}
+				if(!show) $(t[p].parentNode).hide();
+				if( show == -1 ) $(t[p].parentNode).remove();
+				if( show == 1) $(t[p].parentNode).show();
 				return;
 			}
 		}
@@ -1035,22 +1035,9 @@
 
 	if( sessionData.PLATFORM.isABE ){ // ABE-1600
 		try{
-			(function(){
-				var all_divs = $('div');
-				var i = 0;
-				while( all_divs[i] ){
-					var adi = all_divs[i];
-					var pg = $(adi).attr('page') ;
-					if( pg && pg == 'mohfiles.html' ){
-						adi.parentNode.removeChild(adi);
-						break;
-					}
-					i++;
-				}
-			})();
+			miscFunctions.hide_panel('mohfiles.html', -1);
 		}catch(err){}
 	}
-
 
 	var loadGUI = function(){
 		DOM_accordion_div = _$('accordion_div');

Modified: team/pari/dahdi_support/config/js/trunks_analog.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/trunks_analog.js?view=diff&rev=4397&r1=4396&r2=4397
==============================================================================
--- team/pari/dahdi_support/config/js/trunks_analog.js (original)
+++ team/pari/dahdi_support/config/js/trunks_analog.js Tue Jan  6 15:38:52 2009
@@ -265,17 +265,15 @@
 	FXOS = parent.sessionData.FXO_PORTS_DETECTED ;
 	top.document.title = 'Manage Analog Trunks' ;
 	(function (){
-		var tmp_providersPage = ( parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ) ? 'trunks_sps.html' : 'trunks_providers.html';
-		var t = [
-			{url:'#', desc:'Analog Trunks', selected:true } ,
-			{url: tmp_providersPage, desc:'Service Providers'} ,
-			{url:'trunks_voip.html', desc:'VOIP Trunks'}
-		];
-
+		var t = [];
+			t.push({url:'trunks_analog.html', desc:'Analog Trunks', selected:true });
+		if( parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ){
+			t.push({url:'trunks_sps.html', desc:'Service Providers'});
+		}
+			t.push({url:'trunks_voip.html', desc:'VOIP Trunks'});
 		if( !parent.sessionData.PLATFORM.isAA50 ){
 			t.push({url:'trunks_digital.html', desc:'T1/E1/BRI Trunks'});
 		}
-
 		ASTGUI.tabbedOptions( _$('tabbedMenu') , t);
 
 		var y = parent.astgui_manageusers.listOfUsers();

Modified: team/pari/dahdi_support/config/js/trunks_digital.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/trunks_digital.js?view=diff&rev=4397&r1=4396&r2=4397
==============================================================================
--- team/pari/dahdi_support/config/js/trunks_digital.js (original)
+++ team/pari/dahdi_support/config/js/trunks_digital.js Tue Jan  6 15:38:52 2009
@@ -68,12 +68,17 @@
 var localajaxinit = function(){
 	top.document.title = 'Manage PRI/BRI Trunks ' ;
 	var tmp_providersPage = ( parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ) ? 'trunks_sps.html' : 'trunks_providers.html';
-	ASTGUI.tabbedOptions( _$('tabbedMenu') , [
-		{url:'trunks_analog.html', desc:'Analog Trunks'} ,
-		{url: tmp_providersPage, desc:'Service Providers'} ,
-		{url:'trunks_voip.html', desc:'VOIP Trunks'} ,
-		{url:'#', desc:'T1/E1/BRI Trunks', selected:true }
-	]);
+	var t = [];
+		t.push({url:'trunks_analog.html', desc:'Analog Trunks'});
+	if( parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ){
+		t.push({url:'trunks_sps.html', desc:'Service Providers'});
+	}
+		t.push({url:'trunks_voip.html', desc:'VOIP Trunks'});
+	if( !parent.sessionData.PLATFORM.isAA50 ){
+		t.push({url:'trunks_digital.html', desc:'T1/E1/BRI Trunks', selected:true});
+	}
+	ASTGUI.tabbedOptions( _$('tabbedMenu') , t);
+
 	// show digital trunks in table_DigitalTrunks_list - parent.sessionData.pbxinfo['trunks']['pri']
 	DOM_table_DigitalTrunks_list = _$('table_DigitalTrunks_list');
 

Modified: team/pari/dahdi_support/config/js/trunks_sps.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/trunks_sps.js?view=diff&rev=4397&r1=4396&r2=4397
==============================================================================
--- team/pari/dahdi_support/config/js/trunks_sps.js (original)
+++ team/pari/dahdi_support/config/js/trunks_sps.js Tue Jan  6 15:38:52 2009
@@ -47,12 +47,14 @@
 		ASTGUI.selectbox.populateArray('codec_fifth', R);
 	})();
 	(function (){
-		var t = [ ];
+		var t = [];
 		if( !parent.sessionData.PLATFORM.AA50_SKU.contains('800') ){
-			t.push({ url: 'trunks_analog.html', desc: 'Analog Trunks' });
-		};
-		t.push({url:'#', desc:'Service Providers', selected:true });
-		t.push({url:'trunks_voip.html', desc:'VOIP Trunks'});
+			t.push({url:'trunks_analog.html', desc:'Analog Trunks'});
+		}
+		if( parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ){
+			t.push({url:'trunks_sps.html', desc:'Service Providers', selected:true });
+		}
+			t.push({url:'trunks_voip.html', desc:'VOIP Trunks'});
 		if( !parent.sessionData.PLATFORM.isAA50 ){
 			t.push({url:'trunks_digital.html', desc:'T1/E1/BRI Trunks'});
 		}

Modified: team/pari/dahdi_support/config/js/trunks_voip.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/trunks_voip.js?view=diff&rev=4397&r1=4396&r2=4397
==============================================================================
--- team/pari/dahdi_support/config/js/trunks_voip.js (original)
+++ team/pari/dahdi_support/config/js/trunks_voip.js Tue Jan  6 15:38:52 2009
@@ -387,15 +387,14 @@
 var localajaxinit = function(){
 	top.document.title = 'Manage custom SIP/IAX Trunks ' ;
 	(function (){ // populate TABS
-		var tmp_providersPage = ( parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ) ? 'trunks_sps.html' : 'trunks_providers.html';
 		var t = [];
-		if( !parent.sessionData.PLATFORM.AA50_SKU.contains('800') ){
-			t.push({ url: 'trunks_analog.html', desc: 'Analog Trunks' });
-		};
-		t.push({ url: tmp_providersPage , desc:'Service Providers' });
-		t.push({ url:'#', desc:'VOIP Trunks', selected:true });
+			t.push({url:'trunks_analog.html', desc:'Analog Trunks'});
+		if( parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ){
+			t.push({url:'trunks_sps.html', desc:'Service Providers'});
+		}
+			t.push({url:'trunks_voip.html', desc:'VOIP Trunks', selected:true});
 		if( !parent.sessionData.PLATFORM.isAA50 ){
-			t.push ({url:'trunks_digital.html', desc:'T1/E1/BRI Trunks'} );
+			t.push({url:'trunks_digital.html', desc:'T1/E1/BRI Trunks'});
 		}
 		ASTGUI.tabbedOptions( _$('tabbedMenu') , t);
 




More information about the asterisk-gui-commits mailing list