Commit 2db92079 authored by Curtis Adam's avatar Curtis Adam

Link the author name to the filter

parent 58b4bae0
...@@ -86,6 +86,10 @@ Template.filterIndex.events({ ...@@ -86,6 +86,10 @@ Template.filterIndex.events({
'click .resultItemHeaderBottomAreaLabels .label-transcript-bonus': function () { 'click .resultItemHeaderBottomAreaLabels .label-transcript-bonus': function () {
Filter.setActiveFilter(true, "transcriptBonus"); Filter.setActiveFilter(true, "transcriptBonus");
FilterNavigation.showDropdown(); FilterNavigation.showDropdown();
},
'click .resultItemHeaderAuthor a': function (event) {
Filter.setActiveFilter($(event.target).data('id'), "author");
FilterNavigation.showDropdown();
} }
}); });
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<div class="resultItemHeader authorProfile resultItemHeaderAuthor {{this.gridSize}} collapseButton {{getCardsetBackground <div class="resultItemHeader authorProfile resultItemHeaderAuthor {{this.gridSize}} collapseButton {{getCardsetBackground
this.difficulty this.cardType}}" this.difficulty this.cardType}}"
data-id="{{this.owner}}"> data-id="{{this.owner}}">
{{getAuthorName this.owner}} <a href="" data-id="{{this.owner}}">{{getAuthorName this.owner}}</a>
</div> </div>
</template> </template>
...@@ -152,7 +152,7 @@ Template.main.onRendered(function () { ...@@ -152,7 +152,7 @@ Template.main.onRendered(function () {
MainNavigation.clearSearch(); MainNavigation.clearSearch();
$('.navbar-cards-search-dropdown').removeClass('active'); $('.navbar-cards-search-dropdown').removeClass('active');
} }
if (!$(event.target).is('.cards-filter-element') && !$(event.target).parents('.resultItemHeaderBottomAreaLabels').length) { if (!$(event.target).is('.resultItemHeaderAuthor a') && !$(event.target).is('.cards-filter-element') && !$(event.target).parents('.resultItemHeaderBottomAreaLabels').length) {
MainNavigation.clearSearch(); MainNavigation.clearSearch();
$('.navbar-cards-filter-dropdown').removeClass('active'); $('.navbar-cards-filter-dropdown').removeClass('active');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment