dev/patrick #1
@@ -596,10 +596,12 @@ function updateContributionsList() {
|
|||||||
var filtered = contributionsData.filter(function (f) {
|
var filtered = contributionsData.filter(function (f) {
|
||||||
var props = f.properties;
|
var props = f.properties;
|
||||||
var matchesCategory = activeFilters.indexOf(props.category) !== -1;
|
var matchesCategory = activeFilters.indexOf(props.category) !== -1;
|
||||||
|
var cat = CATEGORIES[props.category] || CATEGORIES.other;
|
||||||
var matchesSearch = !searchTerm ||
|
var matchesSearch = !searchTerm ||
|
||||||
props.title.toLowerCase().indexOf(searchTerm) !== -1 ||
|
props.title.toLowerCase().indexOf(searchTerm) !== -1 ||
|
||||||
(props.description && props.description.toLowerCase().indexOf(searchTerm) !== -1) ||
|
(props.description && props.description.toLowerCase().indexOf(searchTerm) !== -1) ||
|
||||||
props.author_name.toLowerCase().indexOf(searchTerm) !== -1;
|
props.author_name.toLowerCase().indexOf(searchTerm) !== -1 ||
|
||||||
|
cat.label.toLowerCase().indexOf(searchTerm) !== -1;
|
||||||
return matchesCategory && matchesSearch;
|
return matchesCategory && matchesSearch;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user