[FIX] website: fix url picker editor dropdown

This commit fixes 2 issues with the position of the dropdown with the
suggested links in the url picker input of the snippet options. (e.g.
redirect url input of the countdown snippet) and the one for the input
of the link editor.

1- Before this commit the dropdown went over the input while editing the
url.

2- Before this commit the position of the dropdown (when above the
input) was a little too low if there were images in the dropdown. It was
because the images are loaded after the positioning of the dropdown and
no height was defined for these images.

task-2900529

closes odoo/odoo#101815

X-original-commit: 774a42ff18651a20b09a5e34222665216b19c8ec
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
Benjamin Vray
2022-10-03 17:18:21 +02:00
committed by qsm-odoo
parent 39c14368a2
commit 80f174f57b
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -339,7 +339,7 @@ class Website(Home):
for name, url, mod in current_website.get_suggested_controllers():
if needle.lower() in name.lower() or needle.lower() in url.lower():
module_sudo = mod and request.env.ref('base.module_%s' % mod, False).sudo()
icon = mod and "<img src='%s' width='24px' class='mr-2 rounded' /> " % (module_sudo and module_sudo.icon or mod) or ''
icon = mod and "<img src='%s' width='24px' height='24px' class='mr-2 rounded' /> " % (module_sudo and module_sudo.icon or mod) or ''
suggested_controllers.append({
'value': url,
'label': '%s%s (%s)' % (icon, url, name),
@@ -64,7 +64,7 @@ const UrlPickerUserValueWidget = InputUserValueWidget.extend({
this.inputEl.classList.add('text-start');
const options = {
position: {
collision: 'flip fit',
collision: 'flip flipfit',
},
classes: {
"ui-autocomplete": 'o_website_ui_autocomplete'
@@ -30,7 +30,7 @@ weWidgets.LinkTools.include({
var def = await this._super.apply(this, arguments);
const options = {
position: {
collision: 'flip fit',
collision: 'flip flipfit',
},
classes: {
"ui-autocomplete": 'o_website_ui_autocomplete'