You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ha...@apache.org on 2018/06/05 17:49:33 UTC

[incubator-mxnet] branch master updated: [MXNET-356] Fix for the search results issues (#10656)

This is an automated email from the ASF dual-hosted git repository.

haibin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 5dde19f  [MXNET-356] Fix for the search results issues (#10656)
5dde19f is described below

commit 5dde19ffbef016d2bf7c67347f860f0330361a35
Author: kpmurali <37...@users.noreply.github.com>
AuthorDate: Tue Jun 5 10:49:08 2018 -0700

    [MXNET-356] Fix for the search results issues (#10656)
    
    * 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
---
 docs/_static/searchtools_custom.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/docs/_static/searchtools_custom.js b/docs/_static/searchtools_custom.js
index 42c4493..dcc1473 100644
--- a/docs/_static/searchtools_custom.js
+++ b/docs/_static/searchtools_custom.js
@@ -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]));

-- 
To stop receiving notification emails like this one, please contact
haibin@apache.org.