diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index 6a4eaaf569..d350081c0b 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -2578,16 +2578,16 @@ define([ var menuTableDistRows = new Common.UI.MenuItem({ caption : me.textDistributeRows }).on('click', _.bind(function(){ - // if (me.api) - // me.api.distributeCols(); + if (me.api) + me.api.asc_DistributeTableCells(false); me.fireEvent('editcomplete', me); }, me)); var menuTableDistCols = new Common.UI.MenuItem({ caption : me.textDistributeCols }).on('click', _.bind(function(){ - // if (me.api) - // me.api.distributeCols(); + if (me.api) + me.api.asc_DistributeTableCells(true); me.fireEvent('editcomplete', me); }, me)); diff --git a/apps/documenteditor/main/app/view/TableSettings.js b/apps/documenteditor/main/app/view/TableSettings.js index 4f0d26c39c..ad72179a51 100644 --- a/apps/documenteditor/main/app/view/TableSettings.js +++ b/apps/documenteditor/main/app/view/TableSettings.js @@ -401,14 +401,16 @@ define([ el: $('#table-btn-distrub-rows') }); this.lockedControls.push(this.btnDistributeRows); - this.btnDistributeRows.on('click', _.bind(function(field, newValue, oldValue, eOpts){ + this.btnDistributeRows.on('click', _.bind(function(btn){ + this.api.asc_DistributeTableCells(false); }, this)); this.btnDistributeCols = new Common.UI.Button({ el: $('#table-btn-distrub-cols') }); this.lockedControls.push(this.btnDistributeCols); - this.btnDistributeCols.on('click', _.bind(function(field, newValue, oldValue, eOpts){ + this.btnDistributeCols.on('click', _.bind(function(btn){ + this.api.asc_DistributeTableCells(true); }, this)); this.linkAdvanced = $('#table-advanced-link');