summaryrefslogtreecommitdiff
path: root/addons/web_editor/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/web_editor/static
parentd4b878af534d8770794664f560ba2268d4fa373d (diff)
parent10cde43fd4c0f85e86c21a15dcd3f39e10c87d96 (diff)
[MERGE] forward port branch saas-12 up to 10cde43
Diffstat (limited to 'addons/web_editor/static')
-rw-r--r--addons/web_editor/static/src/js/snippets.editor.js5
-rw-r--r--addons/web_editor/static/src/xml/snippets.xml2
2 files changed, 6 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js
index 4906ab345d0..3fd9bfca2e4 100644
--- a/addons/web_editor/static/src/js/snippets.editor.js
+++ b/addons/web_editor/static/src/js/snippets.editor.js
@@ -287,6 +287,9 @@ data.Class = Widget.extend({
self.make_snippet_draggable(self.$snippets);
this.associate_snippet_names(this.$snippets);
+
+ this.show_blocks();
+ this.$el.on("snippet-dropped snippet-removed", this.show_blocks.bind(this));
},
associate_snippet_names: function ($snippets) {
@@ -1052,6 +1055,8 @@ data.Editor = Class.extend({
$(".note-control-selection").hide();
$('.o_table_handler').remove();
+ this.buildingBlock.$el.trigger("snippet-removed");
+
return false;
},
diff --git a/addons/web_editor/static/src/xml/snippets.xml b/addons/web_editor/static/src/xml/snippets.xml
index 2b9aaf15b32..d9e8c83a495 100644
--- a/addons/web_editor/static/src/xml/snippets.xml
+++ b/addons/web_editor/static/src/xml/snippets.xml
@@ -60,7 +60,7 @@
<!-- t-field options -->
<t t-name="web_editor.many2one.button">
- <div class="dropdown">
+ <div class="btn-group">
<a href="#" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" title="Search Contact"><i class="fa fa-search"></i></a>
<ul class="dropdown-menu contact_menu" role="menu">
<li><a><input href="#" type="email" placeholder="Search"/></a></li>