use indexOf not matches for searching for project by name

matches treats string like regex so chars like ( break it
just doing a simple indexOf == -1 is fine for a string match

will also fix it for projects with . in name which do come up
This commit is contained in:
Henry Oswald 2016-11-15 11:41:14 +00:00
parent 6776aa61f1
commit b9001f19e6

View file

@ -99,7 +99,7 @@ define [
visible = true
# Only show if it matches any search text
if $scope.searchText.value? and $scope.searchText.value != ""
if !project.name.toLowerCase().match($scope.searchText.value.toLowerCase())
if project.name.toLowerCase().indexOf($scope.searchText.value.toLowerCase()) == -1
visible = false
# Only show if it matches the selected tag
if $scope.filter == "tag" and selectedTag? and project.id not in selectedTag.project_ids