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

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

Issue 6303003: DOMUI Prefs: Implement inline editability for startup pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CSS tweak Created 9 years, 11 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 | « chrome/browser/resources/options/startup_page_manager.html ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 const ListSelectionModel = cr.ui.ListSelectionModel; 8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel;
9 9
10 /** 10 /**
11 * Encapsulated handling of startup page management page. 11 * Encapsulated handling of startup page management page.
12 * @constructor 12 * @constructor
13 */ 13 */
14 function StartupPageManager() { 14 function StartupPageManager() {
15 this.activeNavTab = null; 15 this.activeNavTab = null;
16 OptionsPage.call(this, 'startupPages', 16 OptionsPage.call(this, 'startupPages',
17 templateData.StartupPageManagerPage, 17 templateData.StartupPageManagerPage,
18 'startupPageManagerPage'); 18 'startupPageManagerPage');
19 } 19 }
20 20
21 cr.addSingletonGetter(StartupPageManager); 21 cr.addSingletonGetter(StartupPageManager);
22 22
23 StartupPageManager.prototype = { 23 StartupPageManager.prototype = {
24 __proto__: OptionsPage.prototype, 24 __proto__: OptionsPage.prototype,
25 list_: null, 25 list_: null,
26 26
27 initializePage: function() { 27 initializePage: function() {
28 OptionsPage.prototype.initializePage.call(this); 28 OptionsPage.prototype.initializePage.call(this);
29 29
30 var list = $('startupPagesFullList'); 30 var list = $('startupPagesFullList');
31 options.browser_options.StartupPageList.decorate(list); 31 options.browser_options.StartupPageList.decorate(list);
32 list.autoExpands = true; 32 list.autoExpands = true;
33 list.selectionModel = new ListSelectionModel; 33 list.selectionModel = new ListSingleSelectionModel;
34 34
35 // Wire up controls. 35 // Wire up controls.
36 $('startupAddButton').onclick = function(event) { 36 $('startupAddButton').onclick = function(event) {
37 OptionsPage.showOverlay('addStartupPageOverlay'); 37 OptionsPage.showOverlay('addStartupPageOverlay');
38 }; 38 };
39 39
40 // Remove Windows-style accelerators from button labels. 40 // Remove Windows-style accelerators from button labels.
41 // TODO(stuartmorgan): Remove this once the strings are updated. 41 // TODO(stuartmorgan): Remove this once the strings are updated.
42 $('startupAddButton').textContent = 42 $('startupAddButton').textContent =
43 localStrings.getStringWithoutAccelerator('startupAddButton'); 43 localStrings.getStringWithoutAccelerator('startupAddButton');
(...skipping 27 matching lines...) Expand all
71 StartupPageManager.getInstance().addStartupPage_(url); 71 StartupPageManager.getInstance().addStartupPage_(url);
72 }; 72 };
73 73
74 // Export 74 // Export
75 return { 75 return {
76 StartupPageManager: StartupPageManager 76 StartupPageManager: StartupPageManager
77 }; 77 };
78 78
79 }); 79 });
80 80
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/startup_page_manager.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698