diff options
Diffstat (limited to 'addons/web_editor/static')
| -rw-r--r-- | addons/web_editor/static/src/js/snippets.editor.js | 5 | ||||
| -rw-r--r-- | addons/web_editor/static/src/xml/snippets.xml | 2 |
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> |
