Changeset 30748


Ignore:
Timestamp:
08/24/16 14:54:08 (4 years ago)
Author:
kjdon
Message:

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

File:
1 edited

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()
Note: See TracChangeset for help on using the changeset viewer.