Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 7094006: Fix enabled state of an input field in the browser settings. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Formatting fix for "if" statement. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options_startup_page_list.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options_startup_page_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698