pari: trunk r342 - in /trunk/config: ./ scripts/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu Feb 15 14:56:04 MST 2007


Author: pari
Date: Thu Feb 15 15:56:04 2007
New Revision: 342

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=342
Log:
Bug Fix: hasOwnProperty - the right way

Modified:
    trunk/config/numberplan.html
    trunk/config/scripts/astman.js
    trunk/config/users.html

Modified: trunk/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/numberplan.html?view=diff&rev=342&r1=341&r2=342
==============================================================================
--- trunk/config/numberplan.html (original)
+++ trunk/config/numberplan.html Thu Feb 15 15:56:04 2007
@@ -186,7 +186,7 @@
 	//			parse "numberplansdata[t.name]['npcomments']" and add to "numberplansdata[t.name]['npdata']"
 	//	}
 	for(x in  numberplansdata){
-			if ( x == "extend"){ break;}
+			if (numberplansdata.hasOwnProperty(x)) {
 			var z = numberplansdata[x];
 			var y = z['npdata'];
 			for ( k =0 ; k < z['nprules'].length ; k++ ){
@@ -213,6 +213,7 @@
 						y[temp[0]][temp[1]].ruledesc = "custom" ;
 			}
 	}
+	}
 }
 
 function show_npdata_table(a){
@@ -222,11 +223,12 @@
 	var rules_nosp = new Array ;
 	var m = numberplansdata[a]['npdata'];
 	for( var x in  m ){	// x is the pattern
-				if ( x == "extend"){ break;}
+				 if (m.hasOwnProperty(x)) {
 				var sorted_priorities = [ ];
 				for ( var y in m[x] ){
-					if ( y == "extend"){break;}
+					 if (m[x].hasOwnProperty(y)) {
 					sorted_priorities.push(y);
+					}
 				}
 				sorted_priorities.sort();
 				for( var z=0; z < sorted_priorities.length ; z++ ){
@@ -247,6 +249,7 @@
 						}else{
 								addrowtotable( x , sorted_priorities[z] , m[x][sorted_priorities[z]].trunk , m[x][sorted_priorities[z]].digits2strip );
 						}
+				}
 				}
 	}
 

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=342&r1=341&r2=342
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Thu Feb 15 15:56:04 2007
@@ -1867,7 +1867,7 @@
 			var opt_new = document.createElement('option');
 			opt_new.text = e.options[f].text ;
 			opt_new.value = 'reserved';
-			if( navigator.userAgent.indexOf("Firefox") != -1 ){ opt_new.disabled = true; }
+			//if( navigator.userAgent.indexOf("Firefox") != -1 ){ opt_new.disabled = true; }
 			opt_new.style.color = "#ABABAB";
 
 			// Now decide where to add in u, and add it to u

Modified: trunk/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/users.html?view=diff&rev=342&r1=341&r2=342
==============================================================================
--- trunk/config/users.html (original)
+++ trunk/config/users.html Thu Feb 15 15:56:04 2007
@@ -34,7 +34,7 @@
 	var extencallbacks = new Object;
 	var numcallbacks = new Object;
 	var fieldnames = new Array( 'delete', 'status', 'new', 'save', 'cancel','name','fullname','secret','email','cid_number','zapchan','context', 'hasvoicemail','hasdirectory','hassip','hasiax','hasmanager','callwaiting','threewaycalling','mailbox','hasagent','group','host','vmsecret');
-	var focus_fields = new Array( 'name','fullname','secret','email','cid_number','zapchan','context');
+	var focus_fields = new Array( 'name','fullname','secret','email','cid_number','zapchan','context','vmsecret');
 	var localextenlength;
 	var allow_aliasextns;
 



More information about the asterisk-gui-commits mailing list