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

Side by Side Diff: chrome/browser/resources/shared/js/cr/ui/table.js

Issue 7326044: WebUI TaskManager: Column Customization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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/shared_resources.grd » ('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 /** 5 /**
6 * @fileoverview This implements a table control. 6 * @fileoverview This implements a table control.
7 */ 7 */
8 8
9 cr.define('cr.ui', function() { 9 cr.define('cr.ui', function() {
10 const ListSelectionModel = cr.ui.ListSelectionModel; 10 const ListSelectionModel = cr.ui.ListSelectionModel;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 }, 82 },
83 set selectionModel(selectionModel) { 83 set selectionModel(selectionModel) {
84 if (this.list_.selectionModel != selectionModel) { 84 if (this.list_.selectionModel != selectionModel) {
85 if (this.dataModel) 85 if (this.dataModel)
86 selectionModel.adjustLength(this.dataModel.length); 86 selectionModel.adjustLength(this.dataModel.length);
87 this.list_.selectionModel = selectionModel; 87 this.list_.selectionModel = selectionModel;
88 } 88 }
89 }, 89 },
90 90
91 /** 91 /**
92 * The table column model.
93 *
94 * @type {cr.ui.table.TableColumnModel}
95 */
96 get header() {
97 return this.header_;
98 },
99
100 /**
92 * Sets width of the column at the given index. 101 * Sets width of the column at the given index.
93 * 102 *
94 * @param {number} index The index of the column. 103 * @param {number} index The index of the column.
95 * @param {number} Column width. 104 * @param {number} Column width.
96 */ 105 */
97 setColumnWidth: function(index, width) { 106 setColumnWidth: function(index, width) {
98 this.columnWidths_[index] = width; 107 this.columnWidths_[index] = width;
99 }, 108 },
100 109
101 /** 110 /**
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 * because table contents can contain controls that can be focused, and for 242 * because table contents can contain controls that can be focused, and for
234 * some purposes (e.g., styling), the table can still be conceptually focused 243 * some purposes (e.g., styling), the table can still be conceptually focused
235 * at that point even though it doesn't actually have the page focus. 244 * at that point even though it doesn't actually have the page focus.
236 */ 245 */
237 cr.defineProperty(Table, 'hasElementFocus', cr.PropertyKind.BOOL_ATTR); 246 cr.defineProperty(Table, 'hasElementFocus', cr.PropertyKind.BOOL_ATTR);
238 247
239 return { 248 return {
240 Table: Table 249 Table: Table
241 }; 250 };
242 }); 251 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/shared_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698