Skip to content

Commit

Permalink
Merge pull request #107 from dynamsoft-docs/preview
Browse files Browse the repository at this point in the history
update to internal commit 9d303933
  • Loading branch information
Jenny-Jiani authored Aug 5, 2024
2 parents 6eec0b8 + cf1efe7 commit 8d310b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions assets/js/index-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,8 @@ function FullTreeMenuList(generateDocHead, needh3 = true, pageStartVer = undefin
$('#fullTreeMenuListContainer').scrollTop(nodeOffsetTop - treeOffsetTop - lineHeight);
}



navWrap = document.getElementById("fullTreeMenuListContainer");
var liAry = navWrap.getElementsByTagName("li");

for (var i = 0, len = liAry.length; i < len; i++) {
liAry[i].onclick = (function (i) {
return function (event) {
Expand Down Expand Up @@ -221,17 +218,22 @@ function FullTreeMenuList(generateDocHead, needh3 = true, pageStartVer = undefin
var product = getUrlVars(document.URL)["product"]
var productVersion = getUrlVars(document.URL)[product]
var curProduct = getCurrentUrlProductName(document.URL)
var curLang = getCurrentUrlLang(document.URL, true)
if (product && productVersion && curProduct != product) {
curPageVersion = (productVersion == 'latest' ? 'latest_version' : productVersion)
}
version_tree_list = $('#sideBarIframe').contents().find('#version_tree_list ul.version-tree-container');
//console.log(version_tree_list, curPageVersion);
if (version_tree_list && version_tree_list.length > 0 && curPageVersion) {
for(var i = 0; i<version_tree_list.length; i++) {
//console.log($(version_tree_list[i]).attr('id'), 'version_tree_' + curPageVersion);
if ($(version_tree_list[i]).attr('id') == 'version_tree_' + curPageVersion) {
//console.log($(version_tree_list[i]).html())
$('#fullTreeMenuListContainer').html($(version_tree_list[i]).html());
$('#fullTreeMenuListContainer').html("");
var objs = $(version_tree_list[i]).find("> li")
for(var j=0; j<objs.length; j++) {
var itemLang = $(objs[j]).attr("lang")
if (!itemLang || itemLang.toLowerCase() == curLang.toLowerCase()) {
$('#fullTreeMenuListContainer').append($(objs[j]))
}
}
}
}
var allHerf1 = $(".docContainer .content, #docHead, #AutoGenerateSidebar, .sideBar, #crumbs").find("a");
Expand Down
Loading

0 comments on commit 8d310b1

Please sign in to comment.