[FIX] hr_org_chart: Position subordinate popover with rtl lang

With a Right to Left lang.
Go to an employee form view.
Click on the small pill with the number of subordinates (in the org chart).
The popover opens but on the right side of the window instead of next to the
pill.

Fixes #38722

closes odoo/odoo#38873

X-original-commit: 292d4e7ba6bde6970382c816e092892f64e58c73
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
This commit is contained in:
Lucas Lefèvre
2019-10-16 11:52:23 +00:00
committed by fw-bot
parent 83ab007377
commit f33e7b851d
2 changed files with 13 additions and 1 deletions
@@ -106,7 +106,7 @@ var FieldOrgChart = AbstractField.extend({
'.o_employee_redirect', _.bind(self._onEmployeeRedirect, self));
return $title;
},
container: 'body',
container: this,
placement: 'left',
trigger: 'focus',
content: function () {
@@ -256,6 +256,7 @@
// POP OVER
.o_org_chart_popup.popover {
max-width: 400px;
margin-right: 5px;
.popover-header {
height: 47px;
@@ -280,3 +281,14 @@
margin-bottom: 0;
}
}
// Right to Left specific style to flip the popover arrow
.o_rtl {
.o_org_chart_popup.popover .arrow {
left: 100%;
-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);
-moz-transform: matrix(-1, 0, 0, 1, 0, 0);
-o-transform: matrix(-1, 0, 0, 1, 0, 0);
transform: matrix(-1, 0, 0, 1, 0, 0);
}
}