this.colspan += rc.colspan;
this.node.setAttribute('colspan', this.colspan);
+ var table = this.toTableArray();
+ this.updateWidths(table);
},
updateWidths : function(table)
{
console.log("htmleditor.BlockTd updateWidths");
+ console.log("TABLE");
console.log(table);
+ console.log("COLWIDTH");
+ console.log(this.colWidths);
for(var r = 0 ; r < table.length; r++) {
for(var c = 0 ; c < table[r].length; c++) {
}
if (this.colWidths[0] != false && table[r][c].colspan < 2) {
+ console.log("CELL");
+ console.log(table[r][c].cell);
var el = Roo.htmleditor.Block.factory(table[r][c].cell);
el.width = Math.floor(this.colWidths[c]) +'%';
el.updateElement(el.node);
}
+ else {
+ console.log("CELL COLSPAN");
+ console.log(table[r][c]);
+ }
table[r][c].cell = false; // done
}
}
},
normalizeWidths : function(table)
{
- console.log("htmleditor.BlockTd normalizeWidths");
- console.log("colWidths 0");
- console.log(this.colWidths[0]);
- console.log("colWidths 1");
- console.log(this.colWidths[1]);
if (this.colWidths[0] === false) {
var nw = 100.0 / this.colWidths.length;
shrinkColumn : function()
{
- console.log("htmleditor.BlockTd shrinkColumn");
var table = this.toTableArray();
- console.log(table);
this.normalizeWidths(table);
var col = this.cellData.col;
var nw = this.colWidths[col] * 0.8;
},
growColumn : function()
{
- console.log("htmleditor.BlockTd growColumn");
var table = this.toTableArray();
- console.log(table);
this.normalizeWidths(table);
var col = this.cellData.col;
var nw = this.colWidths[col] * 1.2;