pari: branch 2.0 r4425 - /branches/2.0/config/js/pbx.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Jan 13 17:26:34 CST 2009


Author: pari
Date: Tue Jan 13 17:26:34 2009
New Revision: 4425

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

AA50-2326: upgrade process not updating voicemenu references



Modified:
    branches/2.0/config/js/pbx.js

Modified: branches/2.0/config/js/pbx.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/pbx.js?view=diff&rev=4425&r1=4424&r2=4425
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Tue Jan 13 17:26:34 2009
@@ -2109,6 +2109,29 @@
 				//	[voicemenus]
 				//	exten = 7000,1,Goto(voicemenu-custom-1|s|1)
 					sa.new_action('append', ASTGUI.contexts.VoiceMenuExtensions , 'exten', match_str );
+
+					var tmp_exten = ASTGUI.parseContextLine.getExten(match_str);
+					var tmp_oldVM_gotoStr = ASTGUI.parseContextLine.getAppWithArgs(match_str);
+					for ( var catname in ext_conf ){
+						if( !ext_conf.hasOwnProperty(catname) ) continue;
+						if( catname.beginsWith('DID_') ){
+							if( catname.contains( '_' + ASTGUI.contexts.TimeIntervalPrefix ) || catname.endsWith(ASTGUI.contexts.TrunkDefaultSuffix) ){ continue; }
+						}else if( catname.beginsWith('voicemenu-custom-') ){
+		
+						}else{
+							continue;
+						}
+		
+						var this_menu = ext_conf[catname] ;
+						this_menu.each( function( this_menu_line ){
+							if( this_menu_line.contains( tmp_oldVM_gotoStr ) ){
+								var tmp_toReplace = this_menu_line.afterChar('=');
+								var tmp_ReplaceWith = tmp_toReplace.replaceXY( tmp_oldVM_gotoStr, 'Goto(' + ASTGUI.contexts.VoiceMenuExtensions + ',' + tmp_exten + ',1)' );
+								sa.new_action( 'update', catname , 'exten', tmp_ReplaceWith , tmp_toReplace );
+							}
+						});
+					}
+
 				return;
 			}
 	




More information about the asterisk-gui-commits mailing list