From f64c1c6b7457ca73ac01b6dd3cebdbaa2889baa1 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 5 Jan 2017 13:13:09 +0100 Subject: [PATCH] [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. --- addons/web/static/src/less/domain_selector.less | 5 ++++- addons/web/static/src/less/form_view_layout.less | 16 +++++++++++++++- addons/web/static/src/xml/base.xml | 15 ++++++++------- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/addons/web/static/src/less/domain_selector.less b/addons/web/static/src/less/domain_selector.less index 7dced900b21..f3917526ec5 100644 --- a/addons/web/static/src/less/domain_selector.less +++ b/addons/web/static/src/less/domain_selector.less @@ -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 { diff --git a/addons/web/static/src/less/form_view_layout.less b/addons/web/static/src/less/form_view_layout.less index 281cf0d217e..9b286f9e8fa 100644 --- a/addons/web/static/src/less/form_view_layout.less +++ b/addons/web/static/src/less/form_view_layout.less @@ -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 diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index dc3119908fe..34387d9f507 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -669,12 +669,13 @@ t-att-maxlength="widget.field.size"/> -
+
-
+
- Records Selected - +
@@ -683,7 +684,7 @@
- +
@@ -711,9 +712,9 @@
- Match the records with the following rule: + Match records with the following rule: - Match the records with + Match records with of the following rules: