From 64214a9426c93040225c2df46f7f7809e2470b20 Mon Sep 17 00:00:00 2001 From: Patrick G Date: Sat, 11 Mar 2017 08:45:15 +0000 Subject: [PATCH] Search bar fixes for #1187 and #1205 (#1207) --- public/js/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index 1470a44b9..98a0efff4 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1523,11 +1523,9 @@ $(function () { $("#search_repo").on('change paste keyup',function(){ var value = $(this).val(); - if(!value){ - $('.list-search-style').html(''); - } else{ - $('.list-search-style').html('.search-list li:not([data-title*="' + value + '"]) {display: none;}'); - } + $.map($('.search-list li'), function(i) { + $(i).css("display", (value.trim().length == 0 || $(i).attr("data-title").trim().toLowerCase().indexOf(value.trim().toLowerCase()) > -1) ? "" : "none"); + }); }); // Parse SSH Key