You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
2.0 KiB
41 lines
2.0 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<templates>
|
|
<t t-name="FountainWidgetField" owl="1">
|
|
<!-- Template containing the dropdown component-->
|
|
<FountainDropdown inputData="inputData">
|
|
<div style="display: flex;">
|
|
<div class="divMargin">
|
|
<t t-foreach="parentMenu" t-as="category"
|
|
t-key="category.id">
|
|
<t t-if="category.child_id.length > 0">
|
|
<t t-set="parent_class" t-value="'icon_style'"/>
|
|
</t>
|
|
<option class="dropdown-item-text"
|
|
t-on-click.stop.prevent="() => this.onClickDropDown(category.id)"
|
|
t-attf-class="#{parent_class}">
|
|
<t t-esc="category.name"/>
|
|
</option>
|
|
<li class="dropdown-divider" role="separator"/>
|
|
</t>
|
|
</div>
|
|
<div t-foreach="childKeys" t-as="cKeys"
|
|
t-key="cKeys" class="divMargin">
|
|
<t t-foreach="state.childMenu[cKeys]" t-as="child"
|
|
t-key="child.id">
|
|
<t t-log="child.child_id.length"/>
|
|
<t t-if="child.child_id.length > 0">
|
|
<t t-set="child_class" t-value="'icon_style'"/>
|
|
</t>
|
|
<option class="dropdown-item-text"
|
|
t-on-click.stop.prevent="() => this.onClickDropDown(child.id, cKeys_index +1)"
|
|
t-attf-class="#{child_class}">
|
|
<t t-esc="child.name"/>
|
|
</option>
|
|
<t t-set="child_class" t-value=""/>
|
|
<li class="dropdown-divider" role="separator"/>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</FountainDropdown>
|
|
</t>
|
|
</templates>
|
|
|