summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/widgets
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2019-01-21 16:41:38 +0000
committerqsm-odoo <qsm@odoo.com>2019-01-21 16:48:31 +0000
commitc97f16becebae2f86bb764cb65e49c927ba96300 (patch)
tree3d8160cad02eb8925182e477668cac33bf13dc30 /addons/website/static/src/js/widgets
parent86d26ffb88720ba06261d03c683777d1673e9700 (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/widgets')
-rw-r--r--addons/website/static/src/js/widgets/theme.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/website/static/src/js/widgets/theme.js b/addons/website/static/src/js/widgets/theme.js
index 7ab043bce4f..7a3ef777232 100644
--- a/addons/website/static/src/js/widgets/theme.js
+++ b/addons/website/static/src/js/widgets/theme.js
@@ -5,7 +5,7 @@ var config = require('web.config');
var core = require('web.core');
var ColorpickerDialog = require('wysiwyg.widgets.ColorpickerDialog');
var Dialog = require('web.Dialog');
-var widgets = require('wysiwyg.widgets');
+var weWidgets = require('wysiwyg.widgets');
var websiteNavbarData = require('website.navbar');
var _t = core._t;
@@ -269,7 +269,10 @@ var ThemeCustomizeDialog = Dialog.extend({
var def = $.Deferred();
var $image = $('<img/>');
- var editor = new widgets.MediaDialog(this, {onlyImages: true, firstFilters: ['background']}, null, $image[0]);
+ var editor = new weWidgets.MediaDialog(this, {
+ onlyImages: true,
+ firstFilters: ['background'],
+ }, $image[0]);
editor.on('save', this, function (media) { // TODO use scss customization instead (like for user colors)
var src = $(media).attr('src');