Changeset 30463

Show
Ignore:
Timestamp:
03.04.2016 23:06:05 (4 years ago)
Author:
davidb
Message:

Changes to implement Greenstone3 version of goto form

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/mozarts-laptop/collect/digital-music-stand/transform/pages/document.xsl

    r30459 r30463  
    99    exclude-result-prefixes="java util gsf"> 
    1010 
    11  
     11   
    1212  <xsl:template name="wrappedDocument"> 
    1313    <div id="gs-document"> 
     14       
    1415      <xsl:call-template name="documentPre"/> 
    1516      <div id="gs-document-text" class="documenttext" collection="{/page/pageResponse/collection/@name}"><!-- *** --> 
     17 
     18    <style> 
     19      /* Variation on detail given in: 
     20          http://stackoverflow.com/questions/2279396/how-to-remove-unwanted-space-between-rows-and-columns-in-table 
     21      */ 
     22       
     23      fieldset, form, label, legend, 
     24      table, caption, tbody, tfoot, thead, tr, th, td { 
     25        margin: 0; 
     26        padding: 0; 
     27        border: 0; 
     28        font-size: 100%; 
     29        font: inherit; 
     30        vertical-align: baseline; 
     31      } 
     32      </style> 
     33 
    1634    <xsl:call-template name="create-html-header"/> 
    1735     
     
    1937      <xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/> 
    2038    </xsl:variable> 
     39 
     40    <gsf:variable name="cgiParamSite"> 
     41      <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'site']/@value"/> 
     42    </gsf:variable> 
     43    <gsf:variable name="cgiParamD"> 
     44      <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'd']/@value"/> 
     45    </gsf:variable> 
     46    <gsf:variable name="cgiParamCL"> 
     47      <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'cl']/@value"/> 
     48    </gsf:variable> 
     49     
    2150    <gsf:variable name="cgiParamPageWidth"> 
    2251      <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'pageWidth']/@value"/> 
     
    2554      <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'pageHeight']/@value"/> 
    2655    </gsf:variable> 
    27     <table align="center" width="{$cgiParamPageWidth}"> 
     56    <gsf:variable name="cgiParamPagePrefix"> 
     57      <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'pagePrefix']/@value"/> 
     58    </gsf:variable> 
     59    <gsf:variable name="cgiParamPageSuffix"> 
     60      <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'pageSuffix']/@value"/> 
     61    </gsf:variable> 
     62    <gsf:variable name="cgiParamNumPages"> 
     63      <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'numPages']/@value"/> 
     64    </gsf:variable> 
     65    <gsf:variable name="cgiParamScaleFactor"> 
     66      <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'scaleFactor']/@value"/> 
     67    </gsf:variable> 
     68 
     69     
     70    <table id="gotoNavBar" align="center" width="{$cgiParamPageWidth}">  
    2871      <tr> 
    2972        <td align="left" width="20%"> 
    30           <a href="javascript:prevPageAnim(gs.cgiParams['d'],'.png')"> 
    31         <span id="prevpagespan" style="display: inline;">_iconprev_<span id="prevpageval"><script language="javascript" type="text/javascript">musicStand.docwritePrevPageNum()</script></span></span> 
     73          <a href="javascript:musicStand.prevPageAnim(gs.cgiParams['d'],'.png')"> 
     74        <span id="prevpagespan" style="display: inline;"> 
     75          <img class="lessarrow" src="interfaces/{$interface_name}/images/previous-small.png"/> 
     76          <span id="prevpageval"> 
     77            <script language="javascript" type="text/javascript">musicStand.docwritePrevPageNum()</script> 
     78          </span> 
     79        </span> 
    3280          </a> 
    3381          <script language="javascript" type="text/javascript">musicStand.activatePrevPageNum();</script> 
    3482        </td> 
    35         <td align="center" width="60%">_document:gotoform_</td> 
     83        <td align="center" width="60%"> 
     84          <div> 
     85        <form name="GotoForm" method="get" action="{$library_name}"> 
     86          <input type="hidden" name="a" value="d" /> 
     87          <input type="hidden" name="site" value="{$cgiParamSite}" /> 
     88          <input type="hidden" name="c" value="{$collNameChecked}" /> 
     89          <input type="hidden" name="excerptid" value="gs-document-text" /> 
     90          <input type="hidden" name="d" value="{$cgiParamD}" /> 
     91          <input type="hidden" name="cl" value="{$cgiParamCL}" /> 
     92          <input type="hidden" name="pageWidth" value="{$cgiParamPageWidth}" /> 
     93          <input type="hidden" name="pageHeight" value="{$cgiParamPageHeight}" /> 
     94          <input type="hidden" name="numPages" value="{$cgiParamNumPages}" /> 
     95          <input type="hidden" name="pagePrefix" value="{$cgiParamPagePrefix}" /> 
     96          <input type="hidden" name="pageSuffix" value="{$cgiParamPageSuffix}" /> 
     97          <input type="hidden" name="scaleFactor" value="{$cgiParamScaleFactor}" /> 
     98          <input type="hidden" name="view" value="simple" /> 
     99          <input type="text" name="gp" size="3" maxlength="4" /> 
     100          <input type="submit" value="go to page" /> <!-- make language fragment multilingual --> 
     101          <script language="javascript" type="text/javascript"> 
     102            musicStand.docwriteOptOfPages(); 
     103          </script> 
     104        </form>        
     105          </div>           
     106        </td> 
    36107        <td align="right" width="20%"> 
    37108          <a href="javascript:musicStand.nextPageAnim(gs.cgiParams['d'],'.png')"> 
    38         <span id="nextpagespan" style="display: inline"><span id="nextpageval"><script language="javascript" type="text/javascript">musicStand.docwriteNextPageNum()</script></span>_iconnext_</span> 
     109        <span id="nextpagespan" style="display: inline"> 
     110          <span id="nextpageval"> 
     111            <script language="javascript" type="text/javascript">musicStand.docwriteNextPageNum()</script> 
     112          </span> 
     113          <img class="morearrow" src="interfaces/{$interface_name}/images/next-small.png"/> 
     114        </span> 
    39115          </a> 
    40116        </td> 
     
    79155           
    80156          <div id="coord"  
    81            style="position: absolute; left: 0px; top: 0px; z-index: 10; visibility: visible;"> 
     157           style="position: absolute; left: 0px; top: 0px; z-index: 10; visibility: hidden;"> 
    82158        <xsl:comment>Mouse coord debug div</xsl:comment> 
    83159          </div> 
     
    304380    <div class="clear"><xsl:text> </xsl:text></div> 
    305381  </xsl:template> 
    306      
     382 
    307383</xsl:stylesheet>