bkruse: branch bkruse/dahdi_integration r3949 - /team/bkruse/dahdi_integratio...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Oct 7 14:51:09 CDT 2008


Author: bkruse
Date: Tue Oct  7 14:51:09 2008
New Revision: 3949

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3949
Log:
More dahdi changes!
More compliance!
More.....good.

Modified:
    team/bkruse/dahdi_integration/config/hardware.html
    team/bkruse/dahdi_integration/config/ringgroups.html
    team/bkruse/dahdi_integration/config/users.html

Modified: team/bkruse/dahdi_integration/config/hardware.html
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/hardware.html?view=diff&rev=3949&r1=3948&r2=3949
==============================================================================
--- team/bkruse/dahdi_integration/config/hardware.html (original)
+++ team/bkruse/dahdi_integration/config/hardware.html Tue Oct  7 14:51:09 2008
@@ -598,8 +598,13 @@
 					}
 					SPANS[tmp]['definedchans'] = 0;
 					for( var k in n[l] ){ if(n[l].hasOwnProperty(k)){
-						if( k == 'signalling' || k == 'zapchan' || k == 'switchtype' ){ SPANS[tmp][k] = n[l][k]; }
-						if( k=='zapchan'){ SPANS[tmp]['definedchans'] = efgh(n[l][k]); }
+						if (parent.sessionData.PLATFORM.isAST_1_6) {
+							if( k == 'signalling' || k == 'dahdichan' || k == 'switchtype' ){ SPANS[tmp][k] = n[l][k]; }
+							if( k=='dahdichan'){ SPANS[tmp]['definedchans'] = efgh(n[l][k]); }
+						} else {
+							if( k == 'signalling' || k == 'zapchan' || k == 'switchtype' ){ SPANS[tmp][k] = n[l][k]; }
+							if( k=='zapchan'){ SPANS[tmp]['definedchans'] = efgh(n[l][k]); }
+						}
 					}}
 				}
 			}}
@@ -979,8 +984,14 @@
 				x.new_action('update', d , "context", e);
 				pri_trunk['context'] = e ;
 			}
-			x.new_action('update', d , "zapchan", SPANS[k]['zapchanstring']);
+			
+			if (parent.sessionData.PLATFORM.isAST_1_6) {
+				x.new_action('update', d , "dahdichan", SPANS[k]['dahdichanstring']);
+				pri_trunk['dahdichan'] = SPANS[k]['dahdichanstring'] ;
+			} else {
+				x.new_action('update', d , "zapchan", SPANS[k]['zapchanstring']);
 				pri_trunk['zapchan'] = SPANS[k]['zapchanstring'] ;
+			}
 
 			parent.sessionData.pbxinfo['trunks']['pri'][d] = pri_trunk;
 		}}}
@@ -1048,7 +1059,11 @@
 				bchanstring += tmp2 + ppp;
 				dchanstring += tmp3 + SPANS[k]['reserved_ch'];
 			}
-			SPANS[k]['zapchanstring'] = ppp;
+			if (parent.sessionData.PLATFORM.isAST_1_6) {
+				SPANS[k]['dahdichanstring'] = ppp;
+			} else {
+				SPANS[k]['zapchanstring'] = ppp;
+			}
 		}}}
 
 		for( var e in fxx ){ if(fxx.hasOwnProperty(e)){	x.new_action('append', context, e, fxx[e]);	}}

Modified: team/bkruse/dahdi_integration/config/ringgroups.html
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/ringgroups.html?view=diff&rev=3949&r1=3948&r2=3949
==============================================================================
--- team/bkruse/dahdi_integration/config/ringgroups.html (original)
+++ team/bkruse/dahdi_integration/config/ringgroups.html Tue Oct  7 14:51:09 2008
@@ -174,11 +174,17 @@
 			var tmp_ext = device.afterChar('/');
 			var tmp_techn = device.beforeChar('/');
 
