Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 $('viewAccountDetails').hidden = !data.showViewAccountButton; | 422 $('viewAccountDetails').hidden = !data.showViewAccountButton; |
| 423 }; | 423 }; |
| 424 | 424 |
| 425 InternetOptions.updateSecurityTab = function(requirePin) { | 425 InternetOptions.updateSecurityTab = function(requirePin) { |
| 426 $('sim-card-lock-enabled').checked = requirePin; | 426 $('sim-card-lock-enabled').checked = requirePin; |
| 427 $('change-pin').hidden = !requirePin; | 427 $('change-pin').hidden = !requirePin; |
| 428 }; | 428 }; |
| 429 | 429 |
| 430 InternetOptions.showDetailedInfo = function(data) { | 430 InternetOptions.showDetailedInfo = function(data) { |
| 431 var detailsPage = DetailsInternetPage.getInstance(); | 431 var detailsPage = DetailsInternetPage.getInstance(); |
| 432 | |
| 433 // Populate header | |
|
csilv
2012/02/25 01:31:54
add something like:
var pageElement = $('details
kevers
2012/02/29 15:30:16
Updated header based on UX discussions.
| |
| 434 var icon = $('detailsInternetPage').querySelector('.network-icon'); | |
| 435 icon.style.backgroundImage = url(data.iconURL); | |
| 436 var title = $('detailsInternetPage').querySelector('.network-title'); | |
| 437 title.textContent = data.networkName; | |
| 438 var subtitle = $('detailsInternetPage').querySelector('.network-subtitle'); | |
| 439 subtitle.textContent = data.connectionState; | |
| 440 | |
| 432 // TODO(chocobo): Is this hack to cache the data here reasonable? | 441 // TODO(chocobo): Is this hack to cache the data here reasonable? |
| 433 $('connectionState').data = data; | 442 $('connectionState').data = data; |
| 434 $('buyplanDetails').hidden = true; | 443 $('buyplanDetails').hidden = true; |
| 435 $('activateDetails').hidden = true; | 444 $('activateDetails').hidden = true; |
| 436 $('viewAccountDetails').hidden = true; | 445 $('viewAccountDetails').hidden = true; |
| 437 $('detailsInternetLogin').hidden = data.connected; | 446 $('detailsInternetLogin').hidden = data.connected; |
| 438 if (data.type == options.internet.Constants.TYPE_ETHERNET) | 447 if (data.type == options.internet.Constants.TYPE_ETHERNET) |
| 439 $('detailsInternetDisconnect').hidden = true; | 448 $('detailsInternetDisconnect').hidden = true; |
| 440 else | 449 else |
| 441 $('detailsInternetDisconnect').hidden = !data.connected; | 450 $('detailsInternetDisconnect').hidden = !data.connected; |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 710 | 719 |
| 711 InternetOptions.invalidNetworkSettings = function() { | 720 InternetOptions.invalidNetworkSettings = function() { |
| 712 alert(localStrings.getString('invalidNetworkSettings')); | 721 alert(localStrings.getString('invalidNetworkSettings')); |
| 713 }; | 722 }; |
| 714 | 723 |
| 715 // Export | 724 // Export |
| 716 return { | 725 return { |
| 717 InternetOptions: InternetOptions | 726 InternetOptions: InternetOptions |
| 718 }; | 727 }; |
| 719 }); | 728 }); |
| OLD | NEW |