[IMP] web_editor: remove the temporary fix for the history of the grids

Since the merge of [1], the undo/redo of a resizing is made in one go
and not in multiple steps. The row count of the grids are therefore
correctly updated at each undo/redo operation.

This commit removes the temporary fix made in [2] to always have the
correct row count when undoing/redoing, as it is not necessary anymore.

[1]: https://github.com/odoo/odoo/commit/423f4bd2a6cc47e69699d2437eaa5acda94bb98d
[2]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec

task-2973198

X-original-commit: 43d2e588c93b3dc5750eae564c7296159f40c413
Part-of: odoo/odoo#102525
This commit is contained in:
Soukéina Bojabza
2022-10-06 23:14:42 +02:00
committed by qsm-odoo
parent c677040ded
commit ae8a5dc330
@@ -4050,24 +4050,12 @@ var SnippetsMenu = Widget.extend({
*/
_onUndo: async function () {
this.options.wysiwyg.undo();
// Resizing all the grids.
// TODO maybe to remove when history will be fixed.
const $gridModeRows = this.getEditableArea().find('.row.o_grid_mode');
for (const rowEl of $gridModeRows) {
gridUtils._resizeGrid(rowEl);
}
},
/**
* Redo.
*/
_onRedo: async function () {
this.options.wysiwyg.redo();
// Resizing all the grids.
// TODO maybe to remove when history will be fixed.
const $gridModeRows = this.getEditableArea().find('.row.o_grid_mode');
for (const rowEl of $gridModeRows) {
gridUtils._resizeGrid(rowEl);
}
},
/**
* @private