[FIX] web_editor, *: reorder invisible elements panel at snippet move
*website
Steps to reproduce the bug:
- Add a Cover and a Picture snippet on the website.
- Change their visibility to "Conditionally".
- Change the order of the two snippets on the page either with the drag
and drop tool or with the "move up" or "move down" option.
=> Their order on the "Invisible Elements" panel has not been updated.
The problem is fixed by calling `_updateInvisibleDOM()` at the end of
`moveSnippet()` and `_onSnippetDragAndDropStop()`. Note that before this
commit, all the snippets with a conditional visibility were hidden at
the call of `_onSnippetDragAndDropStop()`. This is due to the call of
`cleanForSave()` from `_destroyEditors()`. `_onSnippetDragAndDropStop()`
has been adapted in order to, as for the "move" option, do not change
the visibility of those elements.
task-3203914
closes odoo/odoo#113549
Signed-off-by:
Dieleman Guillaume (gdi) <gdi@odoo.com>
Showing
- addons/web_editor/static/src/js/editor/snippets.editor.js 27 additions, 0 deletionsaddons/web_editor/static/src/js/editor/snippets.editor.js
- addons/web_editor/static/src/js/editor/snippets.options.js 3 additions, 0 deletionsaddons/web_editor/static/src/js/editor/snippets.options.js
- addons/website/static/tests/tours/conditional_visibility.js 55 additions, 5 deletionsaddons/website/static/tests/tours/conditional_visibility.js
- addons/website/tests/test_ui.py 1 addition, 0 deletionsaddons/website/tests/test_ui.py
Loading
Please register or sign in to comment