pari: branch aadk r973 - in /branches/aadk: ./ config/numberplan.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed May 23 10:19:22 MST 2007


Author: pari
Date: Wed May 23 12:19:21 2007
New Revision: 973

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

Modified:
    branches/aadk/   (props changed)
    branches/aadk/config/numberplan.html

Propchange: branches/aadk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May 23 12:19:21 2007
@@ -1,1 +1,1 @@
-/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-900,905
+/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-767,769-900,905,954

Modified: branches/aadk/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/numberplan.html?view=diff&rev=973&r1=972&r2=973
==============================================================================
--- branches/aadk/config/numberplan.html (original)
+++ branches/aadk/config/numberplan.html Wed May 23 12:19:21 2007
@@ -109,17 +109,12 @@
 	pattern = "_" + pattern;
 	// append 'followedby' number of X's
  	var s = _$('followedby').value ;
-	
+       for (var r=0; r < s ; r++){
+               pattern = pattern + "X" ;
+       }
 	// append a '.' if 'ormore' is checked
 	if( _$('ormore').checked ){
-		for (var r=0; r < s-1 ; r++){
-			pattern = pattern + "X" ;
-		}
-		pattern = pattern + "." ;
-	}else{
-		for (var r=0; r < s ; r++){
-			pattern = pattern + "X" ;
-		}
+		pattern = pattern + "!" ;
 	}
 	// assign this to the field 'pattern'
 	_$('pattern').value = pattern;
@@ -295,7 +290,7 @@
 	var temp = a.substr(1);
 	// if there is a dot at the end 
 	//		check ormore and remove the trailing dot
-	if( temp.substr(-1,1) == "." ){
+	if( temp.substr(-1,1) == "!" ){
 		temp = temp.slice(0, -1);
 		returnstring = "or more";
 		if(e == 1){ _$('ormore').checked = true; }
@@ -306,7 +301,7 @@
 	//		and followedby = length of string from somewhere till end
 	if(posofx == -1){ 	
 		if(returnstring == "or more"){
-			returnstring = "Begins with " + temp + " and followed by 1 or more digits" ;
+			returnstring = "Begins with " + temp + " and followed by 0 or more digits" ;
 		}else{
 			returnstring = "Exactly matches " + temp  ;
 		}
@@ -316,20 +311,16 @@
 		}
 	}else{
 		if(returnstring == "or more"){
-			if(e == 1){
-				_$('beginswith').value = temp.substr(0,posofx);
-				_$('followedby').value = (temp.length - posofx + 1);
-			}
-			returnstring = "Begins with " + temp.substr(0,posofx) + " and followed by "+(temp.length - posofx + 1)+" or more digits" ;
+			returnstring = "Begins with " + temp.substr(0,posofx) + " and followed by "+(temp.length - posofx)+" or more digits" ;
 		}else{
-			if(e == 1){
-				_$('beginswith').value = temp.substr(0,posofx);
-				_$('followedby').value = (temp.length - posofx );
-			}
 			returnstring = "Begins with " + temp.substr(0,posofx) + " and followed by "+(temp.length - posofx) + " digits";
 		}
-	}
-	disable_ormore();
+		if(e == 1){
+			_$('beginswith').value = temp.substr(0,posofx);
+			_$('followedby').value = (temp.length - posofx);
+		}
+	}
+
 return returnstring;
 }
 
@@ -553,18 +544,6 @@
 
 	config2json('users.conf', 1, trunks_loaded ) ;
 	//parent.astmanEngine.config2list("users.conf", $('trunks'), new Array(), trunkcallbacks);
-
-	add_event( _$('followedby'), 'change', disable_ormore );
-	add_event( _$('followedby'), 'keyup', disable_ormore );
-}
-
-function disable_ormore(){
-	if( !parseInt(_$('followedby').value ,10)){ 
-		_$('ormore').checked = false;
-		_$('ormore').disabled = true; 
-	}else{
-		_$('ormore').disabled = false;
-	}
 }
 
 function trunks_loaded(b){



More information about the asterisk-gui-commits mailing list