summaryrefslogtreecommitdiff
path: root/addons/website/static
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-09-16 11:03:50 +0200
committerChristophe Simonis <chs@odoo.com>2016-09-16 11:03:50 +0200
commitf4fc3985b6b8857e573b8aea35986cf1dfd552de (patch)
tree9d44d633b6d71472fdfb4d491d1e89a8a506dc31 /addons/website/static
parentd4b878af534d8770794664f560ba2268d4fa373d (diff)
parent10cde43fd4c0f85e86c21a15dcd3f39e10c87d96 (diff)
[MERGE] forward port branch saas-12 up to 10cde43
Diffstat (limited to 'addons/website/static')
-rw-r--r--addons/website/static/src/js/website.snippets.gallery.js16
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));
}
});