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

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue Apr 3 16:03:34 MST 2007


Author: pari
Date: Tue Apr  3 18:03:33 2007
New Revision: 601

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=601
Log:
enable/disable fields based on dhcp_lan & dhcp_wan 

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=601&r1=600&r2=601
==============================================================================
--- branches/aadk/config/networking.html (original)
+++ branches/aadk/config/networking.html Tue Apr  3 18:03:33 2007
@@ -37,10 +37,42 @@
 
 	networkingcallbacks.loaded = function(t, x) {
                $('hiddennetworking').selectitem(0);
+		enabledisable_dhcpwan();
+		enabledisable_dhcplan();
 		show_window(1);
+		add_event( _$('DHCP_WAN'), 'click', enabledisable_dhcpwan);
+		add_event( _$('DHCP_LAN'), 'click', enabledisable_dhcplan);
                parent.loadscreen(this);
 	}
 
+
+	function enabledisable_dhcpwan(){
+		if( _$('DHCP_WAN').checked ){
+			_$('IP_WAN').disabled = true;
+			_$('SUBNET_WAN').disabled = true;
+			_$('GATEWAY_WAN').disabled = true;
+			_$('DNS_WAN').disabled = true;
+		}else{
+			_$('IP_WAN').disabled = false;
+			_$('SUBNET_WAN').disabled = false;
+			_$('GATEWAY_WAN').disabled = false;
+			_$('DNS_WAN').disabled = false;
+		}
+	}
+
+	function enabledisable_dhcplan(){
+		if( _$('DHCP_LAN').checked ){
+			_$('IP_LAN').disabled = true;
+			_$('SUBNET_LAN').disabled = true;
+			_$('GATEWAY_LAN').disabled = true;
+			_$('DNS_LAN').disabled = true;
+		}else{
+			_$('IP_LAN').disabled = false;
+			_$('SUBNET_LAN').disabled = false;
+			_$('GATEWAY_LAN').disabled = false;
+			_$('DNS_LAN').disabled = false;
+		}
+	}
 
 	networkingcallbacks.savechanges = function(){
 



More information about the asterisk-gui-commits mailing list