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

Side by Side 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, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 const ArrayDataModel = cr.ui.ArrayDataModel; 7 const ArrayDataModel = cr.ui.ArrayDataModel;
8 8
9 ///////////////////////////////////////////////////////////////////////////// 9 /////////////////////////////////////////////////////////////////////////////
10 // InternetOptions class: 10 // InternetOptions class:
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 ipConfigList.dataModel.updateIndex(0); 399 ipConfigList.dataModel.updateIndex(0);
400 ipConfigList.dataModel.updateIndex(1); 400 ipConfigList.dataModel.updateIndex(1);
401 ipConfigList.dataModel.updateIndex(2); 401 ipConfigList.dataModel.updateIndex(2);
402 ipConfigList.dataModel.updateIndex(3); 402 ipConfigList.dataModel.updateIndex(3);
403 // Unselect all so we don't keep the currently selected field editable. 403 // Unselect all so we don't keep the currently selected field editable.
404 ipConfigList.selectionModel.unselectAll(); 404 ipConfigList.selectionModel.unselectAll();
405 ipConfigList.disabled = true; 405 ipConfigList.disabled = true;
406 }); 406 });
407 407
408 $('ipTypeStatic').addEventListener('click', function(event) { 408 $('ipTypeStatic').addEventListener('click', function(event) {
409 // enable ipConfigList and switch back to static values (if any) 409 // enable ipConfigList
410 if (data.ipconfigStatic) {
411 ipConfigList.dataModel.item(0).value = data.ipconfigStatic.address;
412 ipConfigList.dataModel.item(1).value =
413 data.ipconfigStatic.subnetAddress;
414 ipConfigList.dataModel.item(2).value = data.ipconfigStatic.gateway;
415 ipConfigList.dataModel.item(3).value = data.ipconfigStatic.dns;
416 }
417 ipConfigList.dataModel.updateIndex(0);
418 ipConfigList.dataModel.updateIndex(1);
419 ipConfigList.dataModel.updateIndex(2);
420 ipConfigList.dataModel.updateIndex(3);
421 ipConfigList.disabled = false; 410 ipConfigList.disabled = false;
422 ipConfigList.focus(); 411 ipConfigList.focus();
423 ipConfigList.selectionModel.selectedIndex = 0; 412 ipConfigList.selectionModel.selectedIndex = 0;
424 }); 413 });
425 414
426 if (data.hardwareAddress) { 415 if (data.hardwareAddress) {
427 $('hardwareAddress').textContent = data.hardwareAddress; 416 $('hardwareAddress').textContent = data.hardwareAddress;
428 $('hardwareAddressRow').style.display = 'table-row'; 417 $('hardwareAddressRow').style.display = 'table-row';
429 } else { 418 } else {
430 // This is most likely a device without a hardware address. 419 // This is most likely a device without a hardware address.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 detailsPage.gsm = false; 516 detailsPage.gsm = false;
528 } 517 }
529 OptionsPage.navigateToPage('detailsInternetPage'); 518 OptionsPage.navigateToPage('detailsInternetPage');
530 }; 519 };
531 520
532 // Export 521 // Export
533 return { 522 return {
534 InternetOptions: InternetOptions 523 InternetOptions: InternetOptions
535 }; 524 };
536 }); 525 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698