pari: trunk r179 - /trunk/config/numberplan.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue Dec 19 09:33:05 MST 2006


Author: pari
Date: Tue Dec 19 10:33:05 2006
New Revision: 179

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=179
Log:
instead of not showing the invalid trunks - hilight them in red, I should do this in setup wizard also I guess

Modified:
    trunk/config/numberplan.html

Modified: trunk/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/numberplan.html?view=diff&rev=179&r1=178&r2=179
==============================================================================
--- trunk/config/numberplan.html (original)
+++ trunk/config/numberplan.html Tue Dec 19 10:33:05 2006
@@ -152,18 +152,21 @@
 							break;
 						}
 				}				
-				if ( default_np_data[x][sorted_priorities[z]].trunk  == "" || trunk_exists == 0 ){
-						if(default_np_data[x][sorted_priorities[z]].trunk  == "" ){
+				if ( default_np_data[x][sorted_priorities[z]].trunk  == "" ){
 							alert("A Service Provider is not defined for this Rule ("+default_np_data[x][sorted_priorities[z]].rulename+")\n"
 						+" You will now be asked to choose a Service Provider ");
-						}else if( trunk_exists == 0 ){
+							$('trunks').selectedIndex = -1;
+						//editcallingrule(x , sorted_priorities[z]);
+						//return true;
+						addrowtotable( x , sorted_priorities[z] , "undefined" , default_np_data[x][sorted_priorities[z]].digits2strip );
+				}else if(trunk_exists == 0){
 							alert("Calling Rule ("+default_np_data[x][sorted_priorities[z]].rulename+") has an invalid Service Provider\n"
 						+" You will now be asked to choose from a list of existing Service Providers ");
-						}
-						editcallingrule(x , sorted_priorities[z]);
-						return true;
+							$('trunks').selectedIndex = -1;							
+						addrowtotable( x , sorted_priorities[z] , "invalid" , default_np_data[x][sorted_priorities[z]].digits2strip );							
+				}else{
+						addrowtotable( x , sorted_priorities[z] , default_np_data[x][sorted_priorities[z]].trunk , default_np_data[x][sorted_priorities[z]].digits2strip );
 				}
-				addrowtotable( x , sorted_priorities[z] , default_np_data[x][sorted_priorities[z]].trunk , default_np_data[x][sorted_priorities[z]].digits2strip );
 			}
 	} 
 }
@@ -189,9 +192,16 @@
 		var newCell2 = newRow.insertCell(2);
 		newCell2.innerHTML =  default_np_data[a][b].ruledesc ; 
 
-		var newCell3 = newRow.insertCell(3);
-		newCell3.innerHTML = trunks_desc[c].comment  ;
-		newCell3.width=85;
+
+		if(c == "invalid" || c== "undefined"  ){
+			var newCell3 = newRow.insertCell(3);
+			newCell3.innerHTML = "<B><font color=red>" + c + " trunk </font></B>"  ;
+			newCell3.width=85;
+		}else{
+			var newCell3 = newRow.insertCell(3);
+			newCell3.innerHTML = trunks_desc[c].comment  ;
+			newCell3.width=85;
+		}
 
 		var newCell4 = newRow.insertCell(4);
 		newCell4.innerHTML = "<A href=\"#\" onclick=\"editcallingrule('"+ a +"', '"+ b +"')\">Edit</A>&nbsp;&nbsp;<A href=\"#\" onclick=\"deletecallingrule('"+ a +"', '"+ b +"')\">Delete</A>";



More information about the asterisk-gui-commits mailing list