espiceland: branch 2.0 r5087 - /branches/2.0/config/js/callingrules.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Sep 23 15:27:34 CDT 2010


Author: espiceland
Date: Thu Sep 23 15:27:31 2010
New Revision: 5087

URL: http://svnview.digium.com/svn/asterisk-gui?view=rev&rev=5087
Log:
Fixed bug when creating or editing calling rule where a blank filter creates an unusable dialplan. Fixes ASTGUI-250.

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

Modified: branches/2.0/config/js/callingrules.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/callingrules.js?view=diff&rev=5087&r1=5086&r2=5087
==============================================================================
--- branches/2.0/config/js/callingrules.js (original)
+++ branches/2.0/config/js/callingrules.js Thu Sep 23 15:27:31 2010
@@ -340,12 +340,20 @@
 		}
 
 		var t1_braces = (t1 == 'Skype') ? t1 : '${' + t1 + '}' ;
-		var Trunk_Build_str = ',' + t1_braces + '/' + DOM_new_crl_tr_prepend.value + '${FILTER(' + DOM_new_crl_tr_filter.value +',${EXTEN:' + tmp_stripx  + '})}' ;
+		var Trunk_Build_str = '${EXTEN:' + tmp_stripx  + '}';
+		if(DOM_new_crl_tr_filter.value != ''){
+			Trunk_Build_str = '${FILTER(' + DOM_new_crl_tr_filter.value +',' + Trunk_Build_str + ')}' ;
+		}
+		Trunk_Build_str = ',' + t1_braces + '/' + DOM_new_crl_tr_prepend.value + Trunk_Build_str;
 		var foTrunk_Build_str = ',' ;
 
 		if(DOM_new_crl_foChkbx.checked){
 			var t2_braces = (t2 == 'Skype') ? t2 : '${' + t2 + '}' ;
-			foTrunk_Build_str += t2_braces + '/' + DOM_new_crl_fotr_prepend.value + '${FILTER(' + DOM_new_crl_fotr_filter.value + ',${EXTEN:' + tmp_fotr_stripx + '})}' ;
+			foTrunk_Build_str += '${EXTEN:' + tmp_fotr_stripx + '}' ;
+			if(DOM_new_crl_tr_filter.value != ''){
+				foTrunk_Build_str = '${FILTER(' + DOM_new_crl_fotr_filter.value + ',' + foTrunk_Build_str + ')}' ;
+			}
+			foTrunk_Build_str += t2_braces + '/' + DOM_new_crl_fotr_prepend.value + foTrunk_Build_str;
 		}
 
 		var t1_cidarg = ( t1 == 'Skype') ? ',' : ',' + t1 ;




More information about the asterisk-gui-commits mailing list