Skip to content

Commit

Permalink
fixed the broken "popular tags" (#1179)
Browse files Browse the repository at this point in the history
* fixed so that you can click on the popular tags to filter with them

* fixed linter errors

* liiiint

* eslint and prettier cannot agree, so tidy this up to be consistent
  • Loading branch information
johanforslund authored and shiftkey committed Sep 26, 2019
1 parent 08a16ee commit e1ddc9e
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions javascripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,20 @@ define([
selTags = $('.tags-filter').val() || [];
selectedTag = preparePopTagName($(this).text() || '');
if (selectedTag) {
selTags.push(selectedTag);
location.href = updateQueryStringParameter(
getFilterUrl(),
'tags',
encodeURIComponent(selTags)
);
tagID = projectsSvc
.getTags()
.map(function(tag) {
return tag.name.toLowerCase();
})
.indexOf(selectedTag);
if (tagID !== -1) {
selTags.push(selectedTag);
location.href = updateQueryStringParameter(
getFilterUrl(),
'tags',
encodeURIComponent(selTags)
);
}
}
});
});
Expand Down

0 comments on commit e1ddc9e

Please sign in to comment.