[IMP] web: never select the white color for properties tags
Purpose ======= Never select the white color for the properties tags, it should be selected manually, because usually the white color is used to not show a tag in the kanban view (and that color is never automatically selected for normal many2many_tags widget). Fix the alignment of the property label. Task-3208449 closes odoo/odoo#114200 Related: odoo/enterprise#38944 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
t-att-property-name="propertyConfiguration.name">
|
||||
<t t-set="domId" t-value="generateUniqueDomID()"/>
|
||||
<label
|
||||
t-attf-class="o_field_property_label o_form_label text-break {{state.movedPropertyName === propertyConfiguration.name ? 'o_property_field_highlight' : ''}} d-flex align-items-center"
|
||||
t-attf-class="o_field_property_label o_form_label text-break {{state.movedPropertyName === propertyConfiguration.name ? 'o_property_field_highlight' : ''}} d-flex align-items-baseline"
|
||||
t-att-for="domId">
|
||||
<b
|
||||
t-if="propertyConfiguration.string and propertyConfiguration.string.length"
|
||||
|
||||
@@ -212,10 +212,11 @@ export class PropertyTags extends Component {
|
||||
}
|
||||
|
||||
// cycle trough colors
|
||||
const tagColor =
|
||||
let tagColor =
|
||||
this.props.tags && this.props.tags.length
|
||||
? (this.props.tags[this.props.tags.length - 1][2] + 1) % ColorList.COLORS.length
|
||||
: parseInt(Math.random() * ColorList.COLORS.length);
|
||||
tagColor = tagColor || 1; // never select white by default
|
||||
|
||||
const newTag = [newValue, newLabel, tagColor];
|
||||
const updatedTags = [...this.availableTags, newTag];
|
||||
|
||||
Reference in New Issue
Block a user