Changeset 38950 for main


Ignore:
Timestamp:
2024-04-24T14:24:54+12:00 (4 weeks ago)
Author:
anupama
Message:

Added an applet shim for phind and this time correctly set the display for the collage (and phind) applet to none by setting it in the applet's style attribute, where it belongs, instead of as its own attribute on the element.

Location:
main/trunk/greenstone3/web/interfaces/default/transform
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/webswing-collage.xsl

    r38948 r38950  
    125125       webswingParams["imageType"] = ".jpg%.png";
    126126       webswingParams["classifier"] = gs.cgiParams.cl + ".1";
    127        
    128127       
    129128       
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl

    r38948 r38950  
    169169TODO: double-quotes for attributes.
    170170    -->
    171     <applet display="none"
    172         id="collage-applet-element"
    173         code="org.greenstone.applet.GsdlCollageApplet.GsdlCollageApplet.class"
    174         archive="GsdlCollageApplet.jar, webswing-api.jar"
    175         width="800"
    176         height="400">
     171    <applet
     172    style="display:none"
     173    id="collage-applet-element"
     174    code="org.greenstone.applet.GsdlCollageApplet.GsdlCollageApplet.class"
     175    archive="GsdlCollageApplet.jar, webswing-api.jar"
     176    width="800"
     177    height="400">
    177178      <xsl:attribute name="codebase">/<xsl:value-of select="$servlet_context"/>/applet</xsl:attribute>
    178179
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/webswing-phind.xsl

    r38948 r38950  
    2121
    2222    <xsl:template name="pageTitle">WebSwing Phind<!--<gslib:collectionName/><xsl:value-of select="/page/pageResponse/service/applet"/>--></xsl:template>
    23 
    2423
    2524    <!-- set page breadcrumbs -->
     
    7271            </xsl:when>     
    7372        </xsl:choose>   
    74  
    75         <!--Display the description text of the current collection,
    76         and if some services are available then create a list
    77         of links for each service within a <ul id="servicelist"> element.-->
     73
     74        <!-- Inactive applet element that is used as a shim by our webswing JavaScript
     75             code to read alll param values from and configure the webswing JPhind with.
     76             The applet needs to appear on the page before the JavaScript code that
     77             tries to locate it, for its parameters to be used to configure the webswing
     78             instance. If there applet appears later or there is no applet, the
     79             JavaScript will fallback to obtaining the webswing config settings from
     80             XSLT/pageResponse.
     81        -->
     82        <xsl:call-template name="phind-applet-shim"/>
     83        <!-- the webswing instance and JavaScript code -->
    7884        <xsl:call-template name="webswing-embed-phind"/>
     85    </xsl:template>
     86
     87    <!-- Although applets are defunct, we use the phind and collage applets as shims:
     88         JavaScript reads parameters set on the phind/collage applet and instantiates
     89         the webswing application with those settings.
     90         The JavaScript code has been written to work even with the applet element on
     91         the page, but the applet element may be easier to customise for users than
     92         the JavaScript code or the webswing arguments or webswing config file, so it
     93         may be preferrable.
     94    -->
     95    <xsl:template name="phind-applet-shim">
     96      <applet
     97          style="display: none"
     98          id="phind-applet-element"
     99          archive="phind.jar, xercesImpl.jar, xml-apis.jar, webswing-api.jar"
     100          code="org.greenstone.applet.phind.JPhind.class"
     101          codebase="applet"
     102          height="400"
     103          width="500">
     104        <param name="library" value="library" />
     105        <param name="phindcgi" value="?a=a&amp;rt=r&amp;s=PhindApplet&amp;o=xml&amp;ro=1" />
     106        <param name="collection" value="tudor" />
     107        <param name="classifier" value="1" />
     108        <param name="orientation" value="vertical" />
     109        <param name="depth" value="2" />
     110        <param name="resultorder" value="L,l,E,e,D,d" />
     111        <param name="backdrop" value="interfaces/default/images/phindbg1.jpg" />
     112        <param name="fontsize" value="10" />
     113        <param name="blocksize" value="10" />
     114        The Phind java applet.
     115      </applet>
    79116    </xsl:template>
    80117   
Note: See TracChangeset for help on using the changeset viewer.