summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorYounn Olivier <yol@odoo.com>2021-02-02 11:33:12 +0000
committerYounn Olivier <yol@odoo.com>2021-02-11 15:44:53 +0000
commita291923a95841c8b1ff9d3bb743f3da03a80dedb (patch)
tree3bde5585661e2b3acd5aed8bb4dda954240ca2f0 /addons
parent33561335c55dc0a7586bea24935ec107df24dd89 (diff)
[FIX] website, web_editor : image gallery miniatures are not updated
Description of the task : Make the website ui as consistent as possible by making some layout quick wins. Behaviour before the PR is merged : When changing an image in the image gallery snippet, its miniature is not updated. Desired behaviour after PR is merged : The miniature of an image of the image gallery is updated when the image is changed. The snippet options listens to the 'image_changed' event triggered by the media widget. task-2438556
Diffstat (limited to 'addons')
-rw-r--r--addons/website/static/src/snippets/s_image_gallery/options.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/static/src/snippets/s_image_gallery/options.js b/addons/website/static/src/snippets/s_image_gallery/options.js
index dd9ef5e6206..bc040ebbad3 100644
--- a/addons/website/static/src/snippets/s_image_gallery/options.js
+++ b/addons/website/static/src/snippets/s_image_gallery/options.js
@@ -21,7 +21,7 @@ options.registry.gallery = options.Class.extend({
this.$target.addClass('o_fake_not_editable').attr('contentEditable', false);
// Make sure image previews are updated if images are changed
- this.$target.on('save', 'img', function (ev) {
+ this.$target.on('image_changed', 'img', function (ev) {
var $img = $(ev.currentTarget);
var index = self.$target.find('.carousel-item.active').index();
self.$('.carousel:first li[data-target]:eq(' + index + ')')