Browse Source

[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/1171/head
Jairo Llopis 6 years ago
parent
commit
7692f52c77
No known key found for this signature in database GPG Key ID: 59564BF1E22F314F
  1. 8
      web_responsive/static/src/xml/apps.xml

8
web_responsive/static/src/xml/apps.xml

@ -4,6 +4,11 @@
<template>
<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}&amp;action_id=#{app.actionID}</attribute>
</t>
<!-- App icons should be more than a text -->
<t t-jquery=".o_app &gt; t" t-operation="replace">
<t t-call="web_responsive.AppIcon"/>
@ -47,8 +52,9 @@
<t t-name="web_responsive.MenuSearchResults">
<t t-foreach="results" t-as="result">
<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-href="#menu_id=#{menu.id}&amp;action_id=#{menu.action_id}"
t-att-data-menu-id="menu.id"
t-att-data-action-id="menu.action_id"
t-att-data-parent-id="menu.parent_id[0]"

Loading…
Cancel
Save