[IMP] web: list aggregate tooltip positioning

This commit moves the tooltip from the parent element of the list
aggregate to the value itself to avoid having a tooltip that is
not connected to its intended target (here the tootlip's arrow does
not point at the value at all before this commit).

Task-3106190

closes odoo/odoo#108894

Related: odoo/enterprise#35351
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Damien Bouvy
2023-01-03 09:52:41 +01:00
committed by Aaron Bohy
parent b4388a9206
commit b6f2beb943
2 changed files with 4 additions and 4 deletions
@@ -78,8 +78,8 @@
<td t-if="hasSelectors"/>
<t t-foreach="state.columns" t-as="column" t-key="column.id">
<t t-set="aggregate" t-value="aggregates[column.name]"/>
<td t-if="aggregate" class="o_list_number text-end" t-att-data-tooltip="aggregate.help">
<t t-esc="aggregate.value"/>
<td t-if="aggregate" class="o_list_number text-end" >
<span t-esc="aggregate.value" t-att-data-tooltip="aggregate.help"/>
</td>
<td t-else=""/>
</t>
@@ -3418,7 +3418,7 @@ QUnit.module("Views", (hooks) => {
});
assert.strictEqual(
target.querySelector('td[data-tooltip="Sum"]').innerText,
target.querySelector('span[data-tooltip="Sum"]').innerText,
"32",
"current total should be 32"
);
@@ -3427,7 +3427,7 @@ QUnit.module("Views", (hooks) => {
await editInput(target, "td.o_data_cell input", "15");
assert.strictEqual(
target.querySelector('td[data-tooltip="Sum"]').innerText,
target.querySelector('span[data-tooltip="Sum"]').innerText,
"37",
"current total should be 37"
);