roojs-core.js
[roojs1] / roojs-ui-debug.js
index 7e0ad8e..dd88703 100644 (file)
@@ -24502,8 +24502,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);
@@ -24786,7 +24784,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.
@@ -24822,8 +24819,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'));
@@ -24856,7 +24851,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){
@@ -24931,6 +24925,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');
@@ -24956,6 +24951,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);
     },
     
     
@@ -25048,6 +25045,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++) {
@@ -25056,10 +25056,16 @@ 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
             }
         }
@@ -25112,9 +25118,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;