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 | |
|
James Hawkins
2011/06/08 17:38:31
s/explicitly/Explicitly/
Add period at end of sen
| |
| 408 var inputs = startupPagesList.getElementsByTagName("input"); | |
|
James Hawkins
2011/06/08 17:38:31
You can shorten this by searching on selector, "in
kevers
2011/06/08 20:08:35
Made the requested changes.
| |
| 409 for (i = 0; i < inputs.length; i++) { | |
| 410 if (inputs[i].type == "text") { | |
| 411 inputs[i].disabled = disable; | |
| 412 } | |
| 413 } | |
| 406 $('startupUseCurrentButton').disabled = disable; | 414 $('startupUseCurrentButton').disabled = disable; |
| 407 }, | 415 }, |
| 408 | 416 |
| 409 /** | 417 /** |
| 410 * Handle change events of the preference | 418 * Handle change events of the preference |
| 411 * 'session.urls_to_restore_on_startup'. | 419 * 'session.urls_to_restore_on_startup'. |
| 412 * @param {event} preference changed event. | 420 * @param {event} preference changed event. |
| 413 * @private | 421 * @private |
| 414 */ | 422 */ |
| 415 handleStartupPageListChange_: function(event) { | 423 handleStartupPageListChange_: function(event) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 478 BrowserOptions.updateAutocompleteSuggestions = function(suggestions) { | 486 BrowserOptions.updateAutocompleteSuggestions = function(suggestions) { |
| 479 BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions); | 487 BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions); |
| 480 }; | 488 }; |
| 481 | 489 |
| 482 // Export | 490 // Export |
| 483 return { | 491 return { |
| 484 BrowserOptions: BrowserOptions | 492 BrowserOptions: BrowserOptions |
| 485 }; | 493 }; |
| 486 | 494 |
| 487 }); | 495 }); |
| OLD | NEW |