mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-15 18:05:50 +01:00
Merge pull request #1550 from tkgdsg/branch_filter_improve
modify branch filter method
This commit is contained in:
@@ -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().lastIndexOf(inputVal, 0) >= 0) {
|
||||
if (!inputVal || !elem.text.trim() || elem.text.trim().match(new RegExp(inputVal,'i'))) {
|
||||
$(elem).parent().show();
|
||||
} else {
|
||||
$(elem).parent().hide();
|
||||
|
||||
Reference in New Issue
Block a user