Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6937)

Unified Diff: chrome/browser/resources/options/chromeos/internet_options.js

Issue 7101013: Fix issue with static ipconfig not creating dhcp ip configs properly. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/options/chromeos/internet_detail.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/chromeos/internet_options.js
===================================================================
--- chrome/browser/resources/options/chromeos/internet_options.js (revision 87321)
+++ chrome/browser/resources/options/chromeos/internet_options.js (working copy)
@@ -361,8 +361,14 @@
inetDns = data.ipconfigDHCP.dns;
}
+ // Hide the dhcp/static radio if not ethernet or wifi
+ var ethernet_wifi = data.type == options.internet.Constants.TYPE_WIFI ||
+ data.type == options.internet.Constants.TYPE_ETHERNET;
+ $('ipTypeDHCPDiv').hidden = !ethernet_wifi;
+ $('ipTypeStaticDiv').hidden = !ethernet_wifi;
+
var ipConfigList = $('ipConfigList');
- ipConfigList.disabled = $('ipTypeDHCP').checked;
+ ipConfigList.disabled = $('ipTypeDHCP').checked || !ethernet_wifi;
options.internet.IPConfigList.decorate(ipConfigList);
ipConfigList.autoExpands = true;
var model = new ArrayDataModel([]);
@@ -406,18 +412,7 @@
});
$('ipTypeStatic').addEventListener('click', function(event) {
- // enable ipConfigList and switch back to static values (if any)
- if (data.ipconfigStatic) {
- ipConfigList.dataModel.item(0).value = data.ipconfigStatic.address;
- ipConfigList.dataModel.item(1).value =
- data.ipconfigStatic.subnetAddress;
- ipConfigList.dataModel.item(2).value = data.ipconfigStatic.gateway;
- ipConfigList.dataModel.item(3).value = data.ipconfigStatic.dns;
- }
- ipConfigList.dataModel.updateIndex(0);
- ipConfigList.dataModel.updateIndex(1);
- ipConfigList.dataModel.updateIndex(2);
- ipConfigList.dataModel.updateIndex(3);
+ // enable ipConfigList
ipConfigList.disabled = false;
ipConfigList.focus();
ipConfigList.selectionModel.selectedIndex = 0;
« no previous file with comments | « chrome/browser/resources/options/chromeos/internet_detail.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698