Ignore:
Timestamp:
2014-09-22T13:19:35+12:00 (10 years ago)
Author:
kjdon
Message:

made search term highlighting on by default. set hl=off in url to turn it off. Using .attr to access 'checked' doesn't work in jquery 1.9.2 and higher. Changing to use .prop instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/toc.xsl

    r29165 r29319  
    297297                        </img>
    298298                        <input id="highlightOption" type="checkbox" class="optionCheckBox" onclick="swapHighlight(false);">
    299                             <xsl:if test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
    300                                 <xsl:attribute name="checked">true</xsl:attribute>
     299                            <xsl:if test="/page/pageRequest/paramList/param[@name = 'hl']/@value != 'off'">
     300                                <xsl:attribute name="checked">checked</xsl:attribute>
    301301                            </xsl:if>
    302302                        </input>
     
    315315                            $("#zoomToggle").change(function()
    316316                            {
    317                                 _imageZoomEnabled = $("#zoomToggle").attr("checked");
     317                                _imageZoomEnabled = $("#zoomToggle").prop("checked");
    318318                            });
    319319                           
    320320                            $("#zoomToggleImage").click(function()
    321321                            {
    322                                 $("#zoomToggle").attr("checked", !$("#zoomToggle").attr("checked"));
    323                                 _imageZoomEnabled = $("#zoomToggle").attr("checked");
     322                                $("#zoomToggle").prop("checked", !$("#zoomToggle").prop("checked"));
     323                                _imageZoomEnabled = $("#zoomToggle").prop("checked");
    324324                            });
    325325                        </xsl:text>
     
    337337                        <script type="text/javascript">
    338338                            <xsl:text disable-output-escaping="yes">
    339                                 $("#floatTOCToggle").attr("checked", false);
     339                                $("#floatTOCToggle").prop("checked", false);
    340340                                $("#floatTOCToggle").click(function()
    341341                                {
    342                                     floatMenu($("#floatTOCToggle").attr("checked"));
     342                                    floatMenu($("#floatTOCToggle").prop("checked"));
    343343                                });
    344344                               
    345345                                $("#floatTOCToggleImage").click(function()
    346346                                {
    347                                     $("#floatTOCToggle").attr("checked", !$("#floatTOCToggle").attr("checked"))
    348                                     floatMenu($("#floatTOCToggle").attr("checked"));
     347                                    $("#floatTOCToggle").prop("checked", !$("#floatTOCToggle").prop("checked"))
     348                                    floatMenu($("#floatTOCToggle").prop("checked"));
    349349                                });
    350350                            </xsl:text>
     
    356356                                $(window).load(function()
    357357                                {
    358                                     $("#floatTOCToggle").attr("checked", true);
     358                                    $("#floatTOCToggle").prop("checked", true);
    359359                                    floatMenu(true);
    360360                                });
Note: See TracChangeset for help on using the changeset viewer.