[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
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -41,6 +41,7 @@ snippet_editor.Class.include({
|
||||
start: function () {
|
||||
_.defer(function () {
|
||||
var $editable = $('#editable_area');
|
||||
transcoder.linkImgToAttachmentThumbnail($editable);
|
||||
transcoder.imgToFont($editable);
|
||||
transcoder.styleToClass($editable);
|
||||
|
||||
@@ -53,7 +54,7 @@ snippet_editor.Class.include({
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
var $editable = $('#editable_area');
|
||||
transcoder.linkImgToAttachmentThumbnail($editable);
|
||||
transcoder.attachmentThumbnailToLinkImg($editable);
|
||||
transcoder.fontToImg($editable);
|
||||
transcoder.classToStyle($editable);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user