From a6e31708ccfa099af656cc90e525f99b0e778b50 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 6 Apr 2019 10:17:07 +0900 Subject: [PATCH] Fix #6244: html: Search function is broken with 3rd party themes --- CHANGES | 1 + sphinx/themes/basic/static/searchtools.js | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGES b/CHANGES index c5a592b33ff..8f96c134b9a 100644 --- a/CHANGES +++ b/CHANGES @@ -29,6 +29,7 @@ Bugs fixed references * #6245: circular import error on importing SerializingHTMLBuilder * #6243: LaTeX: 'releasename' setting for latex_elements is ignored +* #6244: html: Search function is broken with 3rd party themes Testing -------- diff --git a/sphinx/themes/basic/static/searchtools.js b/sphinx/themes/basic/static/searchtools.js index 4c5826411f8..bdc270655b8 100644 --- a/sphinx/themes/basic/static/searchtools.js +++ b/sphinx/themes/basic/static/searchtools.js @@ -75,6 +75,16 @@ var Search = { } }, + loadIndex : function(url) { + $.ajax({type: "GET", url: url, data: null, + dataType: "script", cache: true, + complete: function(jqxhr, textstatus) { + if (textstatus != "success") { + document.getElementById("searchindexloader").src = url; + } + }}); + }, + setIndex : function(index) { var q; this._index = index;