Chromium Code Reviews| 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', function() { | 5 cr.define('options', function() { |
| 6 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 const ArrayDataModel = cr.ui.ArrayDataModel; | 7 const ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 | 8 |
| 9 // | 9 // |
| 10 // BrowserOptions class | 10 // BrowserOptions class |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 395 !this.homepage_is_newtabpage_pref_.managed)); | 395 !this.homepage_is_newtabpage_pref_.managed)); |
| 396 }, | 396 }, |
| 397 | 397 |
| 398 /** | 398 /** |
| 399 * Sets the enabled state of the custom startup page list controls | 399 * Sets the enabled state of the custom startup page list controls |
| 400 * based on the current startup radio button selection. | 400 * based on the current startup radio button selection. |
| 401 * @private | 401 * @private |
| 402 */ | 402 */ |
| 403 updateCustomStartupPageControlStates_: function() { | 403 updateCustomStartupPageControlStates_: function() { |
| 404 var disable = !this.shouldEnableCustomStartupPageControls(); | 404 var disable = !this.shouldEnableCustomStartupPageControls(); |
| 405 $('startupPagesList').disabled = disable; | 405 var startupPagesList = $('startupPagesList'); |
| 406 startupPagesList.disabled = disable; | |
| 407 // Explicitly set disabled state for input text elements. | |
| 408 var inputs = startupPagesList.querySelectorAll("input[type='text']"); | |
| 409 for (var i = 0; i < inputs.length; i++ ) { | |
|
James Hawkins
2011/06/08 23:16:17
nit: Remove braces.
kevers
2011/06/10 13:51:38
Done.
| |
| 410 inputs[i].disabled = disable; | |
| 411 } | |
| 406 $('startupUseCurrentButton').disabled = disable; | 412 $('startupUseCurrentButton').disabled = disable; |
| 407 }, | 413 }, |
| 408 | 414 |
| 409 /** | 415 /** |
| 410 * Handle change events of the preference | 416 * Handle change events of the preference |
| 411 * 'session.urls_to_restore_on_startup'. | 417 * 'session.urls_to_restore_on_startup'. |
| 412 * @param {event} preference changed event. | 418 * @param {event} preference changed event. |
| 413 * @private | 419 * @private |
| 414 */ | 420 */ |
| 415 handleStartupPageListChange_: function(event) { | 421 handleStartupPageListChange_: function(event) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 478 BrowserOptions.updateAutocompleteSuggestions = function(suggestions) { | 484 BrowserOptions.updateAutocompleteSuggestions = function(suggestions) { |
| 479 BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions); | 485 BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions); |
| 480 }; | 486 }; |
| 481 | 487 |
| 482 // Export | 488 // Export |
| 483 return { | 489 return { |
| 484 BrowserOptions: BrowserOptions | 490 BrowserOptions: BrowserOptions |
| 485 }; | 491 }; |
| 486 | 492 |
| 487 }); | 493 }); |
| OLD | NEW |