[FIX] website: properly autocomplete url from LinkDialog

task-2586134

closes odoo/odoo#74327

X-original-commit: a6cc59d4efb7d63cdfe08d7bec496d048f1ae43d
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
This commit is contained in:
Nicolas Bayet
2021-07-27 15:45:12 +00:00
parent 2da2f5d5dc
commit 3b6088dede
2 changed files with 9 additions and 2 deletions
@@ -10,9 +10,10 @@ weWidgets.LinkDialog.include({
*
* @override
*/
start: function () {
start: async function () {
const result = await this._super.apply(this, arguments);
wUtils.autocompleteWithPages(this, this.$('input[name="url"]'));
return this._super.apply(this, arguments);
return result;
},
});
});
@@ -14,6 +14,12 @@
</label>
</t>
<t t-extend="wysiwyg.widgets.link">
<t t-jquery="#o_link_dialog_url_input" t-operation="after">
<small class="form-text text-muted">Hint: Type '/' to search an existing page and '#' to link to an anchor.</small>
</t>
</t>
<t t-extend="wysiwyg.widgets.linkTools">
<t t-jquery="#url_row" t-operation="after">
<div style="text-align: center" t-attf-class="#{widget.isButton ? ' d-none' : ''}">