[FIX] pos: "Discard" button at the wrong place.

"Discard" button shoud be on the left to respect the intuitive
mobile navigation.

We also take advantage of this commit to show icons and text on
desktop and only show the icons on mobile.

Task ID: 2453679

X-original-commit: f774f07a46197f7e1664aee32723b10bf6df37b4
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
This commit is contained in:
Romain Estievenart
2021-11-05 19:44:49 +00:00
co-authored by Adrien Dieudonné
parent 8174f77eb0
commit b614509698
2 changed files with 11 additions and 26 deletions
@@ -1848,7 +1848,6 @@ td {
}
.pos .clientlist-screen .client-details{
padding: 16px;
border-bottom: solid 5px rgb(110,200,155);
}
.pos .clientlist-screen .client-picture{
height: 64px;
@@ -1946,11 +1945,6 @@ td {
.pos .clientlist-screen .client-detail > .empty{
opacity: 0.3;
}
.pos .clientlist-screen .button.new-customer {
min-width: 30px;
}
.pos .searchbox-client {
padding: 3px 13px;
margin-top: 12px;
@@ -5,15 +5,15 @@
<div class="clientlist-screen screen" t-on-activate-edit-mode="activateEditMode">
<div class="screen-content">
<div class="top-content">
<div class="button back" t-on-click="back">
<i class="fa fa-angle-double-left"/>
<t t-if="!env.isMobile"> Discard</t>
</div>
<div t-if="!state.detailIsShown &amp;&amp; !state.selectedClient" class="button new-customer" role="img" aria-label="Add a customer"
t-on-click="trigger('activate-edit-mode', { isNewClient: true })"
title="Add a customer">
<t t-if="!env.isMobile">
Create
</t>
<t t-else="">
<i class="fa fa-plus"></i>
</t>
t-on-click="trigger('activate-edit-mode', { isNewClient: true })"
title="Add a customer">
<i class="fa fa-plus"/>
<t t-if="!env.isMobile"> Create</t>
</div>
<div t-if="isNextButtonVisible" t-on-click="clickNext"
class="button next highlight">
@@ -21,24 +21,15 @@
<t t-esc="nextButton.text" />
</t>
<t t-else="">
<i t-if="nextButton.command === 'deselect'" class="fa fa-trash"></i>
<i t-if="nextButton.command === 'set'" class="fa fa-check"></i>
<i t-if="nextButton.command === 'deselect'" class="fa fa-trash"/>
<i t-elif="nextButton.command === 'set'" class="fa fa-check"/>
</t>
</div>
<div class="button" t-if="state.detailIsShown" t-on-click="trigger('click-save')">
<i class="fa fa-floppy-o"/>
<t t-if="!env.isMobile">
<i class="fa fa-floppy-o"/>
<span> Save</span>
</t>
<t t-else="">
<i class="fa fa-floppy-o"/>
</t>
</div>
<div class="button back" t-on-click="back">
<t t-if="!env.isMobile">Discard</t>
<t t-else="">
<i class="fa fa-undo"></i>
</t>
</div>
<div t-if="!state.detailIsShown" class="searchbox-client top-content-center">
<input placeholder="Search Customers" size="1" t-on-keyup="updateClientList" />