Changeset 26307


Ignore:
Timestamp:
2012-10-11T16:39:21+13:00 (12 years ago)
Author:
sjm84
Message:

The view option images can now be clicked as well as the checkboxes

Location:
main/trunk/greenstone3/web/interfaces/default
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js

    r26306 r26307  
    950950* HIGHLIGHTING SCRIPTS *
    951951***********************/
    952 function swapHighlight()
     952function swapHighlight(imageClicked)
    953953{
    954954    var hlCheckbox = document.getElementById("highlightOption");
     955
     956    if(imageClicked)
     957    {
     958        $(hlCheckbox).attr("checked", !$(hlCheckbox).attr("checked"));
     959    }
    955960   
    956961    var from;
     
    10351040{
    10361041    var option = document.getElementById("rbOption");
     1042    var optionImage = document.getElementById("rbOptionImage");
     1043   
    10371044    if(rbOn)
    10381045    {
    10391046        option.setAttribute("onclick", "hideText(); showBook(); swapLinkJavascript(false);");
     1047        optionImage.setAttribute("onclick", "hideText(); showBook(); swapLinkJavascript(false);");
     1048        $(option).attr("checked", false);
    10401049    }
    10411050    else
    10421051    {
    10431052        option.setAttribute("onclick", "hideBook(); showText(); swapLinkJavascript(true);");
     1053        optionImage.setAttribute("onclick", "hideBook(); showText(); swapLinkJavascript(true);");
     1054        $(option).attr("checked", true);
    10441055    }
    10451056}
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/toc.xsl

    r26304 r26307  
    265265                        </xsl:choose>
    266266                    </xsl:attribute>
    267                     <img>
     267                    <img onclick="showSlideShow()">
    268268                        <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'slideshow_image')"/></xsl:attribute>
    269269                    </img>
     
    283283                    <li>
    284284                        <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.realisticBooksTooltip')"/></xsl:attribute>
    285                         <img>
     285                        <img id="rbOptionImage" onclick="bookInit();">
    286286                            <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'realistic_books_image')"/></xsl:attribute>
    287287                        </img>
     
    294294                    <li>
    295295                        <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.highlightTooltip')"/></xsl:attribute>
    296                         <img>
     296                        <img onclick="swapHighlight(true);">
    297297                            <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'highlight_image')"/></xsl:attribute>
    298298                        </img>
    299                         <input id="highlightOption" type="checkbox" class="optionCheckBox" onclick="swapHighlight();">
     299                        <input id="highlightOption" type="checkbox" class="optionCheckBox" onclick="swapHighlight(false);">
    300300                            <xsl:if test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
    301301                                <xsl:attribute name="checked">true</xsl:attribute>
     
    308308                <li id="zoomOptions" style="display:none;">
    309309                    <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.zoomTooltip')"/></xsl:attribute>
    310                     <img>
     310                    <img id="zoomToggleImage">
    311311                        <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'zoom_image')"/></xsl:attribute>
    312312                    </img>
     
    318318                                _imageZoomEnabled = $("#zoomToggle").attr("checked");
    319319                            });
     320                           
     321                            $("#zoomToggleImage").click(function()
     322                            {
     323                                $("#zoomToggle").attr("checked", !$("#zoomToggle").attr("checked"));
     324                                _imageZoomEnabled = $("#zoomToggle").attr("checked");
     325                            });
    320326                        </xsl:text>
    321327                    </script>
     
    326332                    <li id="floatingTOCOptions">
    327333                        <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.floatingTooltip')"/></xsl:attribute>
    328                         <img>
     334                        <img id="floatTOCToggleImage">
    329335                            <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'float_toc_image')"/></xsl:attribute>
    330336                        </img>
     
    337343                                    floatMenu($("#floatTOCToggle").attr("checked"));
    338344                                });
     345                               
     346                                $("#floatTOCToggleImage").click(function()
     347                                {
     348                                    $("#floatTOCToggle").attr("checked", !$("#floatTOCToggle").attr("checked"))
     349                                    floatMenu($("#floatTOCToggle").attr("checked"));
     350                                });
    339351                            </xsl:text>
    340352                        </script>
Note: See TracChangeset for help on using the changeset viewer.