diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-01-21 16:41:38 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-01-21 16:48:31 +0000 |
| commit | c97f16becebae2f86bb764cb65e49c927ba96300 (patch) | |
| tree | 3d8160cad02eb8925182e477668cac33bf13dc30 /addons/website/static/src/js/menu | |
| parent | 86d26ffb88720ba06261d03c683777d1673e9700 (diff) | |
[FIX] website, *: restore media dialog uses
* web_editor, website_blog
Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
the media dialog was refactored but the code which used it outside of
the editor was not adapted at all. Also, the selected image was not
saved correctly anymore, making the media dialog useless outside the
editor in the current implementation.
- Adapted SEO image uploading and body image background choice which
were not working anymore
- Adapted blog cover choice and gallery snippet which were strangely
still working even though there were sending wrong parameters during
media dialog initialization
closes odoo/odoo#30416
Diffstat (limited to 'addons/website/static/src/js/menu')
| -rw-r--r-- | addons/website/static/src/js/menu/seo.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/website/static/src/js/menu/seo.js b/addons/website/static/src/js/menu/seo.js index 706f219761b..a136d59b628 100644 --- a/addons/website/static/src/js/menu/seo.js +++ b/addons/website/static/src/js/menu/seo.js @@ -589,12 +589,11 @@ var MetaImageSelector = Widget.extend({ var mediaDialog = new weWidgets.MediaDialog(this, { onlyImages: true, res_model: 'ir.ui.view', - }, null, $image); + }, $image[0]); mediaDialog.open(); mediaDialog.on('save', this, function (image) { - var src = image.attr('src'); - self.activeMetaImg = src; - self.customImgUrl = src; + self.activeMetaImg = image.src; + self.customImgUrl = image.src; self._updateTemplateBody(); }); }, |
