Highlight search term in sharing results

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-10-17 21:56:41 +02:00
parent d7caf841df
commit e5cae301eb
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 6 additions and 1 deletions

View File

@ -71,6 +71,7 @@
border: 1px solid var(--color-main-background);
background: var(--color-main-background) none;
color: var(--color-text-lighter);
font-weight: 600;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,

View File

@ -472,7 +472,11 @@
}
$("<div class='autocomplete-item-text'></div>")
.text(text)
.html(
text.replace(
new RegExp(this.term, "gi"),
"<span class='ui-state-highlight'>$&</span>")
)
.appendTo(insert);
insert.attr('title', item.value.shareWith);
insert.append('<span class="icon '+icon+'"></span>');