From 4afa019dec6ce835311e25fb1447a271f2c54543 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Tue, 8 Sep 2020 11:36:07 +0000 Subject: [PATCH] [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 X-original-commit: ab2dacbb844b36793df891a844e89482cf12f14e --- addons/website/static/src/snippets/s_image_gallery/options.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); },