Changeset 30771


Ignore:
Timestamp:
09/01/16 10:17:08 (4 years ago)
Author:
kjdon
Message:

removing hard coded text fragments from xsl/js files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/facet-scripts.js

    r25834 r30771  
    6868    }
    6969   
    70     var link = $(".expandCollapseFacetListLink" + indexName);
    71     link.html("See less...");
    72     link.attr("href", "javascript:collapseFacetList(\"" + indexName + "\", " + countSize + ");");
     70    // the above code has made both see more and see less links display=block, so we need to hide
     71    // see more
     72    var morelink = $(".expandFacetList" + indexName);
     73    morelink.css("display", "none");
     74
    7375}
    7476
     
    8688            for(var j = 0; j < items.length; j++)
    8789            {
    88                 var regex = new RegExp("expandCollapseFacetList" + indexName, "g");
    89                 if(j > countSize && ($(items[j]).attr("class") == null || $(items[j]).attr("class").search(regex) == -1))
    90                 {
    91                     $(items[j]).css("display", "none");
    92                 }
     90                if(j > countSize)
     91                {
     92                $(items[j]).css("display", "none");
     93                }
    9394            }
    94            
     95           
    9596            break;
    9697        }
    9798    }
    9899   
    99     var link = $(".expandCollapseFacetListLink" + indexName);
    100     link.html("See more...");
    101     link.attr("href", "javascript:expandFacetList(\"" + indexName + "\", " + countSize + ");");
     100    // the above code has hidden both the see more and see less links.
     101    // display the see more one
     102    var morelink = $(".expandFacetList" + indexName);
     103    morelink.css("display", "block");
     104
    102105}
     106
Note: See TracChangeset for help on using the changeset viewer.