[REF] web_editor, website_forum: remove unused wysiwyg options

Some instance options of Summernote remained in the code after replacing
Summernote with Odoo-Editor. This removes them as they effectively did
nothing.
This commit is contained in:
Antoine Guenet
2021-04-02 09:43:39 +00:00
parent 00953e8704
commit 82ba0ce081
2 changed files with 3 additions and 26 deletions
@@ -31,24 +31,9 @@ const Wysiwyg = Widget.extend({
xmlDependencies: [
],
defaultOptions: {
'focus': false,
'toolbar': [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'clear']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture']],
['history', ['undo', 'redo']],
],
'styleWithSpan': false,
'inlinemedia': ['p'],
'lang': 'odoo',
'colors': customColors,
recordInfo: {
context: {},
},
lang: 'odoo',
colors: customColors,
recordInfo: {context: {}},
},
init: function (parent, options) {
this._super.apply(this, arguments);
@@ -1022,10 +1007,6 @@ const Wysiwyg = Widget.extend({
_editorOptions: function () {
var self = this;
var options = Object.assign({}, this.defaultOptions, this.options);
if (this.options.generateOptions) {
options = this.options.generateOptions(options);
}
options.airPopover = options.toolbar;
options.onChange = function (html, $editable) {
$editable.trigger('content_changed');
self.trigger_up('wysiwyg_change');
@@ -124,16 +124,12 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({
var hasFullEdit = parseInt($("#karma").val()) >= editorKarma;
var options = {
height: 200,
minHeight: 80,
toolbarTemplate: 'website_forum.web_editor_toolbar',
styleWithSpan: false,
recordInfo: {
context: self._getContext(),
res_model: 'forum.post',
res_id: +window.location.pathname.split('-').pop(),
},
disableFullMediaDialog: true,
resizable: true,
};
if (!hasFullEdit) {