summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/editor/snippets.options.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-03-05 17:26:04 +0100
committerChristophe Simonis <chs@odoo.com>2019-03-05 17:26:04 +0100
commit3e54704e669441e655b1fe19ee0fa0646cdbf8d5 (patch)
treeacddbce8a7f3868c1bf8f882dc959f63134f40ec /addons/web_editor/static/src/js/editor/snippets.options.js
parent2c495502aa37374f3748d9ff4ab7cf9e8d9a6d6e (diff)
parent27081bf6f5f00ccb39f82ae62d14d428bf1c9223 (diff)
[MERGE] forward port branch 11.0 up to 27081bf6f5f
Diffstat (limited to 'addons/web_editor/static/src/js/editor/snippets.options.js')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.options.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js
index 49285986240..e7580a4aa3b 100644
--- a/addons/web_editor/static/src/js/editor/snippets.options.js
+++ b/addons/web_editor/static/src/js/editor/snippets.options.js
@@ -289,13 +289,11 @@ var SnippetOption = Widget.extend({
.addClass('active');
_processSelectClassElements(this.$el);
- _.each(this.$el.find('.dropdown-menu'), function (group) {
- _processSelectClassElements($(group).children());
- });
- function _processSelectClassElements($elements) {
+ function _processSelectClassElements($el) {
var maxNbClasses = -1;
- $elements.filter('[data-select-class]')
+ $el.find('[data-select-class]')
+ .addBack('[data-select-class]')
.removeClass('active')
.filter(function () {
var className = $(this).data('selectClass');