summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorSiddarth Gajjar <sga@odoo.com>2018-08-10 10:58:53 +0530
committerqsm-odoo <qsm@odoo.com>2018-08-19 16:57:14 +0200
commitc0629cd7570412cef333365ce3203918f2b2cb16 (patch)
treea59c90c6bf8961efb419b729af0986b6ca8cf231 /addons/web/static/src
parent6b84bdeaf9071bc2020dbfda9fa69b07fd2e44eb (diff)
[FIX] web: BS4, restore statusbar "more" dropdown
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/scss/form_view.scss16
-rw-r--r--addons/web/static/src/xml/base.xml12
2 files changed, 9 insertions, 19 deletions
diff --git a/addons/web/static/src/scss/form_view.scss b/addons/web/static/src/scss/form_view.scss
index 367d9854563..38b038ddca1 100644
--- a/addons/web/static/src/scss/form_view.scss
+++ b/addons/web/static/src/scss/form_view.scss
@@ -175,7 +175,6 @@
flex-flow: row-reverse wrap-reverse;
align-self: stretch;
align-items: stretch;
- overflow-x: hidden; // to prevent horizontal scroll due to last arrow
> .o_arrow_button {
min-height: $o-statusbar-height;
@@ -190,6 +189,7 @@
&:first-child {
padding-right: $o-horizontal-padding; // Compensate container padding
+ overflow-x: hidden; // to prevent horizontal scroll due to last arrow
}
&:last-child {
padding-left: $o-horizontal-padding - 1;
@@ -207,7 +207,7 @@
border-left: 1px solid gray('300');
}
- &:before, &:after {
+ &:before, &:not(:first-child):after {
content: " ";
display: block;
@include o-position-absolute(0, -$o-statusbar-arrow-width + 1);
@@ -246,20 +246,8 @@
border-left-color: gray('200');
}
}
-
- .caret {
- margin-top: -2px;
- }
}
- .o-status-more {
- @include o-position-absolute(100%, 0);
- min-width: 100px;
- > li > button {
- width: 100%;
- text-align: left;
- }
- }
}
// Touch device mode
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 3651bd25d4e..5f6f8253bdf 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -886,9 +886,11 @@
<t t-name="FieldStatus.content">
<t t-if="selection_folded.length">
<button type="button" class="btn o_arrow_button btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">More</button>
- <div class="dropdown-menu o-status-more" role="menu">
+ <div class="dropdown-menu" role="menu">
<t t-foreach="selection_folded" t-as="i">
- <t t-call="FieldStatus.content.button"/>
+ <t t-call="FieldStatus.content.button">
+ <t t-set="is_dropdown" t-value="true"/>
+ </t>
</t>
</div>
</t>
@@ -899,15 +901,15 @@
<t t-name="FieldStatus.content.button">
<t t-set="disabled" t-value="!clickable"/>
<button type="button" t-att-data-value="i.id" disabled="disabled" title="Current state" aria-pressed="true"
- class="btn o_arrow_button btn-primary disabled" t-if="i.selected" aria-current="step">
+ t-attf-class="btn o_arrow_button btn-primary disabled #{is_dropdown ? 'dropdown-item bg-primary text-white': ''}" t-if="i.selected" aria-current="step">
<t t-esc="i.display_name" role="img" t-attf-aria-label="#{i.display_name} is current state"/>
</button>
<button type="button" t-att-data-value="i.id" disabled="disabled" title="Not active state" aria-pressed="false"
- class="btn o_arrow_button btn-secondary disabled" t-if="!i.selected and disabled">
+ t-attf-class="btn o_arrow_button btn-secondary disabled #{is_dropdown ? 'dropdown-item': ''}" t-if="!i.selected and disabled">
<t t-esc="i.display_name" role="img" t-attf-aria-label="#{i.display_name} is not current state"/>
</button>
<button type="button" t-att-data-value="i.id" title="Not active state, click to change it" aria-pressed="false"
- class="btn o_arrow_button btn-secondary" t-if="!i.selected and !disabled">
+ t-attf-class="btn o_arrow_button btn-secondary #{is_dropdown ? 'dropdown-item': ''}" t-if="!i.selected and !disabled">
<t t-esc="i.display_name" role="img" t-attf-aria-label="Click to change current state to #{i.display_name}"/>
</button>
</t>