[FIX] website: fix menu button edition

The content of the button was not changed after editing a menu button.

Part of https://github.com/odoo/odoo/pull/70150
task-2513588

closes odoo/odoo#71177

X-original-commit: 727c39db1a28c6539044f230ceb70d80ca05b8de
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
Younn Olivier
2021-05-21 18:09:38 +00:00
parent bcd172d515
commit 7287ce5355
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -737,7 +737,7 @@ var EditMenuDialog = weWidgets.Dialog.extend({
}, menu.fields));
dialog.on('save', this, link => {
_.extend(menu.fields, {
'name': link.text,
'name': link.content,
'url': link.url,
'new_window': link.isNewWindow,
});
@@ -48,7 +48,7 @@ const NavbarLinkPopoverWidget = weWidgets.LinkPopoverWidget.extend({
});
const data = {
id: $menu.data('oe-id'),
name: link.text,
name: link.content,
url: link.url,
};
return this._rpc({
@@ -57,7 +57,7 @@ const NavbarLinkPopoverWidget = weWidgets.LinkPopoverWidget.extend({
args: [websiteId, {'data': [data]}],
}).then(function () {
self.$target.attr('href', link.url);
$menu.text(link.text);
$menu.text(link.content);
});
});
dialog.open();