PDA

View Full Version : [CLOSED][4.0] For layout.container.Table need class for last row and last col



fguest
26 Apr 2011, 8:46 PM
For Ext.layout.container.Table need class for cell in last row and last col.



renderItems: function(items) {
...
...
if (tbody.rows.length > 0) {
var rrow, ccell;
for (var ii = 0; ii < tbody.rows.length; ii++) {
rrow = tbody.rows[ii];
if (rrow.cells.length > 0) {
ccell = rrow.cells[rrow.cells.length - 1];
Ext.fly(ccell).addCls("x-jctable-layout-cell-lastcol");
}
}
rrow = tbody.rows[tbody.rows.length - 1];
for (ii = 0; ii < rrow.cells.length; ii++) {
ccell = rrow.cells[ii];
Ext.fly(ccell).addCls("x-jctable-layout-cell-lastrow");
}
}

}

evant
26 Apr 2011, 9:26 PM
For what purpose?

fguest
26 Apr 2011, 10:20 PM
For what purpose?

should be set separators between the cells. When you set the delimiters in the css, to the last cell in the row and column delimiters are not needed:

for css:



.x-table-layout-cell {
padding-right: 4px;
padding-bottom: 4px;
}


we have such a result:



+-------+ +-------+
| cell1 |space| cell2 |space
+-------+ +-------+
space space
+-------+ +-------+
| cell3 |space| cell4 |space
+-------+ +-------+
space space


expected this result:



+-------+ +-------+
| cell1 |space| cell2 |
+-------+ +-------+
space space
+-------+ +-------+
| cell3 |space| cell4 |
+-------+ +-------+

evant
26 Apr 2011, 10:34 PM
Seems like a pretty specific requirement, I don't think we'll implement this.