diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-05-09 15:45:20 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-05-09 15:45:20 +0200 |
| commit | 5a751fa20091fc38b6d9032c1d8504adc3f0a394 (patch) | |
| tree | efc44792d39d7e1c1f74d15ae740718d22a62e21 /addons/web_editor/static/src | |
| parent | cca15358b655a93205e07ca66025643dd57269ab (diff) | |
| parent | aae54ecc159d109a044fbaa8151f1104897f2203 (diff) | |
[MERGE] forward port branch saas-11.2 up to aae54ecc159
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/backend/fields.js | 4 | ||||
| -rw-r--r-- | addons/web_editor/static/src/js/editor/rte.summernote.js | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js index 479a26469a3..a636b7e5be3 100644 --- a/addons/web_editor/static/src/js/backend/fields.js +++ b/addons/web_editor/static/src/js/backend/fields.js @@ -163,7 +163,7 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi if (fieldNameAttachment) { this.fieldNameAttachment = fieldNameAttachment; this.attachments = []; - summernoteConfig.onImageUpload = this._onImageUpload.bind(this); + summernoteConfig.onUpload = this._onUpload.bind(this); summernoteConfig.getMediaDomain = this._getAttachmentsDomain.bind(this); } @@ -195,7 +195,7 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi * * @private */ - _onImageUpload: function (attachments) { + _onUpload: function (attachments) { var self = this; attachments = _.filter(attachments, function (attachment) { return !_.findWhere(self.attachments, {id: attachment.id}); diff --git a/addons/web_editor/static/src/js/editor/rte.summernote.js b/addons/web_editor/static/src/js/editor/rte.summernote.js index ddf588eb569..3de70e5fcda 100644 --- a/addons/web_editor/static/src/js/editor/rte.summernote.js +++ b/addons/web_editor/static/src/js/editor/rte.summernote.js @@ -397,7 +397,7 @@ eventHandler.modules.imageDialog.showImageDialog = function ($editable) { media: media, options: { lastFilters: ['background'], - onUpload: $editable.data('callbacks').onImageUpload, + onUpload: $editable.data('callbacks').onUpload, }, }); return new $.Deferred().reject(); @@ -675,7 +675,7 @@ function summernote_mousedown(event) { return; } var editables = $(".o_editable[contenteditable], .note-editable[contenteditable]"); - var r_editable = editables.has((r||{}).sc); + var r_editable = editables.has((r||{}).sc).addBack(editables.filter((r||{}).sc)); if (!r_editable.closest('.note-editor').is($editable) && !r_editable.filter('.o_editable').is(editables)) { var saved_editable = editables.has((remember_selection||{}).sc); if ($editable.length && !saved_editable.closest('.o_editable, .note-editor').is($editable)) { |
