Skip to content

Commit

Permalink
Merge pull request #1326 from kinow/typeahead-post-bootstrap
Browse files Browse the repository at this point in the history
Fix typeahead templates in the search auto-complete
  • Loading branch information
osma authored Jun 2, 2022
2 parents a54bada + ad414ea commit 290296c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resource/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2126,7 +2126,7 @@ span.date-info {
float: right;
}

.tt-selectable > .concept-type {
.tt-selectable > .concept-type, .autocomplete-label > div:first-child > span.concept-type {
float: right;
height: auto;
}
Expand All @@ -2135,7 +2135,7 @@ span.date-info {
overflow: hidden;
}

.autocomplete-label > span {
.autocomplete-label > div:first-child > span:first-child, .autocomplete-label > div:first-child > span.replaced + span {
color: var(--medium-color);
margin: 0;
}
Expand Down
4 changes: 3 additions & 1 deletion resource/js/docready.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,13 +750,15 @@ $(function() { // DOCUMENT READY

var autocompleteTemplate =[
'<div class="autocomplete-label">',
'<div>',
'{{# if matched }}<span>{{matched}}{{# if lang}} ({{lang}}){{/if}} = </span>{{/if}}',
'{{# if replaced }}<span class="replaced">{{replaced}}{{# if lang}} ({{lang}}){{/if}} &rarr; </span>{{/if}}',
'{{# if notation }}<span>{{notation}}</span>{{/if}}',
'<span>{{label}}{{# if lang}}{{# unless matched }}<span>({{lang}})</span>{{/unless}}{{/if}}</span>',
'{{# if typeLabel }}<span class="concept-type">{{typeLabel}}</span>{{/if}}',
'</div>',
'<div class="vocab">{{vocabLabel}}</div>'
'<div class="vocab">{{vocabLabel}}</div>',
'</div>'
].join('');

if ($('.headerbar').length > 0) {
Expand Down

0 comments on commit 290296c

Please sign in to comment.