diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2017-11-09 09:56:43 +0100 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2017-11-10 10:30:34 +0100 |
| commit | 1a253d3ae28bb1b230a0c2136b9b741a68b4decc (patch) | |
| tree | 7b0fa46bec94170bac936b885ef1e95aa15d6493 /addons/web_editor/static/src/js/widgets.js | |
| parent | 82add438f21085a799f1d2d86a44d523c4fd2690 (diff) | |
[FIX] web_editor: mediaDialog should trigger change
before this event, when editing an email template from the chatter
by adding an image through the mediaDialog, the message was always empty
if nothing more than the image was present.
this was because the html field was not marked as dirty,
the event responsible for the marking was not triggered.
After this commit, when sending solely an image from the media dialog,
the email sent does contain the image
opw 779167
closes #20817
Diffstat (limited to 'addons/web_editor/static/src/js/widgets.js')
| -rw-r--r-- | addons/web_editor/static/src/js/widgets.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/widgets.js b/addons/web_editor/static/src/js/widgets.js index f924d879e01..0036a0783b7 100644 --- a/addons/web_editor/static/src/js/widgets.js +++ b/addons/web_editor/static/src/js/widgets.js @@ -199,6 +199,7 @@ var MediaDialog = Dialog.extend({ this.final_data = [media, self.old_media]; $(document.body).trigger("media-saved", this.final_data); + $(this.final_data).trigger('input'); // Update editor bar after image edition (in case the image change to icon or other) _.defer(function () { |
