summaryrefslogtreecommitdiff
path: root/addons/website
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
parentd4b878af534d8770794664f560ba2268d4fa373d (diff)
parent10cde43fd4c0f85e86c21a15dcd3f39e10c87d96 (diff)
[MERGE] forward port branch saas-12 up to 10cde43
Diffstat (limited to 'addons/website')
-rw-r--r--addons/website/static/src/js/website.snippets.gallery.js16
-rw-r--r--addons/website/views/snippets.xml1
2 files changed, 5 insertions, 12 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));
}
});
diff --git a/addons/website/views/snippets.xml b/addons/website/views/snippets.xml
index 10de2c6ae18..95ec8613786 100644
--- a/addons/website/views/snippets.xml
+++ b/addons/website/views/snippets.xml
@@ -775,7 +775,6 @@
<li data-position="last"><a href="#">Move to last</a></li>
</ul>
</li>
- <li data-remove="remove"><a href="#"><i class="fa fa-trash-o"/>Remove from gallery</a></li>
</div>
<div data-js='carousel'