.select2-drop .crm-entityref-filters select.active {
border: 1px solid #808080;
}
-/* Icons used by entityRef create buttons */
-.crm-container .Individual-profile-icon {
- background-position: -144px -96px;
-}
-.crm-container .Household-profile-icon {
- background-position: 0 -112px;
-}
-.crm-container .Organization-profile-icon {
- background-position: -112px -112px;
-}
/* Style autocomplete results */
.crm-container .select2-results {
font-size: 12px;
createLinks = params.contact_type ? _.where(CRM.config.entityRef.contactCreate, {type: params.contact_type}) : CRM.config.entityRef.contactCreate;
}
_.each(createLinks, function(link) {
+ var icon;
+ switch (link.type) {
+ case 'Individual':
+ icon = 'fa-user';
+ break;
+
+ case 'Organization':
+ icon = 'fa-building';
+ break;
+
+ case 'Household':
+ icon = 'fa-home';
+ break;
+ }
markup += ' <a class="crm-add-entity crm-hover-button" href="' + link.url + '">';
- if (link.type) {
- markup += '<span class="icon ' + link.type + '-profile-icon"></span> ';
+ if (icon) {
+ markup += '<i class="crm-i ' + icon + '"></i> ';
}
markup += link.label + '</a>';
});
if ($icon.length) {
button.icons = {primary: $icon.attr('class')};
} else {
- var action = $el.attr('crm-icon') || ($el.hasClass('cancel') ? 'times' : 'check');
- button.icons = {primary: 'fa-' + action};
+ var action = $el.attr('crm-icon') || ($el.hasClass('cancel') ? 'fa-times' : 'fa-check');
+ button.icons = {primary: action};
}
buttons.push(button);
added.push(identifier);