summaryrefslogtreecommitdiff
path: root/addons/web_editor/static
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-09-16 10:34:39 +0200
committerChristophe Simonis <chs@odoo.com>2016-09-16 10:34:39 +0200
commit10cde43fd4c0f85e86c21a15dcd3f39e10c87d96 (patch)
tree3b43edb7855ba1602469fe2d75e9cd81900c19b1 /addons/web_editor/static
parenta4f9c25cf0b16b62d914c6ed3ba80b04d4a7aadc (diff)
parent4c2b5360319c0557b0627d3f3296bc2c20b8e877 (diff)
[MERGE] forward port branch saas-11 up to 4c2b536
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 66789ef635e..5a67b11707d 100644
--- a/addons/web_editor/static/src/js/snippets.editor.js
+++ b/addons/web_editor/static/src/js/snippets.editor.js
@@ -321,6 +321,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) {
@@ -1087,6 +1090,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 f1cb9fc0fed..20a234a1b15 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>