diff --git a/addons/web/static/src/core/debug/debug_menu.js b/addons/web/static/src/core/debug/debug_menu.js
index dbdccf2c459..e103475e9ed 100644
--- a/addons/web/static/src/core/debug/debug_menu.js
+++ b/addons/web/static/src/core/debug/debug_menu.js
@@ -69,12 +69,6 @@ export class DebugMenu extends Component {
ev.detail.payload.callback();
}
}
-
- onClickOnTagA(ev) {
- if (!ev.ctrlKey) {
- ev.preventDefault();
- }
- }
}
DebugMenu.template = "web.DebugMenu";
diff --git a/addons/web/static/src/core/debug/debug_menu.xml b/addons/web/static/src/core/debug/debug_menu.xml
index 7abfb4c5d14..3c383283ea3 100644
--- a/addons/web/static/src/core/debug/debug_menu.xml
+++ b/addons/web/static/src/core/debug/debug_menu.xml
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/addons/web/static/src/core/dropdown/dropdown.js b/addons/web/static/src/core/dropdown/dropdown.js
index 5fde9645181..f41b3ab42fa 100644
--- a/addons/web/static/src/core/dropdown/dropdown.js
+++ b/addons/web/static/src/core/dropdown/dropdown.js
@@ -302,6 +302,10 @@ Dropdown.props = {
type: Function,
optional: true,
},
+ tag: {
+ type: String,
+ optional: true,
+ },
togglerClass: {
type: String,
optional: true,
diff --git a/addons/web/static/src/core/dropdown/dropdown.scss b/addons/web/static/src/core/dropdown/dropdown.scss
index 190a2b22c7b..628c846b6b6 100644
--- a/addons/web/static/src/core/dropdown/dropdown.scss
+++ b/addons/web/static/src/core/dropdown/dropdown.scss
@@ -26,6 +26,9 @@
@extend .dropdown-item.active;
}
+}
+
+.dropdown-menu .dropdown-item {
// Using tags inside a '.dropdown-item' elements should not be necessary
// since the class in usually applied to the tag itself.
// The following rules will handle custom layouts needs (eg '.o_user_menu').
@@ -80,6 +83,14 @@
&_item {
@extend .dropdown-item;
+ // we want the dropdownitem first child to define its own padding
+ // because it can be an
+ padding: 0;
+ > *:first-child {
+ padding: $dropdown-item-padding-y $dropdown-item-padding-x;
+ display: flex;
+ }
+
&.o_dropdown_active {
@extend .dropdown-item:hover;
}
diff --git a/addons/web/static/src/core/dropdown/dropdown.xml b/addons/web/static/src/core/dropdown/dropdown.xml
index 5027db86d66..f2b8d4d4fdf 100644
--- a/addons/web/static/src/core/dropdown/dropdown.xml
+++ b/addons/web/static/src/core/dropdown/dropdown.xml
@@ -2,7 +2,11 @@
-
+
+
diff --git a/addons/web/static/src/core/dropdown/dropdown_item.xml b/addons/web/static/src/core/dropdown/dropdown_item.xml
index e1b9103e3b7..f1533698cf6 100644
--- a/addons/web/static/src/core/dropdown/dropdown_item.xml
+++ b/addons/web/static/src/core/dropdown/dropdown_item.xml
@@ -2,10 +2,13 @@
-
-
-
-
+
+
diff --git a/addons/web/static/src/legacy/scss/navbar.scss b/addons/web/static/src/legacy/scss/navbar.scss
index b946ef19d76..220e17c6f3b 100644
--- a/addons/web/static/src/legacy/scss/navbar.scss
+++ b/addons/web/static/src/legacy/scss/navbar.scss
@@ -93,6 +93,12 @@
}
}
+ .o_nav_entry {
+ padding: 0;
+ @extend %-main-navbar-entry-base;
+ @extend %-main-navbar-entry-padding;
+ }
+
.o_dropdown .o_dropdown_menu, .dropdown-menu {
margin-top: 0;
border-top: 0;
@@ -100,7 +106,9 @@
}
.o_dropdown_menu_group_entry {
- padding-left: $o-dropdown-hpadding * 1.5;
+ > *:first-child {
+ padding-left: $o-dropdown-hpadding * 1.5;
+ }
+ .o_dropdown_item:not(.o_dropdown_menu_group_entry) {
margin-top: .8em;
@@ -150,7 +158,7 @@
font-weight: $-backend-font-weight-bold;
@include hover() {
- background-color: transparent;
+ background: none;
}
}
@@ -158,10 +166,6 @@
display: flex;
grid-area: sections;
- > .o_dropdown_item {
- @extend %-main-navbar-entry-padding;
- }
-
.o_more_dropdown_section_group {
padding: $-backend-entry-vpadding $-backend-entry-hpadding;
margin-top: .8em;
diff --git a/addons/web/static/src/webclient/navbar/navbar.js b/addons/web/static/src/webclient/navbar/navbar.js
index d90abd68e7a..73d2aa98de3 100644
--- a/addons/web/static/src/webclient/navbar/navbar.js
+++ b/addons/web/static/src/webclient/navbar/navbar.js
@@ -173,6 +173,14 @@ export class NavBar extends Component {
this.menuService.selectMenu(menu);
}
}
+
+ getMenuItemHref(payload) {
+ const parts = [`menu_id=${payload.id}`];
+ if (payload.action) {
+ parts.push(`action=${payload.action.split(",")[1]}`);
+ }
+ return "#" + parts.join("&");
+ }
}
NavBar.template = "web.NavBar";
NavBar.components = { MenuDropdown, MenuItem };
diff --git a/addons/web/static/src/webclient/navbar/navbar.xml b/addons/web/static/src/webclient/navbar/navbar.xml
index db4e8fa1d07..81564d4794d 100644
--- a/addons/web/static/src/webclient/navbar/navbar.xml
+++ b/addons/web/static/src/webclient/navbar/navbar.xml
@@ -3,19 +3,25 @@
-