summaryrefslogtreecommitdiff
path: root/addons
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
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')
-rw-r--r--addons/web/static/src/scss/form_view.scss4
-rw-r--r--addons/website_mass_mailing/i18n/website_mass_mailing.pot8
-rw-r--r--addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js14
3 files changed, 26 insertions, 0 deletions
diff --git a/addons/web/static/src/scss/form_view.scss b/addons/web/static/src/scss/form_view.scss
index e283f9d1965..08b1d916d8d 100644
--- a/addons/web/static/src/scss/form_view.scss
+++ b/addons/web/static/src/scss/form_view.scss
@@ -615,6 +615,10 @@
padding-right: 25px;
}
}
+ iframe.wysiwyg_iframe + .o_field_translate {
+ right: 30px !important;
+ top: 7px !important;
+ }
// Text field with oe_inline class
.o_field_text.oe_inline {
diff --git a/addons/website_mass_mailing/i18n/website_mass_mailing.pot b/addons/website_mass_mailing/i18n/website_mass_mailing.pot
index 31436db09b2..2ca44488740 100644
--- a/addons/website_mass_mailing/i18n/website_mass_mailing.pot
+++ b/addons/website_mass_mailing/i18n/website_mass_mailing.pot
@@ -185,6 +185,14 @@ msgid "Website popups"
msgstr ""
#. module: website_mass_mailing
+#. openerp-web
+#: code:addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js:0
+#, python-format
+msgid ""
+"Website popups can only be translated through mailing list configuration in the Email Marketing app."
+msgstr ""
+
+#. module: website_mass_mailing
#: model_terms:ir.ui.view,arch_db:website_mass_mailing.s_newsletter_subscribe_form
msgid "your email..."
msgstr ""
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);
+ },
+});
+
});