[IMP] web: FieldDomain panel at top right instead of below
The FieldDomain is composed of a DomainSelector widget and a button which allows to see the records which match the domain (or an error message if the domain is wrong). The button was placed below the domain selector. Now, in edit mode, it is placed at the top-right of the domain selector, saving some vertical space.
This commit is contained in:
@@ -24,7 +24,10 @@
|
||||
&.o_domain_selector {
|
||||
&.o_edit_mode {
|
||||
position: relative;
|
||||
padding-right: @o-domain-selector-panel-space;
|
||||
|
||||
> .o_domain_node_children_container {
|
||||
padding-right: @o-domain-selector-panel-space;
|
||||
}
|
||||
}
|
||||
|
||||
> .o_domain_node_children_container {
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
// Title
|
||||
.oe_title {
|
||||
> h1, > h2, > h3 {
|
||||
width: 100%; // Needed because inline-block when is a hx.o_row
|
||||
width: 100%; // Needed because inline-block when is a hx.o_row
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
line-height: inherit;
|
||||
@@ -276,6 +276,20 @@
|
||||
padding: 0 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.o_form_field_domain {
|
||||
> .o_form_field_domain_panel {
|
||||
margin-top: 8px;
|
||||
}
|
||||
&.o_edit_mode {
|
||||
position: relative;
|
||||
|
||||
> .o_form_field_domain_panel {
|
||||
.o-position-absolute(0, 0);
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Overriden style when form view in modal
|
||||
|
||||
@@ -669,12 +669,13 @@
|
||||
t-att-maxlength="widget.field.size"/>
|
||||
</t>
|
||||
|
||||
<div t-name="FieldDomain" class="o_form_field_domain">
|
||||
<div t-name="FieldDomain" t-attf-class="o_form_field_domain#{widget.get('effective_readonly') ? '' : ' o_edit_mode'}">
|
||||
<!-- domain selector will be instantiated here -->
|
||||
<div class="mt8">
|
||||
<div class="o_form_field_domain_panel">
|
||||
<i class="fa fa-arrow-right"/>
|
||||
<span><span class="o_domain_records_count"/> Records Selected</span>
|
||||
<button class="btn btn-default btn-xs o_domain_show_selection_button" type="button">See selection</button>
|
||||
<button class="btn btn-xs btn-default o_domain_show_selection_button" type="button">
|
||||
<span class="o_domain_records_count"/> record(s)
|
||||
</button>
|
||||
<span class="text-warning o_domain_error_message hidden"><i class="fa fa-exclamation-triangle"/> Invalid domain</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -683,7 +684,7 @@
|
||||
<div t-if="!widget.readonly && !widget.noControlPanel" class="btn-group btn-group-sm pull-right o_domain_node_control_panel">
|
||||
<button class="btn btn-default o_domain_delete_node_button"><i class="fa fa-minus"/></button>
|
||||
<button class="btn btn-default o_domain_add_node_button"><i class="fa fa-plus"/></button>
|
||||
<button class="btn btn-default o_domain_add_node_button" t-att-data-branch="1"><i class="fa fa-ellipsis-h"/></button>
|
||||
<button class="btn btn-default o_domain_add_node_button" data-branch="1"><i class="fa fa-ellipsis-h"/></button>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="DomainTree.OperatorSelector">
|
||||
@@ -711,9 +712,9 @@
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div>
|
||||
<t t-if="widget.children.length === 1">Match the records with the following rule:</t>
|
||||
<t t-if="widget.children.length === 1">Match records with the following rule:</t>
|
||||
<t t-else="">
|
||||
<span>Match the records with</span>
|
||||
<span>Match records with</span>
|
||||
<t t-call="DomainTree.OperatorSelector"/>
|
||||
<span>of the following rules:</span>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user