mirror of https://github.com/OCA/web.git
[FIX] web_responsive: Make app icons and search results middle-button-clickable
In the case of app icons, those weren't getting the `href` attribute filled. In the case of search results, those weren't even an `<a>` element. Fixed in both cases to fix https://github.com/OCA/web/issues/1170.pull/2058/head
parent
134a8d20ca
commit
dfe798e7fb
|
@ -4,6 +4,11 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<t t-extend="AppsMenu">
|
<t t-extend="AppsMenu">
|
||||||
|
<!-- App icons must be clickable -->
|
||||||
|
<t t-jquery=".o_app" t-operation="attributes">
|
||||||
|
<attribute name="t-attf-href">#menu_id=#{app.menuID}&action_id=#{app.actionID}</attribute>
|
||||||
|
</t>
|
||||||
|
|
||||||
<!-- App icons should be more than a text -->
|
<!-- App icons should be more than a text -->
|
||||||
<t t-jquery=".o_app > t" t-operation="replace">
|
<t t-jquery=".o_app > t" t-operation="replace">
|
||||||
<t t-call="web_responsive.AppIcon"/>
|
<t t-call="web_responsive.AppIcon"/>
|
||||||
|
@ -47,8 +52,9 @@
|
||||||
<t t-name="web_responsive.MenuSearchResults">
|
<t t-name="web_responsive.MenuSearchResults">
|
||||||
<t t-foreach="results" t-as="result">
|
<t t-foreach="results" t-as="result">
|
||||||
<t t-set="menu" t-value="widget._menuInfo(result.original)"/>
|
<t t-set="menu" t-value="widget._menuInfo(result.original)"/>
|
||||||
<div t-attf-class="o-menu-search-result dropdown-item col-12 ml-auto mr-auto #{result_first ? 'active' : ''}"
|
<a t-attf-class="o-menu-search-result dropdown-item col-12 ml-auto mr-auto #{result_first ? 'active' : ''}"
|
||||||
t-attf-style="background-image:url('data:image/png;base64,#{menu.web_icon_data}')"
|
t-attf-style="background-image:url('data:image/png;base64,#{menu.web_icon_data}')"
|
||||||
|
t-attf-href="#menu_id=#{menu.id}&action_id=#{menu.action_id}"
|
||||||
t-att-data-menu-id="menu.id"
|
t-att-data-menu-id="menu.id"
|
||||||
t-att-data-action-id="menu.action_id"
|
t-att-data-action-id="menu.action_id"
|
||||||
t-att-data-parent-id="menu.parent_id[0]"
|
t-att-data-parent-id="menu.parent_id[0]"
|
||||||
|
|
Loading…
Reference in New Issue