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

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

Issue 8548012: Added "select all/none" checkbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 1 month 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/shared/js/cr/ui/table/table_column_model.js ('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) 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 header. 6 * @fileoverview This implements a table header.
7 */ 7 */
8 8
9 cr.define('cr.ui.table', function() { 9 cr.define('cr.ui.table', function() {
10 const TableSplitter = cr.ui.TableSplitter; 10 const TableSplitter = cr.ui.TableSplitter;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 * @param {number} index Column index. 117 * @param {number} index Column index.
118 */ 118 */
119 createHeaderLabel_: function(index) { 119 createHeaderLabel_: function(index) {
120 var cm = this.table_.columnModel; 120 var cm = this.table_.columnModel;
121 var dm = this.table_.dataModel; 121 var dm = this.table_.dataModel;
122 122
123 var labelDiv = this.ownerDocument.createElement('div'); 123 var labelDiv = this.ownerDocument.createElement('div');
124 labelDiv.className = 'table-header-label'; 124 labelDiv.className = 'table-header-label';
125 125
126 var span = this.ownerDocument.createElement('span'); 126 var span = this.ownerDocument.createElement('span');
127 span.textContent = cm.getName(index); 127 span.appendChild(cm.renderHeader(index, this.table_));
128 var rtl = this.ownerDocument.defaultView.getComputedStyle(this). 128 var rtl = this.ownerDocument.defaultView.getComputedStyle(this).
129 direction == 'rtl'; 129 direction == 'rtl';
130 if (rtl) { 130 if (rtl) {
131 span.style.backgroundPosition = 'left'; 131 span.style.backgroundPosition = 'left';
132 span.style.paddingRight= '0'; 132 span.style.paddingRight= '0';
133 } else { 133 } else {
134 span.style.backgroundPosition = 'right'; 134 span.style.backgroundPosition = 'right';
135 span.style.paddingLeft= '0'; 135 span.style.paddingLeft= '0';
136 } 136 }
137 if (dm) { 137 if (dm) {
(...skipping 22 matching lines...) Expand all
160 /** 160 /**
161 * The table associated with the header. 161 * The table associated with the header.
162 * @type {cr.ui.Table} 162 * @type {cr.ui.Table}
163 */ 163 */
164 cr.defineProperty(TableHeader, 'table'); 164 cr.defineProperty(TableHeader, 'table');
165 165
166 return { 166 return {
167 TableHeader: TableHeader 167 TableHeader: TableHeader
168 }; 168 };
169 }); 169 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/shared/js/cr/ui/table/table_column_model.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698