diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-09-16 11:03:50 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-09-16 11:03:50 +0200 |
| commit | f4fc3985b6b8857e573b8aea35986cf1dfd552de (patch) | |
| tree | 9d44d633b6d71472fdfb4d491d1e89a8a506dc31 /addons/website/static/src | |
| parent | d4b878af534d8770794664f560ba2268d4fa373d (diff) | |
| parent | 10cde43fd4c0f85e86c21a15dcd3f39e10c87d96 (diff) | |
[MERGE] forward port branch saas-12 up to 10cde43
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/js/website.snippets.gallery.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/addons/website/static/src/js/website.snippets.gallery.js b/addons/website/static/src/js/website.snippets.gallery.js index ed1293229b8..481ba06e6f3 100644 --- a/addons/website/static/src/js/website.snippets.gallery.js +++ b/addons/website/static/src/js/website.snippets.gallery.js @@ -354,18 +354,12 @@ options.registry.gallery_img = options.Class.extend({ editor.reapply(); },0); }, - remove: function (type) { - if (type !== "click") return; - - var self = this; + on_remove: function () { var $parent = snippet_editor.globalSelector.closest(this.$target.parent()); - this.buildingBlock.make_active(false); - this.$target.remove(); - setTimeout(function () { - self.buildingBlock.make_active($parent); - var gallery = $parent.data('snippet-editor').styles.gallery; - gallery.reapply(); - }, 0); + _.defer((function () { + this.buildingBlock.make_active($parent); + $parent.data('snippet-editor').styles.gallery.reapply(); + }).bind(this)); } }); |
