Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] website: fix url picker editor dropdown #101651

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/website/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def get_suggested_link(self, needle, limit=10):
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),
Expand Down
4 changes: 2 additions & 2 deletions addons/website/static/src/js/editor/snippets.options.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ const UrlPickerUserValueWidget = InputUserValueWidget.extend({
this.inputEl.classList.add('text-left');
const options = {
position: {
collision: 'flip fit',
collision: 'flip flipfit',
},
classes: {
"ui-autocomplete": 'o_website_ui_autocomplete'
},
}
};
wUtils.autocompleteWithPages(this, $(this.inputEl), options);
},

Expand Down
4 changes: 2 additions & 2 deletions addons/website/static/src/js/editor/widget_link.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ 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'
},
}
};
wUtils.autocompleteWithPages(this, this.$('input[name="url"]'), options);
this._adaptPageAnchor();
return def;
Expand Down