diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-01-14 14:06:23 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-01-16 16:38:09 +0100 |
| commit | db9b7bc8256b17ea1adda3b832d7654abccc00df (patch) | |
| tree | 0541b1b24214e2c6a2840146a0f9c8769638de35 /addons/website/static/src/js | |
| parent | e42995b6146f364cdd06ea855cf18925336e0f84 (diff) | |
[FIX] website: Selector for the image and table-handlers are still there even if we've deleted the snippet
Diffstat (limited to 'addons/website/static/src/js')
| -rw-r--r-- | addons/website/static/src/js/website.snippets.editor.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index 068893492bd..a1e010a3bcd 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -1944,16 +1944,19 @@ } }, - on_clone: function () { + on_clone: function (event) { + event.preventDefault(); var $clone = this.$target.clone(false); this.$target.after($clone); for (var i in this.styles){ this.styles[i].on_clone($clone); } + this.BuildingBlock.create_overlay(this.$target); return false; }, - on_remove: function () { + on_remove: function (event) { + event.preventDefault(); this.on_blur(); this.BuildingBlock.parent.rte.historyRecordUndo(this.$target); @@ -1977,6 +1980,10 @@ } } + // clean editor if they are image or table in deleted content + $(".note-control-selection").hide(); + $('.o_table_handler').remove(); + return false; }, |
