Project

General

Profile

« Previous | Next » 

Revision 498

Added by Matt Jones about 24 years ago

Replaced imagemap with anchor links in the web interface to simplify the
rearrangement of the interface. This new feature uses javascript to
submit the form when the link is clicked.

View differences:

marine.xsl
20 20
    <html>
21 21
      <head>
22 22
        <link rel="stylesheet" type="text/css" href="@html-path@/style/rowcol.css" />
23
        <script language="JavaScript">
24
          <![CDATA[
25
          function submitform(current_action,form_ref) {
26
              form_ref.action.value=current_action;
27
              form_ref.submit();
28
          }
29
          ]]>
30
        </script>
31

  
23 32
      </head>
24 33
      <body class="emlbody">
25 34
        <a name="top" />
......
327 336

  
328 337
          <td>
329 338
            <form action="@html-path@/servlet/marine" method="POST">
339
              <xsl:attribute name="name">
340
                <xsl:value-of select="translate(./docid,':','')"/>
341
              </xsl:attribute>
330 342
            <!-- abstractpath tells the servlet where the abstract is in the 
331 343
                 document.  The % sign is used because the path could be
332 344
                 resource/literature or resource/dataset. -->
333 345
            <input type="hidden" name="abstractpath" value="resource/%/abstract" />
334 346
            <input type="hidden" name="action" value="getdocument"/>
347
            <input type="hidden" name="docid">
348
              <xsl:attribute name="value">
349
                <xsl:value-of select="./docid"/>
350
              </xsl:attribute>
351
            </input>
335 352
            <xsl:for-each select="./relation">
336 353
              <input type="hidden" name="relation">
337 354
                <xsl:attribute name="value" >
......
339 356
                </xsl:attribute>
340 357
              </input>
341 358
            </xsl:for-each>
342
              <input border="0" type="image">
343
                <xsl:attribute name="src">
344
                  <xsl:choose>
345
                    <xsl:when test="position() 
346
                         mod 2 = 1">@image-path@/marine/whiteMenu.jpg</xsl:when>
347
                    <xsl:when test="position() 
348
                         mod 2 = 0">@image-path@/marine/blueMenu.jpg</xsl:when>
349
                  </xsl:choose>
350
                </xsl:attribute>
351
                <xsl:attribute name="name">
352
                  <xsl:value-of select="./docid"/>
353
                </xsl:attribute>
354
              </input>
355
              </form>
356
              <pre>Document ID: <xsl:value-of select="./docid"/></pre>
359

  
360
            <a>
361
              <xsl:attribute name="href">javascript:submitform('getdocument',document.<xsl:value-of select="translate(./docid, ':', '')"/>)</xsl:attribute>
362
               Dataset Information
363
            </a><br />
364
            <a>
365
              <xsl:attribute name="href">javascript:submitform('getabstract',document.<xsl:value-of select="translate(./docid,':','')"/>)</xsl:attribute>
366
              View Abstract
367
            </a><br />
368
            <a>
369
              <xsl:attribute name="href">javascript:submitform('getdatadoc',document.<xsl:value-of select="translate(./docid,':','')"/>)</xsl:attribute>
370
               Download Data and Metadata
371
            </a><br />
372
<!--
373
            <input border="0" type="image">
374
              <xsl:attribute name="src">
375
                <xsl:choose>
376
                  <xsl:when test="position() 
377
                       mod 2 = 1">@image-path@/marine/whiteMenu.jpg</xsl:when>
378
                  <xsl:when test="position() 
379
                       mod 2 = 0">@image-path@/marine/blueMenu.jpg</xsl:when>
380
                </xsl:choose>
381
              </xsl:attribute>
382
              <xsl:attribute name="name">
383
                <xsl:value-of select="./docid"/>
384
              </xsl:attribute>
385
            </input>
386
-->
387
            </form>
388
            <pre>Document ID: <xsl:value-of select="./docid"/></pre>
357 389
          </td>
358 390
          <td>
359 391
            <font size="4">

Also available in: Unified diff