[FIX] web_editor: reintroduce request_editable event
The commit fixes the display of custom colors in the color picker. It improves previous fix from #72294, which was not returning all editables from the editor, thus only the custom colors of the target were displayed. For that the request_editable event is reintroduced at the SnippetsMenu level. Part of https://github.com/odoo/odoo/pull/72978 task-2476601 X-original-commit: 68d7d42cce012269342e18373a30970e2c582ba3
This commit is contained in:
@@ -1091,6 +1091,7 @@ var SnippetsMenu = Widget.extend({
|
||||
'user_value_widget_opening': '_onUserValueWidgetOpening',
|
||||
'user_value_widget_closing': '_onUserValueWidgetClosing',
|
||||
'reload_snippet_template': '_onReloadSnippetTemplate',
|
||||
'request_editable': '_onRequestEditable',
|
||||
},
|
||||
// enum of the SnippetsMenu's tabs.
|
||||
tabs: {
|
||||
@@ -3052,6 +3053,13 @@ var SnippetsMenu = Widget.extend({
|
||||
_onRedo: async function() {
|
||||
this.options.wysiwyg.redo();
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @param {OdooEvent} ev
|
||||
*/
|
||||
_onRequestEditable: function (ev) {
|
||||
ev.data.callback($(this.options.wysiwyg.odooEditor.editable));
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user