diff options
author | Patrick G <geek1011@users.noreply.github.com> | 2017-03-11 08:45:15 +0000 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-03-11 16:45:15 +0800 |
commit | 64214a9426c93040225c2df46f7f7809e2470b20 (patch) | |
tree | 4fb10114ffea9989143d02a1be525596aa863cd3 /public/js | |
parent | e2b2fd6e78a3181fa490f299f4c257eb5e0cc35d (diff) | |
download | gitea-64214a9426c93040225c2df46f7f7809e2470b20.tar.gz gitea-64214a9426c93040225c2df46f7f7809e2470b20.zip |
Search bar fixes for #1187 and #1205 (#1207)
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/index.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/public/js/index.js b/public/js/index.js index 1470a44b97..98a0efff47 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 |