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

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Dec 10 18:42:23 CST 2008


Author: pari
Date: Wed Dec 10 18:42:23 2008
New Revision: 4342

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

  dahdi support in welcome page



Modified:
    team/pari/dahdi_support/config/js/welcome2.js

Modified: team/pari/dahdi_support/config/js/welcome2.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/welcome2.js?view=diff&rev=4342&r1=4341&r2=4342
==============================================================================
--- team/pari/dahdi_support/config/js/welcome2.js (original)
+++ team/pari/dahdi_support/config/js/welcome2.js Wed Dec 10 18:42:23 2008
@@ -60,11 +60,12 @@
 		var newRow = TBL.insertRow(-1);
 		newRow.className = ((TBL.rows.length)%2==1)?'odd':'even';
 
+		var tmp_ports = parent.sessionData.pbxinfo['trunks']['analog'][item].zapchan || parent.sessionData.pbxinfo['trunks']['analog'][item].dahdichan || '?' ;
 		addCell( newRow , { html:''} );
 		addCell( newRow , { html: parent.sessionData.pbxinfo['trunks']['analog'][item]['trunkname'] } );
 		addCell( newRow , { html:'Analog'} );
 		addCell( newRow , { html:''} );
-		addCell( newRow , { html:'Ports ' + parent.sessionData.pbxinfo['trunks']['analog'][item]['zapchan'] } );
+		addCell( newRow , { html:'Ports ' + tmp_ports });
 	});
 /* End Analog Trunks */
 
@@ -89,10 +90,13 @@
 	for(var d in c){if(c.hasOwnProperty(d)){
 		var newRow = TBL.insertRow(-1);
 		newRow.className = ((TBL.rows.length)%2==1)?'odd':'even';
+
+		var tmp_ports = c[d].zapchan || c[d].dahdichan || '?' ;
+
 		addCell( newRow , { html:'' });
 		addCell( newRow , { html: c[d]['trunkname'] });
 		addCell( newRow , { html: 'Digital (' + c[d]['signalling'] + ')' }); // 
-		addCell( newRow , { html: 'Ports: ' + c[d]['zapchan'] });
+		addCell( newRow , { html: 'Ports: ' + tmp_ports });
 		addCell( newRow , { html:''} );
 	}}
 
@@ -120,6 +124,7 @@
 		var ud = parent.sessionData.pbxinfo.users[user];
 		var tmp_usertype_a = [];
 		var new_row = $('<tr></tr>');
+		var tmp_analog = ud.getProperty('zapchan') || ud.getProperty('dahdichan') ;
 
 		if( ud.getProperty('hassip').isAstTrue() && ud.getProperty('hasiax').isAstTrue() ) {
 			tmp_usertype_a.push( 'SIP/IAX User' );
@@ -131,8 +136,8 @@
 		} else if ( ud.getProperty('hassip').isAstTrue() ) {
 			tmp_usertype_a.push( '&nbsp;SIP User' );
 			new_row.addClass('sip');
-		} else if( ud.getProperty('zapchan') ) {
-			tmp_usertype_a.push( 'Analog User (Port ' + ud['zapchan'] + ')' ) ;
+		} else if( tmp_analog ) {
+			tmp_usertype_a.push( 'Analog User (Port ' + tmp_analog + ')' ) ;
 			new_row.addClass('analog');
 		}
 




More information about the asterisk-gui-commits mailing list