diff --git a/src/main/twirl/gitbucket/core/dashboard/sidebar.scala.html b/src/main/twirl/gitbucket/core/dashboard/sidebar.scala.html index faf5d5a..ec18663 100644 --- a/src/main/twirl/gitbucket/core/dashboard/sidebar.scala.html +++ b/src/main/twirl/gitbucket/core/dashboard/sidebar.scala.html @@ -49,10 +49,7 @@ $('#filter-box').keyup(function(){ var inputVal = $('#filter-box').val(); $.each($('li.repo-link a'), function(index, elem) { - console.log(inputVal); - console.log(elem.text.trim()); - console.log(elem.text.trim().lastIndexOf(inputVal, 0)); - if (!inputVal || !elem.text.trim() || elem.text.trim().indexOf(inputVal) >= 0) { + if ( !inputVal || !elem.text.trim() || elem.text.trim().toLowerCase().indexOf(inputVal.toLowerCase()) >= 0 ) { $(elem).parent().show(); } else { $(elem).parent().hide(); diff --git a/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html b/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html index 4d3c673..38a5d93 100644 --- a/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html +++ b/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html @@ -31,7 +31,7 @@ $('#branch-control-input').keyup(function() { var inputVal = $('#branch-control-input').val(); $.each($('#branch-control-input').parent().parent().find('a'), function(index, elem) { - if (!inputVal || !elem.text.trim() || elem.text.trim().match(new RegExp(inputVal,'i'))) { + if (!inputVal || !elem.text.trim() || elem.text.trim().toLowerCase().indexOf(inputVal.toLowerCase()) >= 0) { $(elem).parent().show(); } else { $(elem).parent().hide(); diff --git a/src/main/twirl/gitbucket/core/helper/dropdown.scala.html b/src/main/twirl/gitbucket/core/helper/dropdown.scala.html index 2becc79..a98c53c 100644 --- a/src/main/twirl/gitbucket/core/helper/dropdown.scala.html +++ b/src/main/twirl/gitbucket/core/helper/dropdown.scala.html @@ -32,7 +32,7 @@ $('#@{filter}-input').keyup(function() { var inputVal = $('#@{filter}-input').val(); $.each($('#@{filter}-input').parent().parent().find('a'), function(index, elem) { - if (!inputVal || !elem.text.trim() || elem.text.trim().lastIndexOf(inputVal, 0) >= 0) { + if ( !inputVal || !elem.text.trim() || elem.text.trim().toLowerCase().indexOf(inputVal.toLowerCase()) >=0 ) { $(elem).parent().show(); } else { $(elem).parent().hide();