* website Now snippet options can be defined as a button which can be placed next to the clone and delete buttons, through a new "isTopOption" method. This commit also review the buttons and title design and take advantage of the feature to review the way snippets options are added in their container (that code indeed contained useless part since 13.0). Part of https://github.com/odoo/odoo/pull/38959 task-2066614
64 lines
2.8 KiB
XML
64 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<templates id="template" xml:space="preserve">
|
|
<t t-name="web_editor.snippet_overlay">
|
|
<div class="oe_overlay">
|
|
<div class="o_handles">
|
|
<!-- Visible overlay borders + allow to resize when not readonly -->
|
|
<div class="o_handle n readonly"/>
|
|
<div class="o_handle e readonly"/>
|
|
<div class="o_handle w readonly"/>
|
|
<div class="o_handle s readonly"/>
|
|
|
|
<!-- Overlay button-like handle to drag and drop -->
|
|
<div class="o_move_handle"/>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
<t t-name="web_editor.customize_block_options_section">
|
|
<we-customizeblock-options>
|
|
<we-title>
|
|
<span t-esc="name"/>
|
|
<we-button-group>
|
|
<we-button class="fa fa-fw fa-clone oe_snippet_clone"
|
|
title="Duplicate Container"
|
|
aria-label="Duplicate Container"/>
|
|
<we-button class="fa fa-fw fa-trash oe_snippet_remove"
|
|
title="Remove Block"
|
|
aria-label="Remove Block"/>
|
|
</we-button-group>
|
|
</we-title>
|
|
</we-customizeblock-options>
|
|
</t>
|
|
<t t-name="web_editor.customize_block_option">
|
|
<we-customizeblock-option/>
|
|
</t>
|
|
|
|
<!-- options -->
|
|
<div t-name="web_editor.snippet.option.colorpicker" class="colorpicker">
|
|
<div class="btn-group palette-reset">
|
|
<div class="note-color-reset" data-event="foreColor" data-value="inherit" title="None" role="img" aria-label="No color">
|
|
<i class="fa fa-ban"/>
|
|
</div>
|
|
</div>
|
|
<div class="o_colorpicker_sections px-1 pb8">
|
|
<div class="tab-content o_colorpicker_section_tabs"/>
|
|
</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>
|
|
</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>
|
|
</t>
|
|
</t>
|
|
</templates>
|