Changeset 30748

Show
Ignore:
Timestamp:
24.08.2016 14:54:08 (3 years ago)
Author:
kjdon
Message:

first pass at adding expand contract contents links to page slider widget

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js

    r30733 r30748  
    616616        $("#tableOfContents").html(response); 
    617617        replaceLinksWithSlider(); 
     618        addExpandContractButtons(); 
    618619        var loading = $("#tocLoadingImage"); 
    619620        loading.remove(); 
     
    625626} 
    626627 
     628function addExpandContractButtons()  
     629{ 
     630    var tableOfContents = $("#rightSidebar  div.tableOfContentsContainer"); 
     631    var table = "<tr><td><table style=\"width:100%; text-align:center;\"><tr><td><a href=\"javascript:expandOrCollapseAll(true);\">Expand document</a></td><td><a href=\"javascript:expandOrCollapseAll(false);\">Collapse document</a></td></tr></table></td></tr>" ; 
     632   tableOfContents.prepend(table); 
     633 
     634} 
    627635function replaceLinksWithSlider() 
    628636{ 
    629637    var tableOfContents = $("#tableOfContents"); 
    630      
    631638    var leafSections = new Array(); 
    632639    var liElems = tableOfContents.find("li").each(function()