[FIX] test_themes: adapt switcher tooltip format
This adapts the WebsiteSwitcherSystray's DropdownItem tooltips dataset to the changed API brought in the community repository. closes odoo/design-themes#765 Task: 3266145 Related: odoo/enterprise#48452 Related: odoo/odoo#137691 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -18,10 +18,10 @@ patch(WebsiteSwitcherSystray.prototype, {
|
|||||||
const themesWebsites = await this.orm.call('website', 'get_test_themes_websites_theme_preview');
|
const themesWebsites = await this.orm.call('website', 'get_test_themes_websites_theme_preview');
|
||||||
for (const themeId in themesWebsites) {
|
for (const themeId in themesWebsites) {
|
||||||
this.tooltips[themeId] = {
|
this.tooltips[themeId] = {
|
||||||
tooltipTemplate: 'test_themes.ThemeTooltip',
|
"data-tooltip-template": 'test_themes.ThemeTooltip',
|
||||||
tooltipPosition: 'left',
|
"data-tooltip-position": 'left',
|
||||||
tooltipDelay: 100,
|
"data-tooltip-delay": 100,
|
||||||
tooltipInfo: JSON.stringify({url: themesWebsites[themeId]}),
|
"data-tooltip-info": JSON.stringify({url: themesWebsites[themeId]}),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<t t-name="test_themes.WebsiteSwitcherSystray" t-inherit="website.WebsiteSwitcherSystray" t-inherit-mode="extension">
|
<t t-name="test_themes.WebsiteSwitcherSystray" t-inherit="website.WebsiteSwitcherSystray" t-inherit-mode="extension">
|
||||||
<xpath expr="//DropdownItem" position="attributes">
|
<xpath expr="//DropdownItem" position="attributes">
|
||||||
<attribute name="dataset">this.tooltips[element.id]</attribute>
|
<attribute name="attrs">this.tooltips[element.id]</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<!-- With this module installed, disable the warning -->
|
<!-- With this module installed, disable the warning -->
|
||||||
<xpath expr="//DropdownItem/t[@t-if='!element.domain']" position="replace">
|
<xpath expr="//DropdownItem/t[@t-if='!element.domain']" position="replace">
|
||||||
|
|||||||
Reference in New Issue
Block a user