pari: trunk r359 - in /trunk/config: localexts.html numberplan.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Sat Feb 17 22:14:44 MST 2007


Author: pari
Date: Sat Feb 17 23:14:43 2007
New Revision: 359

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=359
Log:
Handle the case where a calling rule is defined outside the GUI 

Modified:
    trunk/config/localexts.html
    trunk/config/numberplan.html

Modified: trunk/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/localexts.html?view=diff&rev=359&r1=358&r2=359
==============================================================================
--- trunk/config/localexts.html (original)
+++ trunk/config/localexts.html Sat Feb 17 23:14:43 2007
@@ -146,26 +146,26 @@
 				<table align='center'  width='390'  cellpadding=2 cellspacing=1>
 
 				<tr>			<td onmouseover="show_tooltip('en', 'users', 15);" class="field_text" align="right"><input type='checkbox' id='hasagent'></td>
-								<td onmouseover="show_tooltip('en', 'users', 15);">Is Agent</td>
+								<td onmouseover="show_tooltip('en', 'users', 15);" class="field_text" >Is Agent</td>
 								<td onmouseover="show_tooltip('en', 'users', 8);" align=right><input type='checkbox' id='hasvoicemail'></td>
 								<td onmouseover="show_tooltip('en', 'users', 8);" class="field_text" align="left">Voicemail</td>
 				</tr>
 				
 				
 				<tr>			<td onmouseover="show_tooltip('en', 'users', 9);" class="field_text" align="right"><input type='checkbox' id='hasdirectory'></td>
-								<td onmouseover="show_tooltip('en', 'users', 9);">In Directory</td>
+								<td onmouseover="show_tooltip('en', 'users', 9);" class="field_text" >In Directory</td>
 								<td onmouseover="show_tooltip('en', 'users', 12);" align=right><input type='checkbox' id='hasmanager'></td>
 								<td onmouseover="show_tooltip('en', 'users', 12);" class="field_text" align="left">CTI</td>
 				</tr>
 
 				<tr>			<td onmouseover="show_tooltip('en', 'users', 10);" class="field_text" align="right"><input type='checkbox' id='hassip'></td>
-								<td onmouseover="show_tooltip('en', 'users', 10);">SIP</td>
+								<td onmouseover="show_tooltip('en', 'users', 10);"  class="field_text" >SIP</td>
 								<td onmouseover="show_tooltip('en', 'users', 11);" align=right><input type='checkbox' id='hasiax'></td>
 								<td onmouseover="show_tooltip('en', 'users', 11);" class="field_text" align="left">IAX</td>
 				</tr>
 
 				<tr>			<td onmouseover="show_tooltip('en', 'users', 13);" class="field_text" align="right"><input type='checkbox' id='callwaiting'></td>
-								<td onmouseover="show_tooltip('en', 'users', 13);">Call Waiting</td>
+								<td onmouseover="show_tooltip('en', 'users', 13);" class="field_text" >Call Waiting</td>
 								<td onmouseover="show_tooltip('en', 'users', 14);" align=right><input type='checkbox' id='threewaycalling'></td>
 								<td onmouseover="show_tooltip('en', 'users', 14);" class="field_text" align="left">3-Way&nbsp;Calling</td>
 				</tr>

Modified: trunk/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/numberplan.html?view=diff&rev=359&r1=358&r2=359
==============================================================================
--- trunk/config/numberplan.html (original)
+++ trunk/config/numberplan.html Sat Feb 17 23:14:43 2007
@@ -140,7 +140,7 @@
 									}
 									m[$('pattern').value][this_priority] = new ruleinanpdata($('trunks').value, $('strip').value, $('prepend').value);
 									m[$('pattern').value][this_priority].rulename =  $('rulename').value ; 
-									m[$('pattern').value][this_priority].ruledesc = parsepattern($('pattern').value,0) ;
+									m[$('pattern').value][this_priority].ruledesc = (iscustom) ? "custom" : parsepattern($('pattern').value,0) ;
 									oncomplete(); 
 						},
 						onFailure: function(t) {
@@ -244,7 +244,7 @@
 								addrowtotable( x , sorted_priorities[z] , "undefined" , m[x][sorted_priorities[z]].digits2strip );
 						}else if(trunk_exists == 0){
 								rules_nosp.push(m[x][sorted_priorities[z]].rulename) ;
-								$('trunks').selectedIndex = -1;							
+								//$('trunks').selectedIndex = -1;							
 								addrowtotable( x , sorted_priorities[z] , "invalid" , m[x][sorted_priorities[z]].digits2strip );							
 						}else{
 								addrowtotable( x , sorted_priorities[z] , m[x][sorted_priorities[z]].trunk , m[x][sorted_priorities[z]].digits2strip );
@@ -330,11 +330,12 @@
 		newCell0.align="center";
 
 		var newCell1 = newRow.insertCell(1);
-		newCell1.innerHTML =  m[a][b].rulename ; 
+		newCell1.innerHTML =  (m[a][b].rulename) ? m[a][b].rulename : "Not Defined" ; 
 		newCell1.width=90;
 
 		var newCell2 = newRow.insertCell(2);
-		newCell2.innerHTML =  m[a][b].ruledesc ; 
+		newCell2.innerHTML =  (m[a][b].ruledesc) ? m[a][b].ruledesc : a ; 
+		if(newCell2.innerHTML == "custom"){ newCell2.innerHTML = "custom ("+ a + ")"; }
 
 		if(c == "invalid" || c== "undefined"  ){
 			var newCell3 = newRow.insertCell(3);
@@ -412,9 +413,11 @@
 		$('strip').value = m[a][b].digits2strip;
 		$('prepend').value = m[a][b].prepend;
 		$('save_a').disabled = 1;
-		if( m[a][b].ruledesc == 'custom' ){
+		if( m[a][b].ruledesc == 'custom' || !m[a][b].ruledesc ){
 			// if this is a custom pattern then donot try to parse the pattern
 			iscustom = true;
+			(m[a][b].rulename) ? $('rulename').value = m[a][b].rulename : $('rulename').value = "";
+			m[a][b].ruledesc = 'custom' ;
 			$('define_advanced').style.display="";
 			$('define_usual').style.display="none";
 		}else{



More information about the asterisk-gui-commits mailing list