[FIX] web: frontend does not need X.tooltip templates
WidgetLabel.tooltip and WidgetButton.tooltip are backend static xml templates. They should never have been in base_common.xml.
This commit is contained in:
@@ -5,6 +5,102 @@
|
||||
|
||||
<div t-name="Loading" class="o_loading"/>
|
||||
|
||||
<t t-name="WidgetLabel.tooltip">
|
||||
<div class="oe_tooltip_string" t-if="widget.string">
|
||||
<t t-esc="widget.string"/> <t t-if="debug and widget.nolabel">(nolabel)</t>
|
||||
</div>
|
||||
<p t-if="widget.attrs.help || widget.field.help" class="oe_tooltip_help">
|
||||
<t t-esc="widget.attrs.help || widget.field.help"/>
|
||||
</p>
|
||||
<ul t-if="debug" class="oe_tooltip_technical">
|
||||
<li data-item="field" t-if="widget.name">
|
||||
<span class="oe_tooltip_technical_title">Field:</span>
|
||||
<t t-esc="widget.name"/>
|
||||
</li>
|
||||
<li data-item="object">
|
||||
<span class="oe_tooltip_technical_title">Object:</span>
|
||||
<t t-esc="widget.model"/>
|
||||
</li>
|
||||
<li data-item="type">
|
||||
<span class="oe_tooltip_technical_title">Type:</span>
|
||||
<t t-esc="widget.field.type"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.widget" data-item="widget">
|
||||
<span class="oe_tooltip_technical_title">Widget:</span>
|
||||
<t t-esc="widget.attrs.widget"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.size || widget.field.size" data-item="size">
|
||||
<span class="oe_tooltip_technical_title">Size:</span>
|
||||
<t t-esc="widget.attrs.size || widget.field.size"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.context || widget.field.context" data-item="context">
|
||||
<span class="oe_tooltip_technical_title">Context:</span>
|
||||
<t t-esc="widget.attrs.context || widget.field.context"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.domain || widget.field.domain" data-item="domain">
|
||||
<span class="oe_tooltip_technical_title">Domain:</span>
|
||||
<t t-esc="widget.attrs.domain || widget.field.domain"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.modifiers and widget.attrs.modifiers != '{}'" data-item="modifiers">
|
||||
<span class="oe_tooltip_technical_title">Modifiers:</span>
|
||||
<t t-esc="widget.attrs.modifiers"/>
|
||||
</li>
|
||||
<li t-if="widget.field and widget.field.change_default" data-item="change_default">
|
||||
<span class="oe_tooltip_technical_title">Change default:</span>
|
||||
Yes
|
||||
</li>
|
||||
<li t-if="widget.attrs.on_change" data-item="on_change">
|
||||
<span class="oe_tooltip_technical_title">On change:</span>
|
||||
<t t-esc="widget.attrs.on_change"/>
|
||||
</li>
|
||||
<li t-if="widget.field and widget.field.relation" data-item="relation">
|
||||
<span class="oe_tooltip_technical_title">Relation:</span>
|
||||
<t t-esc="widget.field.relation"/>
|
||||
</li>
|
||||
<li t-if="widget.field and widget.field.selection" data-item="selection">
|
||||
<span class="oe_tooltip_technical_title">Selection:</span>
|
||||
<ul class="oe_tooltip_technical">
|
||||
<li t-foreach="widget.field.selection" t-as="option">
|
||||
[<t t-esc="option[0]"/>]
|
||||
<t t-if="option[1]"> - </t>
|
||||
<t t-esc="option[1]"/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
<t t-name="WidgetButton.tooltip" t-extend="WidgetLabel.tooltip">
|
||||
<t t-jquery="div.oe_tooltip_string" t-operation="replace">
|
||||
<div class="oe_tooltip_string" t-if="debug || widget.string">
|
||||
<t t-if="debug">
|
||||
Button
|
||||
<t t-if="widget.string">: </t>
|
||||
<t t-if="!widget.string"> (no string)</t>
|
||||
</t>
|
||||
<t t-esc="widget.string"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-jquery="ul.oe_tooltip_technical" t-operation="append">
|
||||
<li t-if="widget.node.attrs.special" data-item="special">
|
||||
<span class="oe_tooltip_technical_title">Special:</span>
|
||||
<t t-esc="widget.node.attrs.special"/>
|
||||
</li>
|
||||
<t t-set="button_type" t-value="widget.node.attrs.type"/>
|
||||
<li t-if="button_type" data-item="button_type">
|
||||
<span class="oe_tooltip_technical_title">Button Type:</span>
|
||||
<t t-esc="button_type"/>
|
||||
</li>
|
||||
<li t-if="button_type === 'object'" data-item="button_method">
|
||||
<span class="oe_tooltip_technical_title">Method:</span>
|
||||
<t t-esc="widget.node.attrs.name"/>
|
||||
</li>
|
||||
<li t-if="button_type === 'action'" data-item="button_action">
|
||||
<span class="oe_tooltip_technical_title">Action ID:</span>
|
||||
<t t-esc="widget.node.attrs.name"/>
|
||||
</li>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<t t-name="Notification">
|
||||
<div t-attf-class="o_notification #{className}" t-translation="off">
|
||||
<a t-if="widget.sticky" class="fa fa-times o_close" href="#"/>
|
||||
|
||||
@@ -29,100 +29,4 @@
|
||||
<span t-if="widget.string"><t t-esc="widget.string"/></span>
|
||||
</button>
|
||||
</t>
|
||||
<t t-name="WidgetLabel.tooltip">
|
||||
<div class="oe_tooltip_string" t-if="widget.string">
|
||||
<t t-esc="widget.string"/> <t t-if="debug and widget.nolabel">(nolabel)</t>
|
||||
</div>
|
||||
<p t-if="widget.attrs.help || widget.field.help" class="oe_tooltip_help">
|
||||
<t t-esc="widget.attrs.help || widget.field.help"/>
|
||||
</p>
|
||||
<ul t-if="debug" class="oe_tooltip_technical">
|
||||
<li data-item="field" t-if="widget.name">
|
||||
<span class="oe_tooltip_technical_title">Field:</span>
|
||||
<t t-esc="widget.name"/>
|
||||
</li>
|
||||
<li data-item="object">
|
||||
<span class="oe_tooltip_technical_title">Object:</span>
|
||||
<t t-esc="widget.model"/>
|
||||
</li>
|
||||
<li data-item="type">
|
||||
<span class="oe_tooltip_technical_title">Type:</span>
|
||||
<t t-esc="widget.field.type"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.widget" data-item="widget">
|
||||
<span class="oe_tooltip_technical_title">Widget:</span>
|
||||
<t t-esc="widget.attrs.widget"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.size || widget.field.size" data-item="size">
|
||||
<span class="oe_tooltip_technical_title">Size:</span>
|
||||
<t t-esc="widget.attrs.size || widget.field.size"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.context || widget.field.context" data-item="context">
|
||||
<span class="oe_tooltip_technical_title">Context:</span>
|
||||
<t t-esc="widget.attrs.context || widget.field.context"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.domain || widget.field.domain" data-item="domain">
|
||||
<span class="oe_tooltip_technical_title">Domain:</span>
|
||||
<t t-esc="widget.attrs.domain || widget.field.domain"/>
|
||||
</li>
|
||||
<li t-if="widget.attrs.modifiers and widget.attrs.modifiers != '{}'" data-item="modifiers">
|
||||
<span class="oe_tooltip_technical_title">Modifiers:</span>
|
||||
<t t-esc="widget.attrs.modifiers"/>
|
||||
</li>
|
||||
<li t-if="widget.field and widget.field.change_default" data-item="change_default">
|
||||
<span class="oe_tooltip_technical_title">Change default:</span>
|
||||
Yes
|
||||
</li>
|
||||
<li t-if="widget.attrs.on_change" data-item="on_change">
|
||||
<span class="oe_tooltip_technical_title">On change:</span>
|
||||
<t t-esc="widget.attrs.on_change"/>
|
||||
</li>
|
||||
<li t-if="widget.field and widget.field.relation" data-item="relation">
|
||||
<span class="oe_tooltip_technical_title">Relation:</span>
|
||||
<t t-esc="widget.field.relation"/>
|
||||
</li>
|
||||
<li t-if="widget.field and widget.field.selection" data-item="selection">
|
||||
<span class="oe_tooltip_technical_title">Selection:</span>
|
||||
<ul class="oe_tooltip_technical">
|
||||
<li t-foreach="widget.field.selection" t-as="option">
|
||||
[<t t-esc="option[0]"/>]
|
||||
<t t-if="option[1]"> - </t>
|
||||
<t t-esc="option[1]"/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
<t t-name="WidgetButton.tooltip" t-extend="WidgetLabel.tooltip">
|
||||
<t t-jquery="div.oe_tooltip_string" t-operation="replace">
|
||||
<div class="oe_tooltip_string" t-if="debug || widget.string">
|
||||
<t t-if="debug">
|
||||
Button
|
||||
<t t-if="widget.string">: </t>
|
||||
<t t-if="!widget.string"> (no string)</t>
|
||||
</t>
|
||||
<t t-esc="widget.string"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-jquery="ul.oe_tooltip_technical" t-operation="append">
|
||||
<li t-if="widget.node.attrs.special" data-item="special">
|
||||
<span class="oe_tooltip_technical_title">Special:</span>
|
||||
<t t-esc="widget.node.attrs.special"/>
|
||||
</li>
|
||||
<t t-set="button_type" t-value="widget.node.attrs.type"/>
|
||||
<li t-if="button_type" data-item="button_type">
|
||||
<span class="oe_tooltip_technical_title">Button Type:</span>
|
||||
<t t-esc="button_type"/>
|
||||
</li>
|
||||
<li t-if="button_type === 'object'" data-item="button_method">
|
||||
<span class="oe_tooltip_technical_title">Method:</span>
|
||||
<t t-esc="widget.node.attrs.name"/>
|
||||
</li>
|
||||
<li t-if="button_type === 'action'" data-item="button_action">
|
||||
<span class="oe_tooltip_technical_title">Action ID:</span>
|
||||
<t t-esc="widget.node.attrs.name"/>
|
||||
</li>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
||||
Reference in New Issue
Block a user