Changeset 34579


Ignore:
Timestamp:
2020-12-01T14:15:55+13:00 (3 years ago)
Author:
davidb
Message:

Changes so the rightSidebar for query.xsl and classifier.xsl display corrected (float right). The previous approach had been 'bolted' on to the end of displayBaskets was not properly contained within the div that was floated right

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

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/style/core.css

    r32825 r34579  
    245245
    246246#rightSidebar {
    247     /*width: 30%;*/
    248247    min-width:180px;
    249248    float:right;
     
    929928
    930929#facetSelector{
    931     padding: 0px;
    932     width:30%;
    933     float:right;
     930    padding-top: 6px;
    934931}
    935932
     
    951948
    952949.facetedResults{
    953     float:left;
    954     width:65%;
     950    float:left;
    955951}
    956952
  • main/trunk/greenstone3/web/interfaces/default/transform/gslib.xsl

    r34240 r34579  
    812812berry basket function to the site
    813813  -->
    814 
     814 
    815815  <xsl:template name="displayBaskets">
    816     <xsl:if test="$berryBasketOn or $favouriteBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))">
    817 <!--        <div id="float-anchor" style="position: absolute; width: 29%; min-width:180px; /*top: 105px;*/ right:20px; margin: 0 0 10px 20px;">
    818           <xsl:comment>Filler needed for div</xsl:comment>-->
    819         <div id="rightSidebar">
     816      <xsl:if test="$berryBasketOn or $favouriteBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))">
     817
    820818          <xsl:if test="$berryBasketOn">
    821819        <!-- show the berry basket if it's turned on -->
     
    835833        <xsl:text> </xsl:text>
    836834          </xsl:if>
    837         </div>
    838        <!-- </div>-->
    839       </xsl:if>
    840     </xsl:template>
     835      </xsl:if>
     836  </xsl:template>
    841837
    842838  <!-- put the drag&drop berry basket on the page -->
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/main.xsl

    r34149 r34579  
    9696        </html>
    9797    </xsl:template>
    98        
     98
     99    <!-- default is to have nothing inthea rightSidebar -->
     100    <xsl:template name="floatRightSidebar">
     101      <div id="float-anchor" style="width: 30%; min-width:180px; float:right; margin: 0 0 10px 20px;">
     102            <xsl:call-template name="rightSidebar"/>
     103      </div>
     104    </xsl:template>
     105
     106    <!-- Default rule is to be empty => no rightSidebar to show -->
     107    <!-- Gets overridden in pages such as query.xsl and classifier.xsl to display baskets and facet info elements -->
     108    <xsl:template name="rightSidebar">
     109    </xsl:template>
     110   
    99111    <!-- Template controlling the footer. -->
    100112    <xsl:template name="gs_footer">
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/toc.xsl

    r33755 r34579  
    99    exclude-result-prefixes="java util gsf">
    1010   
    11     <xsl:template name="rightSidebar">
     11    <xsl:template name="rightSidebarTOC">
    1212      <div id="rightSidebar">
    1313        <xsl:choose>
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl

    r33755 r34579  
    2525  <!-- the page content -->
    2626  <xsl:template match="/page/pageResponse">
     27    <xsl:call-template name="floatRightSidebar"/>
    2728    <xsl:call-template name="classifierPre"/>
    2829   
    2930    <script type="text/javascript" src="interfaces/{$interface_name}/js/classifier_scripts.js"><xsl:text> </xsl:text></script>
    3031    <script type="text/javascript">$(window).load(openStoredClassifiers);</script>
    31     <gslib:displayBaskets/>
    32  
     32   
    3333    <!--
    3434    show the clasifier results -
     
    4949
    5050    <div class="clear"><xsl:text> </xsl:text></div>
     51  </xsl:template>
     52
     53  <xsl:template name="rightSidebar">
     54    <div id="rightSideBar">
     55      <xsl:comment>Filler to prevent empty div collapse, in event displayBasket empty</xsl:comment>
     56      <gslib:displayBaskets/>
     57    </div>
    5158  </xsl:template>
    5259
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/document-print.xsl

    r33795 r34579  
    2020
    2121  <!-- no right side bar -->
    22   <xsl:template name="rightSidebar"></xsl:template>
     22  <xsl:template name="rightSidebarTOC"></xsl:template>
    2323 
    2424  <!-- no editbar -->
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl

    r33755 r34579  
    422422            </xsl:if>
    423423            <xsl:if test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']) or /page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']/@value='true'">
    424                 <xsl:call-template name="rightSidebar"/>
     424                <xsl:call-template name="rightSidebarTOC"/>
    425425            </xsl:if>
    426426            <!-- add in some text just in case nothing has been added to this div-->
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/query.xsl

    r33755 r34579  
    4646
    4747  <xsl:template name="resultsPage">
     48    <xsl:call-template name="floatRightSidebar"/>
    4849    <xsl:call-template name="resultsPagePre"/>
    4950    <xsl:call-template name="displayMatchDocs"/>
    5051    <xsl:call-template name="displayTermInfo"/>
    51     <gslib:displayBaskets/>
    5252    <xsl:call-template name="displayResults"/>
    5353    <xsl:call-template name="resultsPagePost"/>
     
    5858  </xsl:variable>
    5959
     60  <xsl:template name="rightSidebar">
     61    <div id="rightSideBar">
     62      <xsl:comment>Filler to prevent empty div collapse, in event displayBasket empty</xsl:comment>
     63
     64      <gslib:displayBaskets/>
     65
     66      <xsl:if test="/page/pageResponse/facetList/facet/count">
     67    <xsl:call-template name="displayFacets"/>
     68      </xsl:if>
     69
     70    </div>
     71  </xsl:template>
    6072
    6173  <xsl:template name="displayResults">
    62     <xsl:if test="/page/pageResponse/facetList/facet/count">
    63       <xsl:call-template name="displayFacets"/>
    64     </xsl:if>
    6574    <div id="resultsArea">
    6675      <xsl:attribute name="class">
     
    108117      <xsl:text> </xsl:text>
    109118    </script>
    110     <div id="facetSelector" style="position: relative; top: 100px;" >
     119
     120    <div id="facetSelector" >
    111121      <xsl:for-each select="/page/pageResponse/facetList/facet">
    112122    <xsl:if test="count(count) > 0">
Note: See TracChangeset for help on using the changeset viewer.