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

Unified Diff: ui/webui/resources/js/cr/ui/table/table_list.js

Issue 2779663002: Compile cr.ui.Table and cr.ui.table.* in gyp v2 (Closed)
Patch Set: . Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ui/webui/resources/js/cr/ui/table/table_list.js
diff --git a/ui/webui/resources/js/cr/ui/table/table_list.js b/ui/webui/resources/js/cr/ui/table/table_list.js
index 853d171d418ab3819f58fe83fbd36f703b3b13b8..7937e6c6e7c73cb5c92245ae865df97e7238e078 100644
--- a/ui/webui/resources/js/cr/ui/table/table_list.js
+++ b/ui/webui/resources/js/cr/ui/table/table_list.js
@@ -93,7 +93,7 @@ cr.define('cr.ui.table', function() {
* @return {boolean} True if horizontal scroll bar changed.
*/
updateScrollbars_: function() {
- var cm = this.table.columnModel;
+ var cm = this.table_.columnModel;
var style = this.style;
if (!cm || cm.size == 0) {
if (style.overflow != 'hidden') {
@@ -165,31 +165,6 @@ cr.define('cr.ui.table', function() {
return this.table_.getRenderFunction().call(null, dataItem, this.table_);
},
- renderFunction_: function(dataItem, table) {
- // `This` must not be accessed here, since it may be anything, especially
- // not a pointer to this object.
-
- var cm = table.columnModel;
- var listItem = List.prototype.createItem.call(table.list, '');
- listItem.className = 'table-row';
-
- for (var i = 0; i < cm.size; i++) {
- var cell = table.ownerDocument.createElement('div');
- cell.style.width = cm.getWidth(i) + 'px';
- cell.className = 'table-row-cell';
- if (cm.isEndAlign(i))
- cell.style.textAlign = 'end';
- cell.hidden = !cm.isVisible(i);
- cell.appendChild(
- cm.getRenderFunction(i).call(null, dataItem, cm.getId(i), table));
-
- listItem.appendChild(cell);
- }
- listItem.style.width = cm.totalWidth + 'px';
-
- return listItem;
- },
-
/**
* Determines whether a full redraw is required.
* @return {boolean}
@@ -212,7 +187,7 @@ cr.define('cr.ui.table', function() {
/**
* The table associated with the list.
- * @type {cr.ui.Table}
+ * @type {Element}
*/
cr.defineProperty(TableList, 'table');
« no previous file with comments | « ui/webui/resources/js/cr/ui/table/table_header.js ('k') | ui/webui/resources/js/cr/ui/table/table_splitter.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698