incubator-bloodhound-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anze Staric <anze.sta...@gmail.com>
Subject Re: [REGRESSION] What should be italics is rendered as bold text WAS: svn commit: r1456892 - /incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
Date Fri, 22 Mar 2013 09:24:54 GMT
The change was introduced in r1452190 with match highlighting in
search. The tag <em> was chosen as the tag to mark matches based on
the default choise of Solr (<em> for emphasis -
http://lucene.apache.org/solr/4_1_0/tutorial.html#Highlighting).

Css was modified to match the look of the google search results (bold
matches). As it only changes style inside elements marked as
searchable it was not supposed to break anything outside the search
results. I forgot to check whether the css class was used in other
contexts. The following patch replaces the name of the class marking
the search results that need to be highlighted.

--- bloodhound_theme/bhtheme/htdocs/bloodhound.css (revision 1459423)
+++ bloodhound_theme/bhtheme/htdocs/bloodhound.css (working copy)
@@ -476,7 +476,7 @@
  text-decoration: underline;
 }

-.searchable em {
+.highlight_matches em {
  font-style: inherit;
  font-weight: bold;
 }
Index: bloodhound_search/bhsearch/templates/bhsearch.html
===================================================================
--- bloodhound_search/bhsearch/templates/bhsearch.html (revision 1459423)
+++ bloodhound_search/bhsearch/templates/bhsearch.html (working copy)
@@ -126,7 +126,7 @@
                       <tr class="${'odd' if idx % 2 else 'even'}
prio${result.priority_value}${
                         ' added' if 'added' in result else ''}${
                         ' changed' if 'changed' in result else ''}${
-                        ' removed' if 'removed' in result else ''} searchable">
+                        ' removed' if 'removed' in result else ''}
highlight_matches">
                         <py:for each="idx, header in
enumerate(headers)" py:choose="">
                           <py:with vars="name = header.name; value =
result[name]; hilited_value=result['hilited_' + name]; title = _('View
')+ result['type']">
                             <td py:when="name == 'id'" class="id"><a
href="$result.href" title="${title}"
@@ -154,8 +154,8 @@
                 <!--Rendering results in free form-->
                 <dl id="results">
                   <py:for each="result in results">
-                    <dt><a href="${result.href}"
class="searchable">${result.title}</a></dt>
-                    <dd class="searchable">${result.hilited_content
or result.content}</dd>
+                    <dt><a href="${result.href}"
class="highlight_matches">${result.title}</a></dt>
+                    <dd
class="highlight_matches">${result.hilited_content or
result.content}</dd>
                     <dd>
                       <py:if test="result.author"><span
class="author" i18n:msg="author">By
${format_author(result.author)}</span> &mdash;</py:if>
                       <span class="date">${result.date}</span>


Anze

Mime
View raw message