diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-09-15 16:33:19 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-09-15 16:47:15 +0200 |
| commit | e634a52cace081edfce324f14228ddb419af0a31 (patch) | |
| tree | af1c856bbd930443cb0126a7e6a0e84187f43238 /addons/web_editor/static/src | |
| parent | 784eaf28dce166d3a75dcbae79339b1676aad01a (diff) | |
[FIX] web_editor: mark snippets which can't be dropped in the page
The system was lost with the editor refactoring which came with saas-10
and commit bf39884a5c95c3f69e94d65e10a4d4eda3726649.
Indeed the show() method of the BuildingBlock class was removed as the
widget is now always showed but the show_blocks() method it called was
not removed (and thus was not called anymore).
As a fix, the show_blocks method is now called again, on snippets
initializations and each time a snippet is dropped or removed.
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/snippets.editor.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js index cd03cb70f6a..51cc5a31615 100644 --- a/addons/web_editor/static/src/js/snippets.editor.js +++ b/addons/web_editor/static/src/js/snippets.editor.js @@ -356,6 +356,9 @@ var BuildingBlock = Widget.extend({ }); self.make_snippet_draggable(self.$snippets); + + this.show_blocks(); + this.$el.on("snippet-dropped snippet-removed", this.show_blocks.bind(this)); }, cover_target: function ($el, $target) { @@ -1074,6 +1077,8 @@ var Editor = Class.extend({ $(".note-control-selection").hide(); $('.o_table_handler').remove(); + this.buildingBlock.$el.trigger("snippet-removed"); + return false; }, |
