diff options
| author | vho <vho@odoo.com> | 2020-03-12 10:35:49 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-04-30 08:29:57 +0000 |
| commit | cb55b302936010d97eca988c68d8167c8c4360b1 (patch) | |
| tree | 087733283dfe3d63bc2acdc4d1493c3d49ecf8de /addons/web/static/src/xml | |
| parent | 776d63e5a40fd48aaedb55eb8abfe04aee706688 (diff) | |
[IMP] sales_team, web: add and improve color widget to improve UX on crm.tag
The color picker help the user to choose a color instead of picking it
by id.
The title and arial-label "no-color" default value are removed from the
picker_preview because they are not accurate. Instead name of currently set
color is used.
Task ID 2128166
closes odoo/odoo#47474
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 2 | ||||
| -rw-r--r-- | addons/web/static/src/xml/kanban.xml | 22 |
2 files changed, 11 insertions, 13 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 10d52e55d28..9d59017cee7 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1896,7 +1896,7 @@ <t t-name="ColorPickerReadonly"> <div class="o_field_color_picker_preview"> <li> - <a aria-label="No color" href="#" role="menuitem" t-att-class="'oe_kanban_color_'+active_color" t-att-data-color="active_color" title="No color"/> + <a href="#" role="menuitem" t-att-class="'oe_kanban_color_'+active_color" t-att-data-color="active_color" t-att-aria-label="name_color" t-att-title="name_color"/> </li> </div> </t> diff --git a/addons/web/static/src/xml/kanban.xml b/addons/web/static/src/xml/kanban.xml index e4ef2393e3f..cb34cd16851 100644 --- a/addons/web/static/src/xml/kanban.xml +++ b/addons/web/static/src/xml/kanban.xml @@ -77,18 +77,16 @@ </t> <t t-name="KanbanColorPicker"> - <li><a role="menuitem" href="#" data-color="0" class="oe_kanban_color_0" title="No color" aria-label="No color"/></li> - <li><a role="menuitem" href="#" data-color="1" class="oe_kanban_color_1" title="Red" aria-label="Red"/></li> - <li><a role="menuitem" href="#" data-color="2" class="oe_kanban_color_2" title="Orange" aria-label="Orange"/></li> - <li><a role="menuitem" href="#" data-color="3" class="oe_kanban_color_3" title="Yellow" aria-label="Yellow"/></li> - <li><a role="menuitem" href="#" data-color="4" class="oe_kanban_color_4" title="Light blue" aria-label="Light blue"/></li> - <li><a role="menuitem" href="#" data-color="5" class="oe_kanban_color_5" title="Dark purple" aria-label="Dark purple"/></li> - <li><a role="menuitem" href="#" data-color="6" class="oe_kanban_color_6" title="Salmon pink" aria-label="Salmon pink"/></li> - <li><a role="menuitem" href="#" data-color="7" class="oe_kanban_color_7" title="Medium blue" aria-label="Medium blue"/></li> - <li><a role="menuitem" href="#" data-color="8" class="oe_kanban_color_8" title="Dark blue" aria-label="Dark blue"/></li> - <li><a role="menuitem" href="#" data-color="9" class="oe_kanban_color_9" title="Fushia" aria-label="Fushia"/></li> - <li><a role="menuitem" href="#" data-color="10" class="oe_kanban_color_10" title="Green" aria-label="Green"/></li> - <li><a role="menuitem" href="#" data-color="11" class="oe_kanban_color_11" title="Purple" aria-label="Purple"/></li> + <t t-foreach="colors" t-as="color"> + <li> + <a role="menuitem" + href="#" + t-att-data-color="color_index" + t-attf-class="oe_kanban_color_#{color_index}" + t-att-title="color" + t-att-aria-label="color"/> + </li> + </t> </t> <t t-name="GraphCustomTooltip"> |
