Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-27 20:26:09 +01:00

Search bar fixes for #1187 and #1205 (#1207)

This commit is contained in:
Patrick G 2017-03-11 08:45:15 +00:00 committed by Lunny Xiao
parent e2b2fd6e78
commit 64214a9426

View file

@ -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