X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=1d492ab86d9fb980e20a1907f8e29a57d4f2bad8;hb=45ed17afcff97d9cf11c38a406e33f80cff45012;hp=8659665b85359544667810e063968782df71ad72;hpb=4a37859fa058d2dc2a5c9b34886dd3e452ab7350;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index 8659665b85..1d492ab86d 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -48994,8 +48994,6 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { contextMenu : function(toolbar) { - console.log("htmleditor.BlockTd contextMenu"); - console.log(toolbar); var cell = function() { return Roo.htmleditor.Block.factory(toolbar.tb.selectedNode); @@ -49278,7 +49276,6 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { */ toObject : function() { - console.log("htmleditor.BlockTd toObject"); var ret = { tag : 'td', contenteditable : 'true', // this stops cell selection from picking the table. @@ -49314,8 +49311,6 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { readElement : function(node) { - console.log("htmleditor.BlockTd readElement"); - console.log(node); node = node ? node : this.node ; this.width = node.style.width; this.colspan = Math.max(1,1*node.getAttribute('colspan')); @@ -49348,7 +49343,6 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { toTableArray : function() { - console.log("htmleditor.BlockTd toTableArray"); var ret = []; var tab = this.node.closest('tr').closest('table'); Array.from(tab.rows).forEach(function(r, ri){ @@ -49381,8 +49375,6 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { if (typeof(this.colWidths[cn]) == 'undefined') { this.colWidths[cn] = ce.style.width; - console.log("colWidths " + cn); - console.log(ce.style.width); if (this.colWidths[cn] != '') { all_auto = false; } @@ -49425,6 +49417,7 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { mergeRight: function() { + console.log("htmleditor.BlockTd mergeRight"); // get the contents of the next cell along.. var tr = this.node.closest('tr'); @@ -49450,6 +49443,8 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { this.colspan += rc.colspan; this.node.setAttribute('colspan', this.colspan); + var table = this.toTableArray(); + this.updateWidths(table); }, @@ -49542,6 +49537,9 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { }, updateWidths : function(table) { + console.log("htmleditor.BlockTd updateWidths"); + console.log("TABLE"); + console.log(table); for(var r = 0 ; r < table.length; r++) { for(var c = 0 ; c < table[r].length; c++) { @@ -49550,18 +49548,22 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { } 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(this.colWidths); if (this.colWidths[0] === false) { var nw = 100.0 / this.colWidths.length; @@ -49608,9 +49610,7 @@ Roo.extend(Roo.htmleditor.BlockTd, Roo.htmleditor.Block, { 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;