497e953d671e31389ffb69f9a156b441c6bf32a2
When we start dragging an element with an open mega menu, the dropzones should only appear: - inside the mega menu: we therefore should not be able to drop a mega menu element outside of it. - after the clone of the element, so we can still drop it where we started the drag (if it does not come from the mega menu). This is well the case for normal dropzones but the grid dropzones case was forgotten. Some "clone dropzones" are also not added for inner contents that are in a grid mode snippet. Steps to reproduce: 1) - Add a mega menu with the menu editor. - In edit mode, drop the "Text-Image" snippet and toggle the grid mode. - Open the mega menu and start dragging one of its columns (note that it toggles the grid mode). => A grid dropzone appeared in the "Text-Image" snippet, outside the mega menu. 2) - Drop an "Alert" snippet in "Text-Image". - Open the mega menu. - Start dragging the "Alert" snippet. => No dropzone appeared where we started the drag (so after the clone). This commit fixes these issues. The first issue is solved by properly filtering the `selectorGrids` when a modal or a dropdown (so the mega menu) is open. They were already filtered for the modal case (see commit [1] which was then refactored in [2]) but it should have been done in `_activateInsertionZones` at the already dedicated place, instead of before the call to this function in `_onDragAndDropStart`. This made the siblings and children selectors filtering redundant and this code was therefore removed. The second issue was happening because the "clone dropzone" was only added if there was no "closest" grid, instead of only checking the parent. This therefore prevented it for inner contents inside grid items instead of only for grid items. This commit fixes that. For the case where we are dragging a grid item (still with an open mega menu), a grid dropzone is added. [1]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec [2]: https://github.com/odoo/odoo/commit/34b534f75dbf3e4c475ca8cc40c8fafde5dbea5d task-3594979 closes odoo/odoo#146714 X-original-commit: 8eebef20de144fe223feace39546d827a0952b23 Signed-off-by: Robin Lejeune (role) <role@odoo.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%