pari: branch aadk r673 - /branches/aadk/config/networking.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Apr 16 11:34:50 MST 2007


Author: pari
Date: Mon Apr 16 13:34:49 2007
New Revision: 673

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=673
Log:
Auto complete for subnet values

Modified:
    branches/aadk/config/networking.html

Modified: branches/aadk/config/networking.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/networking.html?view=diff&rev=673&r1=672&r2=673
==============================================================================
--- branches/aadk/config/networking.html (original)
+++ branches/aadk/config/networking.html Mon Apr 16 13:34:49 2007
@@ -114,6 +114,22 @@
 			widgets[nwfields[x]] = $(nwfields[x]);
 			widgets[nwfields[x]].disabled = true;
 		}
+
+		add_event( _$('IP_LAN') , 'change', function(){
+			var t = Number( _$('IP_LAN').value.substr(0,3) );
+ 				if ( t >= 128 && t <= 191 ){ _$('SUBNET_LAN').value = "255.255.0.0"; return;}
+				if ( t >= 0 && t <= 127 ){ _$('SUBNET_LAN').value = "255.0.0.0"; return;}
+				if ( t >= 192  ){ _$('SUBNET_LAN').value = "255.255.255.0"; }
+			}
+		);
+		add_event( _$('IP_WAN') , 'change', function(){
+			var t = Number( _$('IP_WAN').value.substr(0,3) );
+ 				if ( t >= 128 && t <= 191 ){ _$('SUBNET_WAN').value = "255.255.0.0"; return;}
+				if ( t >= 0 && t <= 127 ){ _$('SUBNET_WAN').value = "255.0.0.0"; return;}
+				if ( t >= 192  ){ _$('SUBNET_WAN').value = "255.255.255.0"; }
+			}
+		);
+
 		parent.astmanEngine.config2list("networking.conf", $('hiddennetworking'), widgets, networkingcallbacks);
 	}
 
@@ -207,7 +223,7 @@
 			<TR>	<TD>Domain</TD>
 				<TD><input type="text" id='DOMAIN_LAN'></TD>
 			</TR>
-			<TR>	<TD>DHCP</TD>
+			<TR>	<TD>Enable DHCP Server</TD>
 				<TD><input type="checkbox" id='DHCP_LAN'></TD>
 			</TR>
 			<TR>	<TD>IP</TD>



More information about the asterisk-gui-commits mailing list