用户菜单调整
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
'name': '教育',
|
||||
'version': '18.0.3.0.7',
|
||||
'version': '18.0.3.0.9',
|
||||
'summary': 'Odoo 18 教学管理平台 — 师生管理 + 课程管理 + 作业/进展(老师·学生双角色)',
|
||||
'description': """
|
||||
Odoo 18 教学管理平台(面向老师与学生,双角色权限)
|
||||
@@ -63,6 +63,7 @@
|
||||
'college/static/src/js/hide_activity_menu.js',
|
||||
'college/static/src/js/portal_indicator.js',
|
||||
'college/static/src/xml/portal_indicator.xml',
|
||||
'college/static/src/xml/sidenav_tooltip.xml',
|
||||
],
|
||||
'web.assets_web_dark': [
|
||||
'college/static/src/scss/college_theme_dark.scss',
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
侧边栏窄模式悬浮提示
|
||||
|
||||
背景:udoo_om_ux 的左侧导航栏(.o_sidenav)拖窄/切换到窄模式(宽度 < 142 时
|
||||
加 .sm 类)后,菜单文字 .nav-title 被 display:none 隐藏,只剩图标,
|
||||
而 title 属性恰好在被隐藏的 span 上,导致鼠标悬停看不到任何菜单名提示。
|
||||
|
||||
方案:继承 wub.Sidenav.Item 模板,给 DropdownItem 的 attrs 增加 Odoo 原生
|
||||
data-tooltip(黑色气泡,与系统其他提示一致):
|
||||
- 仅当 ue.sidenavWidth < 142(即窄模式)时输出 data-tooltip;宽模式值为 false
|
||||
(owl 对 t-att 对象里值为 false 的键会省略该属性;注意不能写 null,
|
||||
null 会被渲染成字符串 "null" 出现在气泡里),不干扰展开状态;
|
||||
- tooltip 出现在图标右侧(侧边栏在左,往右弹最自然);想改回下方
|
||||
把 'right' 改成 'bottom' 即可。
|
||||
-->
|
||||
<templates xml:space="preserve">
|
||||
<t t-inherit="wub.Sidenav.Item" t-inherit-mode="extension">
|
||||
<xpath expr="//DropdownItem" position="attributes">
|
||||
<attribute name="attrs">{
|
||||
href: getMenuItemHref(app),
|
||||
'data-menu-xmlid': app.xmlid,
|
||||
'data-section': app.id,
|
||||
'data-tooltip': ue.sidenavWidth < 142 ? (app.label or app.name) : false,
|
||||
'data-tooltip-position': 'right'
|
||||
}</attribute>
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
Reference in New Issue
Block a user