[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
This commit is contained in:
Benjamin Vray
2020-09-11 16:31:52 +00:00
committed by Jeremy Kersten
parent c38e241601
commit 4afa019dec
@@ -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();
},