From 9d75f411729db86f6337c4123295737fd8a835c8 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 4 Sep 2014 15:30:08 +1000 Subject: [PATCH] try softening highlight on topic stop highlighting categories --- .../discourse/templates/search/topic_result.js.handlebars | 2 +- .../javascripts/discourse/views/search-results-type.js.es6 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/search/topic_result.js.handlebars b/app/assets/javascripts/discourse/templates/search/topic_result.js.handlebars index 833ac3d53..ae557f855 100644 --- a/app/assets/javascripts/discourse/templates/search/topic_result.js.handlebars +++ b/app/assets/javascripts/discourse/templates/search/topic_result.js.handlebars @@ -1,6 +1,6 @@ - {{topic-status topic=topic disableActions=true}}{{unbound topic.title}}{{category-badge topic.category}} + {{topic-status topic=topic disableActions=true}}{{unbound topic.title}}{{category-badge topic.category}} {{#unless Discourse.Mobile.mobileView}} diff --git a/app/assets/javascripts/discourse/views/search-results-type.js.es6 b/app/assets/javascripts/discourse/views/search-results-type.js.es6 index e914d2ceb..31a55de99 100644 --- a/app/assets/javascripts/discourse/views/search-results-type.js.es6 +++ b/app/assets/javascripts/discourse/views/search-results-type.js.es6 @@ -8,7 +8,8 @@ export default Ember.CollectionView.extend({ didInsertElement: function(){ var term = this.get('controller.term'); if(!_.isEmpty(term)) { - this.$().highlight(term.split(/\s+/)); + this.$('.blurb').highlight(term.split(/\s+/)); + this.$('.topic-title').highlight(term.split(/\s+/), {className: 'highlighted'} ); } } });