Skip to content

Commit

Permalink
Search bar fixes for #1187 and #1205 (#1207)
Browse files Browse the repository at this point in the history
  • Loading branch information
geek1011 authored and lunny committed Mar 11, 2017
1 parent e2b2fd6 commit 64214a9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 64214a9

Please sign in to comment.