pari: trunk r180 - /trunk/config/setup/5.html

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


Author: pari
Date: Tue Dec 19 10:46:14 2006
New Revision: 180

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=180
Log:
follow up for previous commit

Modified:
    trunk/config/setup/5.html

Modified: trunk/config/setup/5.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/5.html?view=diff&rev=180&r1=179&r2=180
==============================================================================
--- trunk/config/setup/5.html (original)
+++ trunk/config/setup/5.html Tue Dec 19 10:46:14 2006
@@ -168,17 +168,17 @@
 							break;
 						}
 				}				
-				if ( default_np_data[x][sorted_priorities[z]].trunk  == "" || trunk_exists == 0 ){
-						if(default_np_data[x][sorted_priorities[z]].trunk  == "" ){
-							alert(" You will now be asked to choose a Service Provider \n and other settings for handling '"+default_np_data[x][sorted_priorities[z]].rulename +"' Calls");
-						}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;
+
+				if ( default_np_data[x][sorted_priorities[z]].trunk  == "" ){
+							$('trunks').selectedIndex = -1;
+							addrowtotable( x , sorted_priorities[z] , "undefined" , default_np_data[x][sorted_priorities[z]].digits2strip );
+				}else if(trunk_exists == 0){
+							$('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 );
+
 			}
 	} 
 }
@@ -204,9 +204,15 @@
 		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