Fix for Bug 5075 - Terms not highlighted w/ xslt on github/bug5075 origin/new/bug5075
authorOwen Leonard <oleonard@myacpl.org>
Thu, 9 Sep 2010 16:07:44 +0000 (12:07 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Tue, 26 Oct 2010 13:26:58 +0000 (09:26 -0400)
- XSLT didn't contain the class markup which acts as a hook
  for the JavaScript highlighting system.
- Standard results page also contained a typo which
  prevented data other than title and author from
  being highlighted

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl

index 3282600..3d59dd1 100644 (file)
@@ -90,7 +90,7 @@ function highlightOn() {
     for (x in q_array) {
        $(".title").highlight(q_array[x]);
        $(".author").highlight(q_array[x]);
-        $(".result_summary").highlight(q_array[x]);
+        $(".results_summary").highlight(q_array[x]);
     }
     $(".highlight_toggle").toggle();
 }
index aaa702a..372d31c 100644 (file)
            </xsl:call-template>
         </xsl:if>
 
-       <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
+        <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute><xsl:attribute name="class">title</xsl:attribute>
 
         <xsl:if test="marc:datafield[@tag=245]">
         <xsl:for-each select="marc:datafield[@tag=245]">
     <xsl:choose>
     <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
 
-    by 
+    by <span class="author">
         <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
             <xsl:choose>
             <xsl:when test="position()=last()">
             </xsl:otherwise>
             </xsl:choose>
         </xsl:for-each>
+    </span>
     </xsl:when>
     </xsl:choose>
     </p>