summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2020-09-02 16:12:38 +0000
committerJeremy Kersten <jke@odoo.com>2020-09-10 21:12:08 +0000
commit7b0a147cd43e8e890ebe5a882292a69a5c8c90ac (patch)
treee4d30e0f447b1d5312533ac95e6cf07945fe174c /addons/web_editor/static/src
parent24bd2e805e730b6b8d62c4698686588183d4cdaf (diff)
[IMP] website: add data-option-name att to define class
OptionId was previously based on data-js name. But if an option has no js the classname was snippet-option-undefined, now we fallback on data-option-name to have a right name, and be easily selectable by theme tour.
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.editor.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js
index 45139bb00fe..6941c7a8fdb 100644
--- a/addons/web_editor/static/src/js/editor/snippets.editor.js
+++ b/addons/web_editor/static/src/js/editor/snippets.editor.js
@@ -1552,7 +1552,7 @@ var SnippetsMenu = Widget.extend({
var exclude = $style.data('exclude') || '';
var target = $style.data('target');
var noCheck = $style.data('no-check');
- var optionID = $style.data('js');
+ var optionID = $style.data('js') || $style.data('option-name'); // used in tour js as selector
var option = {
'option': optionID,
'base_selector': selector,