Skip to content

Commit

Permalink
fixed tag filter
Browse files Browse the repository at this point in the history
  • Loading branch information
khalidadil committed Aug 26, 2014
1 parent 2fea34a commit 616bee4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ var ToolView = Parse.View.extend({
this.listing.query.equalTo("subcategory", subcategory.replace('_', ' ').toLowerCase());

if (filterCat === "tag") {
filter = filter.charAt(0).toUpperCase() + filter.slice(1);
filter = filter.replace("_"," ");
// filter = filter.charAt(0).toUpperCase() + filter.slice(1);
this.listing.query.equalTo("tags", filter);
}

Expand Down
2 changes: 1 addition & 1 deletion templates/tool.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<ul>
<% if (tags){
for (var loc in tags){ %>
<a href="#<%= category.replace(" ", "_").toLowerCase() %>/<%= subcategory.replace(" ", "_") %>/filter/tag/<%= tags[loc].replace(" ", "_").toLowerCase() %>"><li><%= tags[loc] %></li></a>
<a href="#<%= category.replace(" ", "_").toLowerCase() %>/<%= subcategory.replace(" ", "_") %>/filter/tag/<%= tags[loc].replace(" ", "_") %>"><li><%= tags[loc] %></li></a>
<% }
} %>
</ul>
Expand Down

0 comments on commit 616bee4

Please sign in to comment.