From 70299ea5c2a9ae0ed6cfe7b0d56775bd41e13ada Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Mon, 3 Mar 2014 14:46:50 -0500 Subject: [PATCH] better search result page --- public/src/forum/search.js | 6 +++--- public/templates/search.tpl | 36 +++++++++++++----------------------- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/public/src/forum/search.js b/public/src/forum/search.js index 71ed19b69f..3d3c72389e 100644 --- a/public/src/forum/search.js +++ b/public/src/forum/search.js @@ -3,14 +3,14 @@ define(function() { Search.init = function() { var searchQuery = $('#topic-results').attr('data-search-query'); - $('.search-result-text').children().each(function() { - var text = $(this).text(); + + $('.search-result-text').each(function() { + var text = $(this).html(); var regex = new RegExp(searchQuery, 'gi'); text = text.replace(regex, '' + searchQuery + ''); $(this).html(text); }); - $('#search-form input').val(searchQuery); $('#mobile-search-form').off('submit').on('submit', function() { diff --git a/public/templates/search.tpl b/public/templates/search.tpl index 55a3b57443..393a6d7e04 100644 --- a/public/templates/search.tpl +++ b/public/templates/search.tpl @@ -13,7 +13,7 @@ -