[IMP] web: handle buttons with long strings on quick create kanban card

Right now, the quick create kanban card is having three buttons, Add, Edit
and Discard. In some languages, the translation terms of these buttons may be
quite long. This pushes the last button into second line and leads to an
ugly display.

This commit replaces the 'Discard' button with trash icon and makes sure that
all buttons are always in single line. If the strings are too long, they will
be cropped automatically.

Task ID-2373130

closes odoo/odoo#62326

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
dht-odoo
2020-12-11 13:58:04 +00:00
committed by Thibault Delavallée
parent 3f13751e9b
commit c76fa80487
2 changed files with 10 additions and 4 deletions
@@ -34,6 +34,10 @@
}
}
.o_kanban_cancel {
color: gray('600'); // to make color uniform in community and enterprise
}
&.o_disabled {
pointer-events: none;
opacity: 0.7;
+6 -4
View File
@@ -69,10 +69,12 @@
</t>
<t t-name="KanbanView.RecordQuickCreate.buttons">
<div>
<button class="btn btn-primary o_kanban_add">Add</button>
<button class="btn btn-primary o_kanban_edit">Edit</button>
<button class="btn btn-secondary o_kanban_cancel ml8">Discard</button>
<div class="d-flex">
<button class="btn btn-primary o_kanban_add mr-1 text-truncate">Add</button>
<button class="btn btn-primary o_kanban_edit mr-1 text-truncate">Edit</button>
<button class="btn btn-secondary o_kanban_cancel ml-auto">
<i class="fa fa-trash"/>
</button>
</div>
</t>