autocomplete: highlight matches in autocomplete menu.
Highlight the matching part of the tag in the autocomplete menu. For example, if you search "hair", then the word "hair" will be bolded in every matching tag. This is so users can tell why a particular tag was matched.
This commit is contained in:
@@ -4,11 +4,12 @@
|
||||
<div class="ui-menu-item-wrapper" tabindex="-1">
|
||||
<%= link_to_result result do %>
|
||||
<% if result.antecedent.present? %>
|
||||
<span class="autocomplete-antecedent"><%= result.antecedent.tr("_", " ") %></span>
|
||||
<span class="autocomplete-antecedent"><%= highlight_antecedent(result) %></span>
|
||||
<span class="autocomplete-arrow">→</span>
|
||||
<%= result.label %>
|
||||
<% else %>
|
||||
<%= highlight_result(result) %>
|
||||
<% end %>
|
||||
|
||||
<%= result.label %>
|
||||
<% end %>
|
||||
|
||||
<% if result.post_count %>
|
||||
|
||||
Reference in New Issue
Block a user