Ignore:
Timestamp:
2023-08-13T00:05:39+12:00 (10 months ago)
Author:
davidb
Message:

Development of static Stories tab

Location:
gs3-installations/thewillow/trunk/interfaces/thewillow
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/thewillow/trunk/interfaces/thewillow/js/thewillow-extra.js

    r37906 r37929  
    6262    return true;
    6363}
     64
     65
     66function showStories(elem)
     67{
     68    var cl1_url = gs.xsltParams["library_name"]+"/collection/"+gs.cgiParams["c"]+"/browse/CL1";
     69
     70    $.ajax({
     71    "type": "GET",
     72    "url":  cl1_url,
     73    "data": { 'excerptid': 'results' }
     74    })
     75        .done(function(response) {
     76        console.log(response)
     77        $('#story-list').html(response);
     78        $('#story-list').show();
     79    })
     80    .fail(function()  {
     81        console.error("Error retrieving URL: " + cl1_url);
     82    })
     83   
     84}
     85
     86function hideStories(elem)
     87{
     88    $('#story-list').hide();
     89}
     90
     91$(document).ready(function() {
     92    if (gs.variables.pageAction == "q") {
     93        $('#gs-nav li').removeClass('ui-tabs-selected');
     94        $('#query-tab').addClass('ui-tabs-selected');
     95    }
     96    else if ((gs.variables.pageType == "page") && (gs.variables.pageSubAction == "about")) {
     97        $('#gs-nav li').removeClass('ui-tabs-selected');
     98        $('#about-tab').addClass('ui-tabs-selected');
     99    }
     100    else if ((gs.variables.pageType == "page") && (gs.variables.pageSubAction == "stories")) {
     101        $('#gs-nav li').removeClass('ui-tabs-selected');
     102        $('#stories-tab').addClass('ui-tabs-selected');
     103
     104   
     105    $('#stories-tab').on('mouseenter',function() { showStories(this) });
     106    $('#stories-tab').on('mouseleave',function() { hideStories(this) });
     107    }
     108});
  • gs3-installations/thewillow/trunk/interfaces/thewillow/transform/layouts/header.xsl

    r37904 r37929  
    299299  <xsl:template name="browsing-tabs">
    300300    <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service or /page/pageResponse/collection[@name=$collNameChecked]/extraInfo/navigationTab">
     301      <style>
     302    #gs-nav li:nth-child(3) {
     303          display: none;
     304    }
     305      </style>
     306     
    301307      <ul id="gs-nav">
    302308    <!-- if this collection has additional tabs, add them here -->
     
    383389    <gsf:variable name="pageType"><xsl:value-of select="/page/pageRequest/@type"/></gsf:variable>
    384390    <gsf:variable name="pageSubAction"><xsl:value-of select="/page/pageRequest/@subaction"/></gsf:variable>
     391    <!--
    385392    <gsf:script>
    386393      $(document).ready(function() {
     
    396403     
    397404    </gsf:script>
     405    -->
    398406  </xsl:template>
    399407 
     
    567575
    568576      </div>
    569 
    570      
    571 
     577     
    572578    </div>
    573579  </xsl:template>
     
    576582  <xsl:template name="additionalNavTabsPre">
    577583    <li id="about-tab" class="ui-state-default ui-corner-top ui-state-active">
    578       <a href="library/collection/{$collName}/page/about" title="About this collection">Willow Archive Project</a>
     584      <a href="library/collection/{$collName}/page/about" title="About this collecotion">Willow Archive Project</a>
     585    </li>
     586    <li id="stories-tab" class="ui-state-default ui-corner-top ui-state-active">
     587      <a href="library/collection/{$collName}/page/stories" title="Stories">Stories</a>
     588      <div id="story-list" style="position: absolute; display: none; background-color: #FFFFFF; padding: 0.8rem; border: black solid 1px;">
     589    <xsl:comment>Location for story list</xsl:comment>
     590      </div>
    579591    </li>
    580592  </xsl:template>
Note: See TracChangeset for help on using the changeset viewer.