diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-04-05 18:46:10 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-04-05 18:46:10 +0200 |
| commit | 3f95b074e959f0f4ac93fbf4048c0c7276f2c17a (patch) | |
| tree | f4e793da5d83bcd1bd4347f71cb3f45cbc953df3 /addons/mail/static/src/js | |
| parent | 1a871d72438c731d08ef10e668b81b4ade900b85 (diff) | |
| parent | f2be461f0906ed47306da58c31240014b6239d80 (diff) | |
[MERGE] forward port branch saas-12.2 up to f2be461f090
Diffstat (limited to 'addons/mail/static/src/js')
| -rw-r--r-- | addons/mail/static/src/js/document_viewer.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/mail/static/src/js/document_viewer.js b/addons/mail/static/src/js/document_viewer.js index fc084b48204..be7dfeb9115 100644 --- a/addons/mail/static/src/js/document_viewer.js +++ b/addons/mail/static/src/js/document_viewer.js @@ -44,11 +44,10 @@ var DocumentViewer = Widget.extend({ this._super.apply(this, arguments); this.attachment = _.filter(attachments, function (attachment) { var match = attachment.type === 'url' ? attachment.url.match("(youtu|.png|.jpg|.gif)") : attachment.mimetype.match("(image|video|application/pdf|text)"); - if (match) { - attachment.type = match[1]; + attachment.fileType = match[1]; if (match[1].match("(.png|.jpg|.gif)")) { - attachment.type = 'image'; + attachment.fileType = 'image'; } if (match[1] === 'youtu') { var youtube_array = attachment.url.split('/'); |
