diff options
| author | Siddarth Gajjar <sga@odoo.com> | 2020-10-16 11:58:12 +0000 |
|---|---|---|
| committer | Siddarth Gajjar <sga@odoo.com> | 2020-12-10 08:41:35 +0000 |
| commit | d44339190ba90c3a3564cc30b78477a1724efaee (patch) | |
| tree | 187eda621a41c06616677d269ec8996e202a1493 /addons/website/static/src/js/utils.js | |
| parent | 90a178da9f535a7aad59033d697323dc32623b8b (diff) | |
[IMP] website: improve autocomplete dropdown UI
- Before this commit, Autocomplete dropdown ui is not
compatible with existing editor ui.
- After this, Autocomplete dropdown UI for url and GMAP imrpoved.
closes odoo/odoo#60735
Taskid: 2352870
Closes: https://github.com/odoo/odoo/pull/60735
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website/static/src/js/utils.js')
| -rw-r--r-- | addons/website/static/src/js/utils.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/website/static/src/js/utils.js b/addons/website/static/src/js/utils.js index 508f6ee53ad..f66f562b166 100644 --- a/addons/website/static/src/js/utils.js +++ b/addons/website/static/src/js/utils.js @@ -32,8 +32,9 @@ function loadAnchors(url) { * @param {ServicesMixin|Widget} self - an element capable to trigger an RPC * @param {jQuery} $input */ -function autocompleteWithPages(self, $input) { +function autocompleteWithPages(self, $input, options) { $.widget("website.urlcomplete", $.ui.autocomplete, { + options: options || {}, _create: function () { this._super(); this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); @@ -50,7 +51,7 @@ function autocompleteWithPages(self, $input) { }); }, _renderSeparator: function (ul, item) { - return $("<li class='ui-autocomplete-category font-weight-bold text-capitalize m-2'>") + return $("<li class='ui-autocomplete-category font-weight-bold text-capitalize p-2'>") .append(`<div>${item.separator}</div>`) .appendTo(ul); }, |
