diff options
| author | Lucas Lefèvre <lul@odoo.com> | 2019-10-15 09:16:08 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-16 11:52:23 +0000 |
| commit | f33e7b851d4598db064bd7cf16a6e4e6aa5e7bac (patch) | |
| tree | 8544743e0e76a9bddeb1263f9145cff4b65dc9cb /addons/hr_org_chart/static | |
| parent | 83ab007377ee06bf31278b388b2e3609e1ea745f (diff) | |
[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>
Diffstat (limited to 'addons/hr_org_chart/static')
| -rw-r--r-- | addons/hr_org_chart/static/src/js/hr_org_chart.js | 2 | ||||
| -rw-r--r-- | addons/hr_org_chart/static/src/scss/hr_org_chart.scss | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/addons/hr_org_chart/static/src/js/hr_org_chart.js b/addons/hr_org_chart/static/src/js/hr_org_chart.js index 688456eae74..085df1faa4a 100644 --- a/addons/hr_org_chart/static/src/js/hr_org_chart.js +++ b/addons/hr_org_chart/static/src/js/hr_org_chart.js @@ -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 () { diff --git a/addons/hr_org_chart/static/src/scss/hr_org_chart.scss b/addons/hr_org_chart/static/src/scss/hr_org_chart.scss index 7449f2adc6a..8c4d9d8960d 100644 --- a/addons/hr_org_chart/static/src/scss/hr_org_chart.scss +++ b/addons/hr_org_chart/static/src/scss/hr_org_chart.scss @@ -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); + } +} |
