Node.js based forum software built for the modern web
search page change
Baris Soner Usakli7dfdab0a2d93
diff --git a/public/src/forum/search.js b/public/src/forum/search.jsindex 3d3c72389e..e6cdcca11e 100644--- a/public/src/forum/search.js+++ b/public/src/forum/search.js@@ -5,10 +5,12 @@ define(function() {var searchQuery = $('#topic-results').attr('data-search-query');$('.search-result-text').each(function() {- var text = $(this).html();+ var result = $(this);+ var text = result.html();var regex = new RegExp(searchQuery, 'gi');text = text.replace(regex, '<span class="label label-success">' + searchQuery + '</span>');- $(this).html(text);+ result.html(text);+ result.find('img').addClass('img-responsive');});$('#search-form input').val(searchQuery);diff --git a/public/templates/search.tpl b/public/templates/search.tplindex ceb1082404..f1bdd76006 100644--- a/public/templates/search.tpl+++ b/public/templates/search.tpl@@ -31,7 +31,7 @@<a href="../../topic/{topics.slug}" class="search-result-text">- {topics.title}+ <h4>{topics.title}</h4></a><div>@@ -61,10 +61,13 @@<!-- BEGIN posts --><div class="topic-row panel panel-default clearfix"><div class="panel-body">+<a href="../../topic/{posts.topic.slug}#{posts.pid}" class="search-result-text">- {posts.content}+ <h4>{posts.topic.title}</h4></a>-+ <div class="search-result-text">+ {posts.content}+ </div><div><small><span class="pull-right">