summaryrefslogtreecommitdiff
path: root/addons/website_mass_mailing/static
diff options
context:
space:
mode:
authorjerome hanke (jhk) <jhk@odoo.com>2020-06-24 09:15:36 +0000
committerNicolas Lempereur <nle@odoo.com>2020-07-02 13:03:31 +0000
commitf29f7c63ae59e561b7a1ba04e5a356ff8f787041 (patch)
tree0a8384a6c34e7301f06fd8a4977dfcdf59c1b26b /addons/website_mass_mailing/static
parentb93e9780de2418fc9903a90c3380c0f3204d827c (diff)
[FIX] website_mass_mailing: editing the newsletter warning banner in the translation web editor
Steps to reproduce: - install website, website_mass_mailing - go to website, edit and add a popup window (you should see warning banner stating that a newsletter popup is present on this window). Save. - go to settings > languages > load a new language (fr_FR for example) and translate the website - go back to the website > select the new language > click the TRANSLATE button Previous behavior: the warning banner is not editable, also click the "Edit popup" button does nothing Current behavior: clicking the "Edit popup" button triggers an alert with a quick explanatory text opw-2280188 closes odoo/odoo#53988 X-original-commit: af57e4924dbd432f9362881dae71d2a4e4595a1f Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/website_mass_mailing/static')
-rw-r--r--addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js b/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js
index 167cd17e9d8..5a46b980e6c 100644
--- a/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js
+++ b/addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js
@@ -4,6 +4,7 @@ odoo.define('website_mass_mailing.editor', function (require) {
var core = require('web.core');
var rpc = require('web.rpc');
var WysiwygMultizone = require('web_editor.wysiwyg.multizone');
+var WysiwygTranslate = require('web_editor.wysiwyg.multizone.translate');
var options = require('web_editor.snippets.options');
var wUtils = require('website.utils');
@@ -199,4 +200,17 @@ WysiwygMultizone.include({
return Promise.all(defs);
},
});
+
+WysiwygTranslate.include({
+ /**
+ * @override
+ */
+ start: function () {
+ this.$target.on('click.newsletter_popup_option', '.o_edit_popup', function (ev) {
+ alert(_t('Website popups can only be translated through mailing list configuration in the Email Marketing app.'));
+ });
+ this._super.apply(this, arguments);
+ },
+});
+
});