Skip to content
Snippets Groups Projects
Commit 4d5c3b9f authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] website: link dialog over image adaptation


Adapt website for 13.0 9996d04f change of LinkDialog constructor
arguments (to get back to same arguments as in 12.0).

opw-2086444
closes #39888

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 6a8e5f63
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,7 @@ var LinkDialog = Dialog.extend({
this.data = linkInfo || {};
this.data.className = "";
this.data.iniClassName = "";
var r = this.data.range;
this.needLabel = !r || (r.sc === r.ec && r.so === r.eo);
......
......@@ -368,10 +368,10 @@ var MenuEntryDialog = weWidgets.LinkDialog.extend({
/**
* @constructor
*/
init: function (parent, options, data) {
init: function (parent, options, editable, data) {
this._super(parent, _.extend({
title: _t("Add a menu item"),
}, options || {}), _.extend({
}, options || {}), editable, _.extend({
needLabel: true,
text: data.name || '',
isNewWindow: data.new_window,
......@@ -646,7 +646,7 @@ var EditMenuDialog = weWidgets.Dialog.extend({
var menuID = $menu.data('menu-id');
var menu = this.flat[menuID];
if (menu) {
var dialog = new MenuEntryDialog(this, {}, _.extend({
var dialog = new MenuEntryDialog(this, {}, null, _.extend({
menuType: menu.fields['is_mega_menu'] ? 'mega' : undefined,
}, menu.fields));
dialog.on('save', this, link => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment