[FIX] website: update gallery snippet thumbnails once an image is changed

This commit is contained in:
qsm-odoo
2016-11-03 09:57:22 +01:00
parent d632236c9c
commit a545eb3919
@@ -367,7 +367,16 @@ options.registry.gallery_img = options.Class.extend({
var gallery = $parent.data('snippet-editor').styles.gallery;
gallery.reapply();
}, 0);
}
},
on_focus: function () {
this._super.apply(this, arguments);
if (this._current_src && this._current_src !== this.$target.attr("src")) {
_.defer((function () {
snippet_editor.globalSelector.closest(this.$target.parent()).data('snippet-editor').styles.gallery.reapply();
}).bind(this));
}
this._current_src = this.$target.attr("src");
},
});