diff options
| author | Benjamin Vray <bvr@odoo.com> | 2020-09-08 11:36:07 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2020-09-10 21:12:08 +0000 |
| commit | ab2dacbb844b36793df891a844e89482cf12f14e (patch) | |
| tree | b3175667accb9d7b304df2ff8c2e25e4e9b94800 | |
| parent | 3385cad238a4e242e7d58827066498f07b8c626f (diff) | |
[FIX] website: image gallery do not open the media dialog if not empty
Do not auto open the media dialog after the drop if there are images in
snippets images wall and images gallery.
task-2312878
| -rw-r--r-- | addons/website/static/src/snippets/s_image_gallery/options.js | 4 |
1 files changed, 3 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 9b8683d59d0..dd9ef5e6206 100644 --- a/addons/website/static/src/snippets/s_image_gallery/options.js +++ b/addons/website/static/src/snippets/s_image_gallery/options.js @@ -57,7 +57,9 @@ options.registry.gallery = options.Class.extend({ * @override */ onBuilt: function () { - this.addImages(false); + if (this.$target.find('.o_add_images').length) { + this.addImages(false); + } // TODO should consider the async parts this._adaptNavigationIDs(); }, |
