diff options
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.js | 5 |
1 files changed, 5 insertions, 0 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 1caa65c2d90..d3365f607ef 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -4706,6 +4706,10 @@ registry.SnippetSave = SnippetOptionWidget.extend({ key: snippetKey, onSuccess: url => thumbnailURL = url, }); + let context; + this.trigger_up('context_get', { + callback: ctx => context = ctx, + }); this.trigger_up('request_save', { reloadEditor: true, onSuccess: async () => { @@ -4725,6 +4729,7 @@ registry.SnippetSave = SnippetOptionWidget.extend({ 'template_key': this.options.snippets, 'snippet_key': snippetKey, 'thumbnail_url': thumbnailURL, + 'context': context, }, }); }, |
