[IMP] web, sale_timesheet: review cp design
task-3005130 Part-of: odoo/odoo#102528
This commit is contained in:
committed by
Alexandre Kühn
parent
9ed4a700c1
commit
db86a64047
@@ -38,7 +38,7 @@ tour.register('sale_timesheet_tour', {
|
||||
content: 'Click on Confirm button to create a sale order with this quotation.',
|
||||
}, {
|
||||
trigger: 'button.o_form_button_save',
|
||||
extra_trigger: '.o_field_widget[name=state] button[data-value=sale].btn-primary',
|
||||
extra_trigger: '.o_field_widget[name=state] button[data-value=sale].o_arrow_button_current',
|
||||
content: 'Click on Save button to save the Sales Order.',
|
||||
}, {
|
||||
trigger: '.o_form_status_indicator_buttons_hidden',
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
$o-control-panel-background-color: $o-view-background-color !default;
|
||||
|
||||
@@ -20,10 +20,7 @@
|
||||
}
|
||||
&:last-child {
|
||||
padding-left: $o-horizontal-padding - 1;
|
||||
|
||||
&:not(.disabled) {
|
||||
border-left: 1px solid $border-color;
|
||||
}
|
||||
border-left: $border-width solid $border-color;
|
||||
}
|
||||
|
||||
&:not(:first-child):before, &:not(:first-child):after {
|
||||
@@ -40,30 +37,26 @@
|
||||
|
||||
&:not(:first-child):before {
|
||||
right: -$o-statusbar-arrow-width;
|
||||
border-left-color: map-get($grays, '300');
|
||||
border-left-color: $border-color!important;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
opacity: 1;
|
||||
pointer-events: none;
|
||||
|
||||
&:not(.btn-primary) {
|
||||
&:not(.o_arrow_button_current) {
|
||||
&, &:hover, &:focus {
|
||||
color: $text-muted;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.btn-primary.disabled {
|
||||
background-color: $o-brand-odoo;
|
||||
color: color-contrast($o-brand-odoo);
|
||||
&.o_arrow_button_current.disabled {
|
||||
background-color: $o-gray-100;
|
||||
color: o-color(odoo);
|
||||
|
||||
&:after, &:before {
|
||||
border-left-color: $o-brand-odoo;
|
||||
}
|
||||
|
||||
+ .o_arrow_button:before {
|
||||
display: none;
|
||||
border-left-color: $o-gray-100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<t t-set="items" t-value="computeItems()" />
|
||||
|
||||
<t t-if="items.folded.length">
|
||||
<button type="button" class="btn o_arrow_button btn-secondary dropdown-toggle">
|
||||
<button type="button" class="btn o_arrow_button dropdown-toggle text-uppercase">
|
||||
<Dropdown toggler="'parent'">
|
||||
<t t-foreach="items.folded" t-as="item" t-key="item.id">
|
||||
<DropdownItem class="getDropdownItemClassNames(item)" onSelected="() => this.selectItem(item)">
|
||||
@@ -25,7 +25,7 @@
|
||||
<t t-if="item.isSelected">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary o_arrow_button disabled"
|
||||
class="btn o_arrow_button_current o_arrow_button disabled text-uppercase"
|
||||
disabled="disabled"
|
||||
role="radio"
|
||||
aria-label="Current state"
|
||||
@@ -39,7 +39,7 @@
|
||||
<t t-elif="props.isDisabled">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary o_arrow_button disabled"
|
||||
class="btn o_arrow_button disabled text-uppercase"
|
||||
disabled="disabled"
|
||||
role="radio"
|
||||
aria-label="Not active state"
|
||||
@@ -52,7 +52,7 @@
|
||||
<t t-else="">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary o_arrow_button"
|
||||
class="btn o_arrow_button text-uppercase"
|
||||
role="radio"
|
||||
aria-label="Not active state, click to change it"
|
||||
aria-checked="false"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
.o_form_view .o_control_panel {
|
||||
.o_cp_action_menus {
|
||||
border-right: 1px solid $border-color;
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,8 @@
|
||||
domain="props.domain"
|
||||
onActionExecuted="() => model.load({ resId: model.root.resId, resIds: model.root.resIds })"
|
||||
shouldExecuteAction.bind="shouldExecuteAction"
|
||||
/>
|
||||
/>
|
||||
<span class="border-start d-none d-md-inline-block"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-set-slot="control-panel-status-indicator">
|
||||
|
||||
@@ -165,7 +165,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
assert.containsN(target, ".o_statusbar_status button:disabled", 2);
|
||||
assert.hasClass(
|
||||
target.querySelector('.o_statusbar_status button[data-value="4"]'),
|
||||
"btn-primary"
|
||||
"o_arrow_button_current"
|
||||
);
|
||||
});
|
||||
|
||||
@@ -245,7 +245,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
|
||||
assert.hasClass(
|
||||
target.querySelector(".o_statusbar_status button[data-value='4']"),
|
||||
"btn-primary"
|
||||
"o_arrow_button_current"
|
||||
);
|
||||
assert.hasClass(
|
||||
target.querySelector(".o_statusbar_status button[data-value='4']"),
|
||||
@@ -253,7 +253,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
);
|
||||
|
||||
const clickableButtons = target.querySelectorAll(
|
||||
".o_statusbar_status button.btn-secondary:not(.dropdown-toggle):not(:disabled)"
|
||||
".o_statusbar_status button.btn:not(.dropdown-toggle):not(:disabled):not(.o_arrow_button_current)"
|
||||
);
|
||||
assert.strictEqual(clickableButtons.length, 2);
|
||||
|
||||
@@ -261,7 +261,7 @@ QUnit.module("Fields", (hooks) => {
|
||||
|
||||
assert.hasClass(
|
||||
target.querySelector(".o_statusbar_status button[data-value='1']"),
|
||||
"btn-primary"
|
||||
"o_arrow_button_current"
|
||||
);
|
||||
assert.hasClass(
|
||||
target.querySelector(".o_statusbar_status button[data-value='1']"),
|
||||
|
||||
@@ -9324,14 +9324,14 @@ QUnit.module("Views", (hooks) => {
|
||||
},
|
||||
});
|
||||
|
||||
assert.hasClass(target.querySelector('button[data-value="4"]'), "btn-primary");
|
||||
assert.hasClass(target.querySelector('button[data-value="4"]'), "o_arrow_button_current");
|
||||
assert.hasClass(target.querySelector('button[data-value="4"]'), "disabled");
|
||||
|
||||
failFlag = true;
|
||||
await click(target.querySelector('button[data-value="1"]'));
|
||||
assert.hasClass(
|
||||
target.querySelector('button[data-value="4"]'),
|
||||
"btn-primary",
|
||||
"o_arrow_button_current",
|
||||
"initial status should still be active as save failed"
|
||||
);
|
||||
|
||||
@@ -9339,7 +9339,7 @@ QUnit.module("Views", (hooks) => {
|
||||
await click(target.querySelector('button[data-value="1"]'));
|
||||
assert.hasClass(
|
||||
target.querySelector('button[data-value="1"]'),
|
||||
"btn-primary",
|
||||
"o_arrow_button_current",
|
||||
"last clicked status should be active"
|
||||
);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ tour.register('shop_mail', {
|
||||
{
|
||||
content: "click send by email",
|
||||
trigger: '.btn[name="action_quotation_send"]',
|
||||
extra_trigger: '.o_statusbar_status .btn-primary:contains("Sales Order")',
|
||||
extra_trigger: '.o_statusbar_status .o_arrow_button_current:contains("Sales Order")',
|
||||
},
|
||||
{
|
||||
content: "Open recipients dropdown",
|
||||
|
||||
Reference in New Issue
Block a user