-			if( tmp_techn.toLowerCase() == 'zap' ){
+			if( tmp_techn.toLowerCase() == 'zap' || tmp_techn.toLowerCase() == 'dahdi' ){
 
 				var this_analogStation_user = '';
 				for ( var q in parent.sessionData.pbxinfo.users ){ if( parent.sessionData.pbxinfo.users.hasOwnProperty(q) ){
-					if( parent.sessionData.pbxinfo.users[q].getProperty('zapchan') == tmp_ext ){
+					var prop = "";
+					if (parent.sessionData.PLATFORM.isAST_1_6) {
+						prop = "dahdichan";
+					} else {
+						prop = "zapchan";
+					}
+					if( parent.sessionData.pbxinfo.users[q].getProperty(prop) == tmp_ext ){
 						this_analogStation_user = q + '(AnalogPort ' + tmp_ext + ') ' + parent.sessionData.pbxinfo.users[q].getProperty('fullname') ;
 						ASTGUI.selectbox.append( DOM_select_fromlistofchannels, this_analogStation_user , device);
 						return;
@@ -225,10 +231,16 @@
 		var tmp_ext = device.afterChar('/');
 		var tmp_techn = device.beforeChar('/');
 
-		if( tmp_techn.toLowerCase() == 'zap' ){
+		if( tmp_techn.toLowerCase() == 'zap' || tmp_techn.toLowerCase() == 'dahdi' ){
 			var this_analogStation_user = '';
 			for( var q in parent.sessionData.pbxinfo.users ){ if( parent.sessionData.pbxinfo.users.hasOwnProperty(q) ){
-				if( parent.sessionData.pbxinfo.users[q].getProperty('zapchan') == tmp_ext ){
+				var prop = "";
+				if (parent.sessionData.PLATFORM.isAST_1_6) {
+					prop = "dahdichan";
+				} else {
+					prop = "zapchan";
+				}
+				if( parent.sessionData.pbxinfo.users[q].getProperty(prop) == tmp_ext ){
 					this_analogStation_user = q + '(AnalogPort ' + tmp_ext + ') ' + parent.sessionData.pbxinfo.users[q].getProperty('fullname') ;
 					ASTGUI.selectbox.append( DOM_select_ringthesechannels, this_analogStation_user , device );
 					return;
@@ -246,10 +258,16 @@
 		var tmp_ext = device.afterChar('/');
 		var tmp_techn = device.beforeChar('/');
 
-		if( tmp_techn.toLowerCase() == 'zap' ){
+		if( tmp_techn.toLowerCase() == 'zap'  || tmp_techn.toLowerCase() == 'dahdi'){
 			var this_analogStation_user = '';
 			for( var q in parent.sessionData.pbxinfo.users ){ if( parent.sessionData.pbxinfo.users.hasOwnProperty(q) ){
-				if( parent.sessionData.pbxinfo.users[q].getProperty('zapchan') == tmp_ext ){
+				var prop = "";
+				if (parent.sessionData.PLATFORM.isAST_1_6) {
+					prop = "dahdichan";
+				} else {
+					prop = "zapchan";
+				}
+				if( parent.sessionData.pbxinfo.users[q].getProperty(prop) == tmp_ext ){
 					this_analogStation_user = q + '(AnalogPort ' + tmp_ext + ') ' + parent.sessionData.pbxinfo.users[q].getProperty('fullname') ;
 					ASTGUI.selectbox.append( DOM_select_fromlistofchannels, this_analogStation_user , device );
 					return;
@@ -325,10 +343,16 @@
 			var tmp_ext = device.afterChar('/');
 			var tmp_techn = device.beforeChar('/');
 
-			if( tmp_techn.toLowerCase() == 'zap' ){
+			if( tmp_techn.toLowerCase() == 'zap' || tmp_techn.toLowerCase() == 'dahdi' ){
 				var this_analogStation_user = '';
 				for( var q in parent.sessionData.pbxinfo.users ){ if( parent.sessionData.pbxinfo.users.hasOwnProperty(q) ){
-					if( parent.sessionData.pbxinfo.users[q].getProperty('zapchan') == tmp_ext ){
+					var prop = "";
+					if (parent.sessionData.PLATFORM.isAST_1_6) {
+						prop = "dahdichan";
+					} else {
+						prop = "zapchan";
+					}
+					if( parent.sessionData.pbxinfo.users[q].getProperty(prop) == tmp_ext ){
 						this_analogStation_user = q + '(AnalogPort ' + tmp_ext + ') ' + parent.sessionData.pbxinfo.users[q].getProperty('fullname') ;
 						TMP_MEMBERS.push( this_analogStation_user );
 						break;
@@ -402,10 +426,16 @@
 				var tmp_ext = device.afterChar('/');
 				var tmp_techn = device.beforeChar('/');
 	
-				if( tmp_techn.toLowerCase() == 'zap' ){
+				if( tmp_techn.toLowerCase() == 'zap' || tmp_techn.toLowerCase() == 'dahdi'){
 					var this_analogStation_user = '';
 					for ( var q in parent.sessionData.pbxinfo.users ){ if( parent.sessionData.pbxinfo.users.hasOwnProperty(q) ){
-						if( parent.sessionData.pbxinfo.users[q].getProperty('zapchan') == tmp_ext ){
+						var prop = "";
+						if (parent.sessionData.PLATFORM.isAST_1_6) {
+							prop = "dahdichan";
+						} else {
+							prop = "zapchan";
+						}
+						if( parent.sessionData.pbxinfo.users[q].getProperty(prop) == tmp_ext ){
 							this_analogStation_user = q + '(AnalogPort ' + tmp_ext + ') ' + parent.sessionData.pbxinfo.users[q].getProperty('fullname') ;
 							ASTGUI.selectbox.append( DOM_select_fromlistofchannels, this_analogStation_user , device);
 							return;
@@ -430,10 +460,16 @@
 				var tmp_ext = device.afterChar('/');
 				var tmp_techn = device.beforeChar('/');
 	
-				if( tmp_techn.toLowerCase() == 'zap' ){
+				if( tmp_techn.toLowerCase() == 'zap' || tmp_techn.toLowerCase() == 'dahdi' ){
 					var this_analogStation_user = '';
 					for ( var q in parent.sessionData.pbxinfo.users ){ if( parent.sessionData.pbxinfo.users.hasOwnProperty(q) ){
-						if( parent.sessionData.pbxinfo.users[q].getProperty('zapchan') == tmp_ext ){
+						var prop = "";
+						if (parent.sessionData.PLATFORM.isAST_1_6) {
+							prop = "dahdichan";
+						} else {
+							prop = "zapchan";
+						}
+						if( parent.sessionData.pbxinfo.users[q].getProperty(prop) == tmp_ext ){
 							this_analogStation_user = q + '(AnalogPort ' + tmp_ext + ') ' + parent.sessionData.pbxinfo.users[q].getProperty('fullname') ;
 							ASTGUI.selectbox.append( DOM_select_ringthesechannels, this_analogStation_user , device);
 							return;

Modified: team/bkruse/dahdi_integration/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/team/bkruse/dahdi_integration/config/users.html?view=diff&rev=3949&r1=3948&r2=3949
==============================================================================
--- team/bkruse/dahdi_integration/config/users.html (original)
+++ team/bkruse/dahdi_integration/config/users.html Tue Oct  7 14:51:09 2008
@@ -47,7 +47,11 @@
 <script>
 var isNewUSER;
 var EXTENSION_EDIT;
-var zapchan_Before = '';
+if (parent.sessionData.PLATFORM.isAST_1_6) {
+	var zapchan_Before = '';
+} else {
+	var dahdi_Before = '';
+}
 var MULTI_FIELDS = ['edit_check_multiple_obcid','edit_multiple_obcid','edit_check_multiple_dialplan','edit_multiple_dialplan','edit_check_multiple_hasvoicemail','edit_multiple_hasvoicemail','edit_check_multiple_vmsecret', 'edit_multiple_vmCHoice1', 'edit_multiple_vmCHoice2', 'edit_multiple_vmsecret', 'edit_check_multiple_hassip', 'edit_multiple_hassip', 'edit_check_multiple_hasiax', 'edit_multiple_hasiax', 'edit_check_multiple_allow',  'edit_multiple_codec_one', 'edit_multiple_codec_two', 'edit_multiple_codec_three', 'edit_multiple_codec_fourth', 'edit_multiple_codec_fifth', 'edit_check_multiple_flashrxflash',  'edit_multiple_flash', 'edit_multiple_rxflash', 'edit_check_multiple_secret', 'edit_multiple_seCHoice1', 'edit_multiple_seCHoice2', 'edit_multiple_secret', 'edit_check_multiple_nat',  'edit_multiple_nat', 'edit_check_multiple_canreinvite', 'edit_multiple_canreinvite', 'edit_check_multiple_dtmfmode',  'edit_multiple_dtmfmode', 'edit_check_multiple_insecure',  'edit_mul
 tiple_insecure', 'edit_check_multiple_3waycalling',  'edit_multiple_3waycalling', 'edit_check_multiple_indirectory',  'edit_multiple_indirectory', 'edit_check_multiple_callwaiting',  'edit_multiple_callwaiting', 'edit_check_multiple_cti',  'edit_multiple_cti', 'edit_check_multiple_isagent',  'edit_multiple_isagent', 'edit_check_multiple_pickupgroup',  'edit_multiple_pickupgroup'];
 
 
@@ -171,7 +175,11 @@
 			addCell( newRow , { html: "<input type=checkbox  class='selected_extensions' value='"+ user +"'>" } );
 			addCell( newRow , { html: user } );
 			addCell( newRow , { html: ud.getProperty('fullname') || '--' } );
-			addCell( newRow , { html: ud.getProperty('zapchan') || '--' } );
+			if (parent.sessionData.PLATFORM.isAST_1_6) {
+				addCell( newRow , { html: ud.getProperty('dahdichan') || '--' } );
+			} else { 
+				addCell( newRow , { html: ud.getProperty('zapchan') || '--' } );
+			}
 			addCell( newRow , { html: ( ud.getProperty('hassip').isAstTrue() ) ? 'Yes' : '--' , align:'center'} );
 			addCell( newRow , { html: ( ud.getProperty('hasiax').isAstTrue() ) ? 'Yes' : '--' , align:'center'} );
 
@@ -215,7 +223,11 @@
 			ASTGUI.updateFieldToValue( 'edit_email', uinfo.getProperty('email') );
 			ASTGUI.updateFieldToValue( 'edit_hasSip', uinfo.getProperty('hassip') );
 			ASTGUI.updateFieldToValue( 'edit_hasIax', uinfo.getProperty('hasiax') );
-			ASTGUI.updateFieldToValue( 'edit_fxs', uinfo.getProperty('zapchan') );
+			if (parent.sessionData.PLATFORM.isAST_1_6) {
+				ASTGUI.updateFieldToValue( 'edit_fxs', uinfo.getProperty('dahdichan') );
+			} else {
+				ASTGUI.updateFieldToValue( 'edit_fxs', uinfo.getProperty('zapchan') );
+			}
 			ASTGUI.updateFieldToValue( 'edit_flash', uinfo.getProperty('flash') );
 			ASTGUI.updateFieldToValue( 'edit_rxflash', uinfo.getProperty('rxflash') );
 			// CODECS
@@ -248,7 +260,11 @@
 			ASTGUI.updateFieldToValue( 'edit_cti', uinfo.getProperty('hasmanager') );
 			ASTGUI.updateFieldToValue( 'edit_isagent', uinfo.getProperty('hasagent') );
 			ASTGUI.updateFieldToValue( 'edit_pickupgroup', uinfo.getProperty('pickupgroup') );
-			zapchan_Before = uinfo.getProperty('zapchan');
+			if (parent.sessionData.PLATFORM.isAST_1_6) {
+				dahdichan_Before = uinfo.getProperty('dahdichan');
+			} else { 
+				zapchan_Before = uinfo.getProperty('zapchan');
+			}
 		}else{
 			_$('new_ext').disabled = false;
 			ASTGUI.updateFieldToValue( 'codec_one', 'ulaw' );
@@ -283,7 +299,11 @@
 
 		isNewUSER = true;
 		EXTENSION_EDIT = '';
-		zapchan_Before = '';
+		if (parent.sessionData.PLATFORM.isAST_1_6) {
+			dahdichan_Before = '';
+		} else {
+			zapchan_Before = '';
+		}
 		_$('edit_userExtension_div_title').innerHTML = 'Create New User';
 		ASTGUI.feedback( { msg: 'Create New User !', showfor: 2 , color: 'green', bgcolor: '#FFFFFF' } );
 		USERS_MISC_FUNCTIONS.RESET_USER_FORM_FIELDS();
@@ -481,7 +501,11 @@
 				tmp_obj['call-limit'] = '100' ;
 			}
 
-			if( zapchan_Before != ASTGUI.getFieldValue('edit_fxs') ){ 	ASTGUI.cookies.setCookie( 'require_restart' , 'yes' );	}
+			if (parent.sessionData.PLATFORM.isAST_1_6) {
+				if( dahdichan_Before != ASTGUI.getFieldValue('edit_fxs') ){ 	ASTGUI.cookies.setCookie( 'require_restart' , 'yes' );	}
+			} else {
+				if( zapchan_Before != ASTGUI.getFieldValue('edit_fxs') ){ 	ASTGUI.cookies.setCookie( 'require_restart' , 'yes' );	}
+			}
 			(function(){
 				var fs = ASTGUI.getFieldValue('edit_fxs');
 				if(fs){
@@ -492,10 +516,22 @@
 					x.new_action('update', u, 'signalling', sg) ;					tmp_obj['signalling'] = sg ;
 					x.new_action('update', u, 'flash',  tmp_flash) ;				tmp_obj['flash'] = tmp_flash ;
 					x.new_action('update', u, 'rxflash', tmp_rxflash ) ;				tmp_obj['rxflash'] = tmp_rxflash ;
-					x.new_action('delete', u, 'zapchan', '') ;
-					x.new_action('append', u, 'zapchan', fs );					tmp_obj['zapchan'] = fs ;
+					if (parent.sessionData.PLATFORM.isAST_1_6) {
+						x.new_action('delete', u, 'dahdichan', '') ;
+					} else {
+						x.new_action('delete', u, 'zapchan', '') ;
+					}					
+					if (parent.sessionData.PLATFORM.isAST_1_6) {
+						x.new_action('append', u, 'dahdichan', fs );					tmp_obj['dahdichan'] = fs ;
+					} else {
+						x.new_action('append', u, 'zapchan', fs );					tmp_obj['zapchan'] = fs ;
+					}					
 				}else{
-					x.new_action('delete', u, 'zapchan', '') ;					tmp_obj['zapchan'] = '' ;
+					if (parent.sessionData.PLATFORM.isAST_1_6) {
+						x.new_action('delete', u, 'dahdichan', '') ;					tmp_obj['dahdichan'] = '' ;
+					} else {
+						x.new_action('delete', u, 'zapchan', '') ;					tmp_obj['zapchan'] = '' ;
+					}					
 				}
 
 				var codecs = '';




More information about the asterisk-gui-commits mailing list