[FIX] website, *: keep logged user buttons outside the autohide menu
*: portal The dividers were removed with the new header templates but we still needed them to know which items do not need to be folded in the auto-hide menu. Instead of adding these dividers again, we added a new class for these elements. part-of: #59640 task-2312878 closes odoo/odoo#59804 X-original-commit: 59584974aa891b1182164adac3d3563d882bcfd7 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
|
||||
<template id="user_dropdown" name="Portal User Dropdown">
|
||||
<t t-set="is_connected" t-value="not user_id._is_public()"/>
|
||||
<li t-if="is_connected" t-attf-class="#{_item_class}">
|
||||
<li t-if="is_connected" t-attf-class="#{_item_class} o_no_autohide_item">
|
||||
<a href="#" role="button" data-toggle="dropdown" t-attf-class="dropdown-toggle #{_link_class}">
|
||||
<img t-if="_avatar" t-att-src="image_data_uri(user_id.image_256)" t-attf-class="rounded-circle #{_avatar_class}" width="24" height="24" alt="" loading="eager"/>
|
||||
<i t-if="_icon" t-attf-class="fa fa-1x fa-fw fa-user-circle-o #{_icon_class}"/>
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
<template id="user_sign_in" name="User Sign In" inherit_id="portal.placeholder_user_sign_in">
|
||||
<xpath expr="." position="inside">
|
||||
<li groups="base.group_public" t-attf-class="#{_item_class}">
|
||||
<li groups="base.group_public" t-attf-class="#{_item_class} o_no_autohide_item">
|
||||
<a t-attf-href="/web/login" t-attf-class="#{_link_class}">Sign in</a>
|
||||
</li>
|
||||
</xpath>
|
||||
|
||||
@@ -441,7 +441,7 @@ publicWidget.registry.autohideMenu = publicWidget.Widget.extend({
|
||||
$window.trigger('resize');
|
||||
});
|
||||
|
||||
dom.initAutoMoreMenu(this.$topMenu, {unfoldable: '.divider, .divider ~ li'});
|
||||
dom.initAutoMoreMenu(this.$topMenu, {unfoldable: '.divider, .divider ~ li, .o_no_autohide_item'});
|
||||
}
|
||||
this.$topMenu.removeClass('o_menu_loading');
|
||||
this.$topMenu.trigger('menu_loaded');
|
||||
|
||||
Reference in New Issue
Block a user