summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/xml
diff options
context:
space:
mode:
authorBenjamin Vray <bvr@odoo.com>2020-03-26 11:42:12 +0000
committerqsm-odoo <qsm@odoo.com>2020-04-22 16:53:06 +0000
commit3920bb6fcfb3d6245e9918dfb5cbfcb9c5748acb (patch)
tree05185affb699616008950511122e4a82f43c7b63 /addons/web_editor/static/src/xml
parentc22f99dd09b0f8381a888ae065d66bb96da3b248 (diff)
[FIX] web_editor: restore m2o widget in edit mode
Hide the button used to display the input and show the input directly. Add a search icon into the input. Deactivate the browser autocomplete. Improve and fix the layout. Keep the field selected after choosing a result from the list. This commit was only about making it work in the 13.0 left panel. It will be improved further in master with our new left panel. task-2187712 closes odoo/odoo#50024 X-original-commit: 6660ee960a3c643ae92448d7bdc37f6c780605b6 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/xml')
-rw-r--r--addons/web_editor/static/src/xml/snippets.xml11
1 files changed, 6 insertions, 5 deletions
diff --git a/addons/web_editor/static/src/xml/snippets.xml b/addons/web_editor/static/src/xml/snippets.xml
index 2497ba83352..1e962589c4e 100644
--- a/addons/web_editor/static/src/xml/snippets.xml
+++ b/addons/web_editor/static/src/xml/snippets.xml
@@ -51,19 +51,20 @@
</div>
</div>
- <!-- t-field options -->
<t t-name="web_editor.many2one.button">
<div class="btn-group">
- <a role="button" href="#" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" title="Search Contact" aria-label="Search Contact"><i class="fa fa-search"></i></a>
- <ul class="dropdown-menu contact_menu" role="menu">
- <li><a role="menuitem" class="dropdown-item"><input href="#" type="email" placeholder="Search"/></a></li>
+ <a role="button" href="#" class="btn btn-secondary dropdown-toggle d-none" data-toggle="dropdown" data-hover="dropdown" title="Search Contact" aria-label="Search Contact">
+ <i class="fa fa-search"></i>
+ </a>
+ <ul class="dropdown-menu contact_menu d-block list-group list-group-flush mx-1" role="menu">
+ <li class="px-1"><a role="menuitem" class="dropdown-item pl-1 pr-2"><i class="fa fa-search"></i><input href="#" type="email" placeholder="Search" class="ml-2" autocomplete="off"/></a></li>
</ul>
</div>
</t>
<t t-name="web_editor.many2one.search">
<t t-foreach="contacts" t-as="item">
- <li><a role="menuitem" href="#" t-att-data-id="item.id" t-att-data-name="item.display_name"><t t-esc="item.display_name"/> <t t-if="item.city or item.country_id"><small class="text-muted">(<t t-esc="item.city"/> <t t-esc="item.country_id and item.country_id[1]"/>)</small></t></a></li>
+ <li class="list-group-item px-2"><a role="menuitem" href="#" t-att-data-id="item.id" t-att-data-name="item.display_name"><t t-esc="item.display_name"/> <t t-if="item.city or item.country_id"><small class="text-muted">(<t t-esc="item.city"/> <t t-esc="item.country_id and item.country_id[1]"/>)</small></t></a></li>
</t>
</t>
</templates>