diff options
| author | Romain Derie <rde@odoo.com> | 2020-10-23 13:49:41 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2020-11-12 12:51:26 +0000 |
| commit | c134a79f7e413e06642e96f2d3b4e7b5419e2be7 (patch) | |
| tree | 5a421193b07ae781024a953bfc6d78b2a3117ed3 /addons | |
| parent | ef1a02626c7d4d1e89d76e80b0275a01e15562dd (diff) | |
[FIX] website_rating: display correct title and tooltip on star
Title and tooltip had no sense since every star would have its own tooltip
"One star" instead of having a single tooltip on the whole star container which
could show the exact rating "5 stars on 5".
Plus, one of the title were set on a t-foreach which does nothing.
Closes #51743
task-2369420
closes odoo/odoo#61669
X-original-commit: 6ef7d6fd8474cbf9685bf8e8c3520233c1403cfd
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/portal_rating/static/src/xml/portal_tools.xml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/portal_rating/static/src/xml/portal_tools.xml b/addons/portal_rating/static/src/xml/portal_tools.xml index 9da95b2fc5b..9f314360a26 100644 --- a/addons/portal_rating/static/src/xml/portal_tools.xml +++ b/addons/portal_rating/static/src/xml/portal_tools.xml @@ -4,15 +4,15 @@ <t t-set="val_integer" t-value="Math.floor(val)"/> <t t-set="val_decimal" t-value="val - val_integer"/> <t t-set="empty_star" t-value="5 - (val_integer+Math.ceil(val_decimal))"/> - <div class="o_website_rating_static" t-att-style="inline_mode ? 'display:inline' : ''"> + <div class="o_website_rating_static" t-att-style="inline_mode ? 'display:inline' : ''" t-attf-aria-label="#{val} stars on 5" t-attf-title="#{val} stars on 5"> <t t-foreach="_.range(0, val_integer)" t-as="num"> - <i class="fa fa-star" role="img" aria-label="One star" title="One star"></i> + <i class="fa fa-star" role="img"></i> </t> <t t-if="val_decimal"> - <i class="fa fa-star-half-o" role="img" aria-label="Half a star" title="Half a star"></i> + <i class="fa fa-star-half-o" role="img"></i> </t> - <t t-foreach="_.range(0, empty_star)" t-as="num" role="img" t-attf-aria-label="#{empty_star} on 5" t-attf-title="#{empty_star} on 5"> - <i class="fa fa-star text-black-25"></i> + <t t-foreach="_.range(0, empty_star)" t-as="num"> + <i class="fa fa-star text-black-25" role="img"></i> </t> </div> </t> |
