pari: branch pari/dahdi_support r4421 - /team/pari/dahdi_support/config/js/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Tue Jan 13 15:30:19 CST 2009
Author: pari
Date: Tue Jan 13 15:30:19 2009
New Revision: 4421
URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4421
Log:
saving some progress!
Modified:
team/pari/dahdi_support/config/js/hardware.js
Modified: team/pari/dahdi_support/config/js/hardware.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/pari/dahdi_support/config/js/hardware.js?view=diff&rev=4421&r1=4420&r2=4421
==============================================================================
--- team/pari/dahdi_support/config/js/hardware.js (original)
+++ team/pari/dahdi_support/config/js/hardware.js Tue Jan 13 15:30:19 2009
@@ -205,10 +205,30 @@
_$('edit_labelZapchan').innerHTML = calc_bchan_fxx(l);
}();
- if ( Number(SPANS[l]['totchans']) <= 24 ){
+ if ( Number(SPANS[l]['totchans']) == 3 ){
+ ASTGUI.selectbox.append(_$('editspan_fac'),'CCS/AMI', 'CCS/AMI');
+ //_$('editspan_signalling')
+ ASTGUI.selectbox.clear(_$('editspan_signalling'));
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'bri_cpe', 'bri_cpe');
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'bri_net', 'bri_net');
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'bri_cpe_ptmp', 'bri_cpe_ptmp');
+ }else{
+ ASTGUI.selectbox.clear(_$('editspan_signalling'));
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'PRI - Net', 'pri_net');
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'PRI - CPE', 'pri_cpe');
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'E & M', 'em');
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'E & M -- Wink', 'em_w');
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'E & M -- featd(DTMF)', 'featd');
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'FXOKS', 'fxo_ks');
+ ASTGUI.selectbox.append(_$('editspan_signalling'),'FXOLS', 'fxo_ls');
+ }
+
+ if ( Number(SPANS[l]['totchans']) == 24 ){
ASTGUI.selectbox.append(_$('editspan_fac'),'ESF/B8ZS', 'ESF/B8ZS');
ASTGUI.selectbox.append(_$('editspan_fac'),'D4/AMI', 'D4/AMI');
- }else{
+ }
+
+ if ( Number(SPANS[l]['totchans']) == 31 ){
ASTGUI.selectbox.append(_$('editspan_fac'),'CCS/HDB3', 'CCS/HDB3');
ASTGUI.selectbox.append(_$('editspan_fac'),'CCS/CRC4/HDB3', 'CCS/CRC4/HDB3');
}
@@ -223,12 +243,14 @@
_$('editspan_channels').innerHTML = String(SPANS[l]['definedchans']) + "/" + String(SPANS[l]['totchans']) + " ("+SPANS[l]['spantype']+")";
+
if( SPANS[l]['signalling'] ){
ASTGUI.selectbox.selectOption( _$('editspan_signalling') , SPANS[l]['signalling'] );
}else{
_$('editspan_signalling').selectedIndex = -1 ;
}
disablEnable_sc();
+
if(SPANS[l]['switchtype']){
ASTGUI.selectbox.selectOption( _$('editspan_switchtype') , SPANS[l]['switchtype'] );
}else{
@@ -409,11 +431,24 @@
DETECTEDHARDWARE[ n[l]['location'] ]['type'] = n[l]['type'];
}
if( k == 'totchans' ){
- SPANS[l]['spantype'] = n[l]['type'].split('-')[1]; // part after '-' in 'digital-T1' or 'digital-E1'
- SPANS[l]['min_ch'] = Number(n[l]['basechan']);
+ SPANS[l]['spantype'] = n[l]['type'].split('-')[1]; // part after '-' in 'digital-T1' or 'digital-E1' or 'digital-NT' or 'digital-TE'
+ SPANS[l]['min_ch'] = Number(n[l]['basechan']) ;
SPANS[l]['max_ch'] = Number(n[l]['basechan']) + Number(n[l]['totchans']) - 1 ;
- SPANS[l]['reserved_ch'] = Number(n[l]['basechan']) + ( (Number(n[l]['totchans'])==24)? 23 : 15 );
- SPANS[l]['definedchans'] = (Number(n[l]['totchans'])==24)? 23 : 30 ; // default values
+
+ var n_tc = Number(n[l]['totchans']) ;
+ switch(n_tc){
+ case 3:
+ SPANS[l]['definedchans'] = 2;
+ SPANS[l]['reserved_ch'] = Number(n[l]['basechan']) + 2 ;
+ case 24:
+ SPANS[l]['definedchans'] = 23;
+ SPANS[l]['reserved_ch'] = Number(n[l]['basechan']) + 23;
+ case 31:
+ SPANS[l]['definedchans'] = 30;
+ SPANS[l]['reserved_ch'] = Number(n[l]['basechan']) + 15;
+ default:
+ SPANS[l]['definedchans'] = 0; // default values
+ }
}
if( k == 'lbo' ) {
switch(n[l][k]){
@@ -575,6 +610,7 @@
};
var disablEnable_sc = function(){
+
if( !_$('editspan_signalling').value.beginsWith('pri') ){
_$('editspan_switchtype').disabled = true;
_$('editspan_switchtype').selectedIndex = -1;
More information about the asterisk-gui-commits
mailing list