changeset 6901:c47ab93fdc72

autocomplete: highlight the matched search string - use select2-match class as select2 itself does
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 15 Sep 2017 03:06:30 +0200
parents 5f0bba61653c
children 44ed1c6497ce
files kallithea/public/js/base.js
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/js/base.js	Tue Sep 12 20:21:34 2017 +0200
+++ b/kallithea/public/js/base.js	Fri Sep 15 03:06:30 2017 +0200
@@ -1070,9 +1070,9 @@
     if (matchindex <0)
         return full;
     return full.substring(0, matchindex)
-        + "<span class='match'>"
+        + '<span class="select2-match">'
         + full.substr(matchindex, snippet.length)
-        + "</span>" + full.substring(matchindex + snippet.length);
+        + '</span>' + full.substring(matchindex + snippet.length);
 };
 
 // Return html snippet for showing the provided gravatar url