Merge pull request #506 from jepler/flexible-text-search
downloads search: Enable text search on id, manufacturer, and features
This commit is contained in:
commit
3b4877a439
1 changed files with 2 additions and 2 deletions
|
|
@ -326,9 +326,9 @@ function shouldDisplayDownload(download, displayedManufacturers, displayedFeatur
|
|||
|
||||
if (downloadsSearch.searchTerm && downloadsSearch.searchTerm.length > 0 && shouldDisplay) {
|
||||
var regex = new RegExp(downloadsSearch.searchTerm, "gi");
|
||||
var name = download.dataset.name;
|
||||
var haystack = download.dataset.name + " " + download.dataset.id + " " + download.dataset.manufacturer + " " + download.dataset.features;
|
||||
|
||||
shouldDisplay = name.match(regex);
|
||||
shouldDisplay = haystack.match(regex);
|
||||
}
|
||||
|
||||
return shouldDisplay;
|
||||
|
|
|
|||
Loading…
Reference in a new issue