summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/snippets.editor.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-09-01 14:12:05 +0200
committerDavid Monjoie <dmo@odoo.com>2015-09-01 15:18:07 +0200
commit0f6b97a6da9e92b1b822a4898ae9f1e32185beb6 (patch)
tree8e4e95103ce012a42a6ff5f003bb7802484260c3 /addons/web_editor/static/src/js/snippets.editor.js
parentbf109373c2f9758902e41c3ae66659bb078b8ec3 (diff)
[FIX] web_editor: clean_for_save is not called for custom snippets because all() not contains all html matched tags
Diffstat (limited to 'addons/web_editor/static/src/js/snippets.editor.js')
-rw-r--r--addons/web_editor/static/src/js/snippets.editor.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js
index 994d88402b3..37f80a95da4 100644
--- a/addons/web_editor/static/src/js/snippets.editor.js
+++ b/addons/web_editor/static/src/js/snippets.editor.js
@@ -172,8 +172,10 @@ var BuildingBlock = Widget.extend({
return false;
});
},
- all: function ($from) {
- return $from ? $from.find(selector) : self.$editable[is_children ? 'find' : 'filter'](selector);
+ all: is_children ? function ($from) {
+ return ($from || self.$editable).find(selector);
+ } : function ($from) {
+ return $from ? $from.find(selector) : self.$editable.filter(selector).add(self.$editable.find(selector));
},
is: function ($from) {
return $from.is(selector);