mirror of https://github.com/docker/docs.git
Fix for glossary
This commit is contained in:
parent
7b7cf3e229
commit
a36d37dae6
|
@ -217,6 +217,18 @@ else %}{% assign edit_url = "" %}{% endif %} {% break %} {% endif %} {% endfor %
|
|||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/stickyfill.min.js"></script>
|
||||
<script defer src="/js/docs.js"></script>
|
||||
<script language="javascript">
|
||||
jQuery(document).ready(function(){
|
||||
$.getJSON( "/metadata.txt", function( data ) {
|
||||
metadata = data;
|
||||
hookupTOCEvents();
|
||||
$.getJSON( "/glossary.txt", function( data ) {
|
||||
glossary = data;
|
||||
renderTagsPage();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -16,6 +16,8 @@ if (current[0]) {
|
|||
|
||||
function highlightRightNav(heading)
|
||||
{
|
||||
if (document.location.pathname.indexOf("/glossary/")<0){
|
||||
console.log("highlightRightNav called on",document.location.pathname)
|
||||
if (heading == "title")
|
||||
{
|
||||
history.replaceState({},"Top of page on " + document.location.pathname,document.location.protocol +"//"+ document.location.hostname + (location.port ? ':'+location.port: '') + document.location.pathname);
|
||||
|
@ -55,6 +57,7 @@ function highlightRightNav(heading)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var currentHeading = "";
|
||||
$(window).scroll(function(){
|
||||
var headingPositions = new Array();
|
||||
|
|
15
js/menu.js
15
js/menu.js
|
@ -261,18 +261,9 @@ function renderTagsPage()
|
|||
var glossaryOutput = glossary.terms[i].def;
|
||||
}
|
||||
}
|
||||
if (glossaryOutput) $("#glossaryMatch").html("<h2>Definition of: " + tagToLookup + "</h2>" + glossaryOutput);
|
||||
if (glossaryOutput) {
|
||||
$("#glossaryMatch").html("<h2>Definition of: " + tagToLookup + "</h2>" + glossaryOutput);
|
||||
}
|
||||
renderTopicsByTagTable(tagToLookup,"topicMatch",true);
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
$.getJSON( "/metadata.txt", function( data ) {
|
||||
metadata = data;
|
||||
hookupTOCEvents();
|
||||
$.getJSON( "/glossary.txt", function( data ) {
|
||||
glossary = data;
|
||||
renderTagsPage();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue