| OLD | NEW |
| 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.internet', function() { | 5 cr.define('options.internet', function() { |
| 6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 /* | 8 /* |
| 9 * Helper function to set hidden attribute on given element list. | 9 * Helper function to set hidden attribute on given element list. |
| 10 * @param {Array} elements List of elements to be updated. | 10 * @param {Array} elements List of elements to be updated. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 cr.doc.querySelectorAll('#detailsInternetPage .apn-details-view'), | 87 cr.doc.querySelectorAll('#detailsInternetPage .apn-details-view'), |
| 88 true); | 88 true); |
| 89 | 89 |
| 90 // Password and shared. | 90 // Password and shared. |
| 91 updateHidden( | 91 updateHidden( |
| 92 cr.doc.querySelectorAll('#detailsInternetPage .password-details'), | 92 cr.doc.querySelectorAll('#detailsInternetPage .password-details'), |
| 93 !this.wireless || !this.password); | 93 !this.wireless || !this.password); |
| 94 updateHidden( | 94 updateHidden( |
| 95 cr.doc.querySelectorAll('#detailsInternetPage .shared-network'), | 95 cr.doc.querySelectorAll('#detailsInternetPage .shared-network'), |
| 96 !this.shared); | 96 !this.shared); |
| 97 updateHidden( |
| 98 cr.doc.querySelectorAll('#detailsInternetPage .prefer-network'), |
| 99 !this.showPreferred); |
| 97 } | 100 } |
| 98 }; | 101 }; |
| 99 | 102 |
| 100 /** | 103 /** |
| 101 * Whether the underlying network is connected. Only used for display purpose. | 104 * Whether the underlying network is connected. Only used for display purpose. |
| 102 * @type {boolean} | 105 * @type {boolean} |
| 103 */ | 106 */ |
| 104 cr.defineProperty(DetailsInternetPage, 'connected', | 107 cr.defineProperty(DetailsInternetPage, 'connected', |
| 105 cr.PropertyKind.JS, | 108 cr.PropertyKind.JS, |
| 106 DetailsInternetPage.prototype.updateControls_); | 109 DetailsInternetPage.prototype.updateControls_); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 cr.PropertyKind.JS); | 195 cr.PropertyKind.JS); |
| 193 cr.defineProperty(DetailsInternetPage, 'connecting', | 196 cr.defineProperty(DetailsInternetPage, 'connecting', |
| 194 cr.PropertyKind.JS); | 197 cr.PropertyKind.JS); |
| 195 cr.defineProperty(DetailsInternetPage, 'connected', | 198 cr.defineProperty(DetailsInternetPage, 'connected', |
| 196 cr.PropertyKind.JS); | 199 cr.PropertyKind.JS); |
| 197 | 200 |
| 198 return { | 201 return { |
| 199 DetailsInternetPage: DetailsInternetPage | 202 DetailsInternetPage: DetailsInternetPage |
| 200 }; | 203 }; |
| 201 }); | 204 }); |
| OLD | NEW |