You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2007/10/22 19:59:56 UTC
svn commit: r587223 -
/incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js
Author: jmargaris
Date: Mon Oct 22 12:59:55 2007
New Revision: 587223
URL: http://svn.apache.org/viewvc?rev=587223&view=rev
Log:
notes and minor efficiency changes
Modified:
incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js
Modified: incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js?rev=587223&r1=587222&r2=587223&view=diff
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js (original)
+++ incubator/xap/trunk/codebase/src/xap/widgets/dojo/TreeTable.js Mon Oct 22 12:59:55 2007
@@ -238,6 +238,8 @@
var width = this._columns[i]._calculatedWidth;
var boxObject = {width: parseInt(width)};
// set new width
+
+ //TODO do I need setMargin box here instead of just setting style directly??
if (this.headerRow && this.headerRow.childNodes[i]){
dojo.html.setMarginBox( this.headerRow.childNodes[i], boxObject) ;
}
@@ -377,15 +379,6 @@
var wh = dojo.html.getMarginBox(this.domNode);
- /*
- //if we have no width wait for onResized()
- if (!wh.width){
- window.clearTimeout(this._rebuildTableTask);
- this._rebuildTableTask = null;
- return;
- }
- */
-
this._initialResizePending = false;
this._rebuildHead();
@@ -903,7 +896,7 @@
var tdCount = this.domNode.childNodes.length;
var td = document.createElement("td");
- this.domNode.appendChild(td);
+
td.style.whiteSpace = "nowrap";
td.align="left";
td.valign = "top";
@@ -915,6 +908,8 @@
if ( cell.style.textAlign ) {
td.align = cell.style.textAlign;
} // Add column CSS class
+ //TODO concatenate class names and use setClass instead of addClass
+
// Use tdCount variable to locate column
if (this._table && this._table._columns && this._table._columns.length > 0 ) {
xap.util.CssUtils.addClass(td, this._table._columns[tdCount]._localCSSClassName);
@@ -935,7 +930,7 @@
this._adjustImage();
}
td.appendChild(cell);
- cell._td = td;
+ this.domNode.appendChild(td);
},
//adjust the class for the image for this row
@@ -1019,10 +1014,13 @@
this._rows[i].setVisible(visible);
}
}
- if(this._table) {
- this._table._recolorAlternateRows();
- this._table._resizeTableLater();
- }
+
+ //TODO set visible is called on EVERY child row when you expand/collapse!!!
+ //need to do this only ONCE!!!
+ // if(this._table) {
+ // this._table._recolorAlternateRows();
+ // this._table._resizeTableLater();
+ // }
},
removeCell : function( cell ){