From 533ccf7fb04f3256e7ed621ddb21257685d5f43d Mon Sep 17 00:00:00 2001 From: "Nasreddin Boulif (bon)" Date: Fri, 26 Aug 2022 00:17:50 +0000 Subject: [PATCH] [FIX] web[_editor]: Apply RTL position to translate button Steps to reproduce: - Install Inventory - Open any product - Switch to RTL language - Edit the product - Try to translate field "Internal Note" Issue: Button is not displayed correctly (nearly hidden). Issue also present with wysiwyg or codeview editors. Cause: Applying style `right: 5px` to the button without taking into account if layout direction. Solution: On translate button: - Apply direction left for side-space if RTL, else right. - If wysiwyg is enabled, add it after the buttons in the sidebar. opw-2962790 closes odoo/odoo#99567 X-original-commit: 56f620ff65ca9c1e5d9a64f5280ea16fd469c87d Signed-off-by: David Monjoie (dmo) --- .../static/src/js/mass_mailing_widget.js | 2 +- .../web/static/src/legacy/scss/form_view.scss | 4 ---- .../static/src/js/backend/field_html.js | 21 ++++++++++++------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/addons/mass_mailing/static/src/js/mass_mailing_widget.js b/addons/mass_mailing/static/src/js/mass_mailing_widget.js index 25c52c2309f..a6071d76d6c 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_widget.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_widget.js @@ -171,7 +171,7 @@ var MassMailingFieldHtml = FieldHtml.extend({ if (_t.database.multi_lang && this.record.fields[fieldName].translate && this.res_id) { return $('