summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/backend/fields.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2018-07-04 13:31:43 +0200
committerChristophe Matthieu <chm@odoo.com>2018-07-11 15:38:59 +0200
commitf83f5322373de97bd9fb3b4c6738e297cadaafa7 (patch)
tree3e6bf0aba16609257f42f6e633b2d3b226c2675b /addons/web_editor/static/src/js/backend/fields.js
parent97dbb8c6af4c6af0622497b276bdfb40ee0a3215 (diff)
[FIX] web_editor: send an image thumbnail for attachment link in mail
Before this fix attachmentThumbnailToLinkImg is not called for style-inline options. The mail received does not have thumbnail and the user can't click on the invisible link. opw-1863659
Diffstat (limited to 'addons/web_editor/static/src/js/backend/fields.js')
-rw-r--r--addons/web_editor/static/src/js/backend/fields.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js
index aae767ba931..8bcb3d034ec 100644
--- a/addons/web_editor/static/src/js/backend/fields.js
+++ b/addons/web_editor/static/src/js/backend/fields.js
@@ -172,9 +172,9 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi
*/
_getValue: function () {
if (this.nodeOptions['style-inline']) {
- transcoder.linkImgToAttachmentThumbnail(this.$content);
- transcoder.classToStyle(this.$content);
+ transcoder.attachmentThumbnailToLinkImg(this.$content);
transcoder.fontToImg(this.$content);
+ transcoder.classToStyle(this.$content);
}
return this.$content.html();
},
@@ -220,6 +220,8 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi
this.$content.trigger('mouseup');
if (this.nodeOptions['style-inline']) {
transcoder.styleToClass(this.$content);
+ transcoder.imgToFont(this.$content);
+ transcoder.linkImgToAttachmentThumbnail(this.$content);
}
// reset the history (otherwise clicking on undo before editing the
// value will empty the editor)