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++) |
| 410 inputs[i].disabled = disable; |
406 $('startupUseCurrentButton').disabled = disable; | 411 $('startupUseCurrentButton').disabled = disable; |
407 }, | 412 }, |
408 | 413 |
409 /** | 414 /** |
410 * Handle change events of the preference | 415 * Handle change events of the preference |
411 * 'session.urls_to_restore_on_startup'. | 416 * 'session.urls_to_restore_on_startup'. |
412 * @param {event} preference changed event. | 417 * @param {event} preference changed event. |
413 * @private | 418 * @private |
414 */ | 419 */ |
415 handleStartupPageListChange_: function(event) { | 420 handleStartupPageListChange_: function(event) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 BrowserOptions.updateAutocompleteSuggestions = function(suggestions) { | 483 BrowserOptions.updateAutocompleteSuggestions = function(suggestions) { |
479 BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions); | 484 BrowserOptions.getInstance().updateAutocompleteSuggestions_(suggestions); |
480 }; | 485 }; |
481 | 486 |
482 // Export | 487 // Export |
483 return { | 488 return { |
484 BrowserOptions: BrowserOptions | 489 BrowserOptions: BrowserOptions |
485 }; | 490 }; |
486 | 491 |
487 }); | 492 }); |
OLD | NEW |