Skip to content

Commit

Permalink
[MXNET-356] Fix for the search results issues (apache#10656)
Browse files Browse the repository at this point in the history
* Fix for the search results issues. This changes reads the current version (if it exists) to add it as a part of the URL given in the search results drop-down. Next, in the search results page corrected the search preview target page from txt to html

* Changing the AJAX type from html back to txt

* Fixing the broken changes in the searchtools js
  • Loading branch information
kpmurali authored and eric-haibin-lin committed Jun 5, 2018
1 parent 247d579 commit 5dde19f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/_static/searchtools_custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,16 @@ var Search = {
} else {
// normal html builders
var baseURL = 'https://' + window.location.hostname + '/';
var urlHref = window.location.href;
let urlSplits = urlHref.split("/");
let versionString = '';
for (var idx = 0; idx < urlSplits.length; ++idx) {
if(urlSplits[idx] == 'versions') {
versionString = 'versions/' + urlSplits[idx + 1] + '/';
break;
}
}
baseURL = baseURL.concat(versionString);
listItem.append($('<a/>').attr('href',
baseURL + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring + item[2]).html(item[1]));
Expand Down

0 comments on commit 5dde19f

Please sign in to comment.