diff --git a/layouts/v7/modules/Vtiger/resources/Field.js b/layouts/v7/modules/Vtiger/resources/Field.js index 3c5bda8be6983ab252530d10dbdf1ddda6be0493..40b778a71cec572428edac1dcaf2669af413db04 100644 --- a/layouts/v7/modules/Vtiger/resources/Field.js +++ b/layouts/v7/modules/Vtiger/resources/Field.js @@ -420,6 +420,9 @@ Vtiger_Field_Js('Vtiger_Multipicklist_Field_Js',{},{ if (picklistColor) { className = '.picklistColor_'+fieldName+'_'+option.replace(' ', '_'); html += className+'{background-color: '+picklistColor+' !important;}'; + + className = className + '.select2-highlighted'; + html += className+'{white: #ffffff !important; background-color: #337ab7 !important;}'; } } html +='<\style>'; diff --git a/layouts/v7/modules/Vtiger/uitypes/MultiPicklist.tpl b/layouts/v7/modules/Vtiger/uitypes/MultiPicklist.tpl index 593d83b42d6f3ca66ff1462f0208d80dd3251345..9867ae7045a740a19612279b49a5b4c01288c4a4 100644 --- a/layouts/v7/modules/Vtiger/uitypes/MultiPicklist.tpl +++ b/layouts/v7/modules/Vtiger/uitypes/MultiPicklist.tpl @@ -33,7 +33,17 @@ {assign var=CLASS_NAME value="{$FIELD_MODEL->getFieldName()}_{$PICKLIST_NAME|replace:' ':'_'}"} .picklistColor_{$CLASS_NAME} { background-color: {$PICKLIST_COLORS[$PICKLIST_NAME]} !important; + {if isset($PICKLIST_COLORS[$PICKLIST_NAME])} + background-color: {$PICKLIST_COLORS[$PICKLIST_NAME]} !important; + {if $PICKLIST_COLORS[$PICKLIST_NAME] eq '#ffffff'} + color: #000000 !important; + {/if} + {/if} } + .picklistColor_{$CLASS_NAME}.select2-highlighted { + white: #ffffff !important; + background-color: #337ab7 !important; + } {/foreach} </style> {/if}