-
- Downloads
[FIX] website: not move images twice within image wall
Since [1] the "Images Add/Remove All" buttons are on top of the background options in order to appear as the first option for the "Image Wall" snippet. This makes the JS related to the handling of the options of that snippet created twice: once for the buttons above and once for the options below. Because of this, events are registered by both instances and they both get notified on option update. Therefore, when an image is moved, it is moved twice instead of once. This commit differentiates both instances, and makes the one that handles the "Add" and "Remove All" buttons be the only one that works on the images. In stable the differentiation is done with conditional statements. In master the instances should be of distinct classes. [1]: https://github.com/odoo/odoo/commit/b6494fcf284edcddaa36b5fcfd407a6d7186fbd7 task-2990053 closes odoo/odoo#110242 Signed-off-by:Guillaume-gdi <gdi@odoo.com>
Showing
- addons/website/static/src/snippets/s_image_gallery/options.js 24 additions, 5 deletions...ns/website/static/src/snippets/s_image_gallery/options.js
- addons/website/static/tests/tours/snippet_images_wall.js 44 additions, 0 deletionsaddons/website/static/tests/tours/snippet_images_wall.js
- addons/website/tests/test_snippets.py 3 additions, 0 deletionsaddons/website/tests/test_snippets.py