| Index: chrome/browser/resources/shared/js/cr/ui/table/table_column.js
|
| diff --git a/chrome/browser/resources/shared/js/cr/ui/table/table_column.js b/chrome/browser/resources/shared/js/cr/ui/table/table_column.js
|
| index a2202a37b6b2b74deb8c804da9737e73ef719eb4..ba54387cec78d22253a81727e636ec3d987ca9db 100644
|
| --- a/chrome/browser/resources/shared/js/cr/ui/table/table_column.js
|
| +++ b/chrome/browser/resources/shared/js/cr/ui/table/table_column.js
|
| @@ -31,8 +31,6 @@ cr.define('cr.ui.table', function() {
|
|
|
| width_: null,
|
|
|
| - renderFunction_: null,
|
| -
|
| /**
|
| * Clones column.
|
| * @return {cr.ui.table.TableColumn} Clone of the given column.
|
| @@ -40,6 +38,7 @@ cr.define('cr.ui.table', function() {
|
| clone: function() {
|
| var tableColumn = new TableColumn(this.id_, this.name_, this.width_);
|
| tableColumn.renderFunction = this.renderFunction_;
|
| + tableColumn.headerRenderFunction = this.headerRenderFunction_;
|
| return tableColumn;
|
| },
|
|
|
| @@ -55,6 +54,15 @@ cr.define('cr.ui.table', function() {
|
| div.textContent = dataItem[columnId];
|
| return div;
|
| },
|
| +
|
| + /**
|
| + * Renders table header. This is the default render function.
|
| + * @param {cr.ui.Table} table The table.
|
| + * @return {HTMLElement} Rendered element.
|
| + */
|
| + headerRenderFunction_: function(table) {
|
| + return table.ownerDocument.createTextNode(this.name);
|
| + },
|
| };
|
|
|
| /**
|
| @@ -81,6 +89,12 @@ cr.define('cr.ui.table', function() {
|
| */
|
| cr.defineProperty(TableColumn, 'renderFunction');
|
|
|
| + /**
|
| + * The column header render function.
|
| + * @type {Function(cr.ui.Table): HTMLElement}
|
| + */
|
| + cr.defineProperty(TableColumn, 'headerRenderFunction');
|
| +
|
| return {
|
| TableColumn: TableColumn
|
| };
|
|
|