[FIX] website_event: restore edit menu choice
Website has a behavior that will ask you which menu you want to edit if you
click on 'Edit Menu' in the topbar and there is more than one menu in the DOM.
This is typically the case for the event pages where the event has its own menu
on top of the website one.
This event menu was not triggering that behavior since 5b563549fa where is
was accidentally broken.
closes odoo/odoo#48459
X-original-commit: 5c3c91e4a8da7b7b9f5e05f9c0ec5a6dea782d87
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
This commit is contained in:
@@ -509,7 +509,8 @@ var SelectEditMenuDialog = weWidgets.Dialog.extend({
|
||||
var self = this;
|
||||
self.roots = [{id: null, name: _t("Top Menu")}];
|
||||
$('[data-content_menu_id]').each(function () {
|
||||
self.roots.push({id: $(this).data('content_menu_id'), name: $(this).attr('name')});
|
||||
// Remove name fallback in master
|
||||
self.roots.push({id: $(this).data('content_menu_id'), name: $(this).attr('name') || $(this).data('menu_name')});
|
||||
});
|
||||
this._super(parent, _.extend({}, {
|
||||
title: _t("Select a Menu"),
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div id="o_wevent_event_submenu" class="collapse navbar-collapse">
|
||||
<ul class="navbar-nav w-100">
|
||||
<ul class="navbar-nav w-100" t-att-data-menu_name="editable and 'Event Menu'" t-att-data-content_menu_id="editable and event.menu_id.id">
|
||||
<t t-foreach="event.menu_id.child_id" t-as="submenu">
|
||||
<t t-call="website.submenu">
|
||||
<t t-set="item_class" t-value="'nav-item'"/>
|
||||
|
||||
Reference in New Issue
Block a user