Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions _layouts/default-layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@
{%- assign noTitleIndex = "noTitleIndex" -%}
{%- endif -%}
<body>
<div class="headWrapper">
<header class="headWrapper">
{%- include page_header.html -%}
</div>
</header>
{%- include dlrNav.html -%}
<div class="sideBarIcon"><i class="fa fa-list" style="margin-right: 5px;"></i> Table of contents</div>
<div class="container" id="categoryMenuTree">
<main class="container" id="categoryMenuTree">
<div class="row">
<div class="sideBar col-xs-12 col-md-3 hide-xs hide-sm">
<aside class="sideBar col-xs-12 col-md-3 hide-xs hide-sm">
<div id="sideBarCnt">
<div class="docSearchPart" style="margin-top: 30px;">
<input id="txtSearch" class="search" type="text">
</div>
<div class="mainPage">
<nav class="mainPage">
<ul id="fullTreeMenuListContainer" name="listLevel1">
</ul>
</div>
</nav>
</div>
</div>
<div class="docContainer col-xs-12 col-md-9">
</aside>
<section class="docContainer col-xs-12 col-md-9">
<div id="docHead" class="head row hide-xs hide-sm">
{%- include main-page-head.html -%}
</div>
Expand Down Expand Up @@ -59,19 +59,19 @@
<div class="lds-ring"><div></div><div></div><div></div><div></div></div>
</div>
</div>
</div>
</section>
</div>
</div>
</main>
<div class="history list" id="categoryMenuTree_history">
<div class="container">
<div class="col-xs-12">
{%- include liquid_autoGenerateHistoryList.html -%} {%- include auto-version-list.html -%}
</div>
</div>
</div>
<div id="footerWrapper">
<footer id="footerWrapper">
{%- include page_footer.html -%}
</div>
</footer>

<iframe id="sideBarIframe" src="{{site.firstLevelUrl}}/Hide_Tree_Page.html" allow="" height="0" frameborder="0"></iframe>
<script type="text/javascript">
Expand Down Expand Up @@ -114,7 +114,7 @@
refinement = "c/c++"
}
let refinementTag = refinement ? ("&refinement=" + refinement) : ""
window.location.href = '/label-recognition/docs/search.html?q=' + $('#txtSearch').val() + refinementTag;
window.location.href = '/label-recognition/docs/core/search.html?q=' + $('#txtSearch').val() + refinementTag;
}
})
})
Expand Down
51 changes: 51 additions & 0 deletions _layouts/search-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,57 @@ <h1>Search</h1>
}
})

$("body").delegate("#searchResult .gsc-resultsRoot a.gs-title", "click", function(e) {
e.preventDefault();

var link = $(this).eq(0).data("ctorig")
if (link.indexOf("capture-vision/docs") > 0) {
var repoType = getRepoType("core", link);
if (link.indexOf("?") > 0) {
var arr = link.split("?")
if(arr[1].indexOf("#") > 0) {
var subArr = arr[1].split("#")
link = link +"?product=dlr&repoType="+ repoType +"&" + arr[1]
} else {
link = link + "&product=dlr&repoType=" + repoType
}
} else {
link = link + "?product=dlr&repoType=" + repoType
}
}
window.location.href = link
});

function getRepoType(defaultValue, link) {
var lang = getCurrentUrlLang(link, true)
var repoType = defaultValue
if (lang) {
if (lang == 'android' || lang == 'objectivec-swift') {
repoType = "mobile"
} else if (lang == 'javascript') {
repoType = "web"
} else if (lang == 'cplusplus' || lang == 'c' || lang == 'java' || lang == 'dotnet') {
repoType = "server"
} else {
repoType = "core"
}
} else {
if(link.indexOf("/docs/server/") > 0) {
repoType = "server"
}
if (link.indexOf("/docs/core/") > 0) {
repoType = "core"
}
if (link.indexOf("/docs/mobile") > 0) {
repoType = "mobile"
}
if (link.indexOf("/docs/web/") > 0) {
repoType = "web"
}
}
return repoType
}

</script>

{%- include livehelp.html -%}
Expand Down