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

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

Issue 7566013: Options: Fix the startup pages list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/inline_editable_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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 * Updates the startup radio group with the given value. 269 * Updates the startup radio group with the given value.
270 * @param {number} value the preference value being set. 270 * @param {number} value the preference value being set.
271 * @private 271 * @private
272 */ 272 */
273 updateRestoreOnStartup_: function(value) { 273 updateRestoreOnStartup_: function(value) {
274 var items = document.querySelectorAll('input[name=startup]'); 274 var items = document.querySelectorAll('input[name=startup]');
275 for (i = 0; i < items.length; i++) { 275 for (i = 0; i < items.length; i++) {
276 if (items[i].value == value) 276 if (items[i].value == value)
277 items[i].checked = true; 277 items[i].checked = true;
278 } 278 }
279
280 this.updateCustomStartupPageControlStates_();
279 }, 281 },
280 282
281 /** 283 /**
282 * Updates the startup pages list with the given entries. 284 * Updates the startup pages list with the given entries.
283 * @param {Array} pages List of startup pages. 285 * @param {Array} pages List of startup pages.
284 * @private 286 * @private
285 */ 287 */
286 updateStartupPages_: function(pages) { 288 updateStartupPages_: function(pages) {
287 var model = new ArrayDataModel(pages); 289 var model = new ArrayDataModel(pages);
288 // Add a "new page" row. 290 // Add a "new page" row.
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 BrowserOptions.setInstantFieldTrialStatus = function(enabled) { 548 BrowserOptions.setInstantFieldTrialStatus = function(enabled) {
547 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled); 549 BrowserOptions.getInstance().setInstantFieldTrialStatus_(enabled);
548 }; 550 };
549 551
550 // Export 552 // Export
551 return { 553 return {
552 BrowserOptions: BrowserOptions 554 BrowserOptions: BrowserOptions
553 }; 555 };
554 556
555 }); 557 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/inline_editable_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698