diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-09-17 18:15:36 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-09-17 18:15:36 (GMT) |
commit | b252bd1dd4186401fd6493b70475cdb31e22635b (patch) | |
tree | d9ec381a68731d1c7e997da5cb85167184655ac0 | |
parent | d067baf495d0415283ce724ad32cb9a08dc17c83 (diff) | |
parent | 49ed5387d6a80bbbff3544293cd30c0184abd1ec (diff) | |
download | Doxygen-b252bd1dd4186401fd6493b70475cdb31e22635b.zip Doxygen-b252bd1dd4186401fd6493b70475cdb31e22635b.tar.gz Doxygen-b252bd1dd4186401fd6493b70475cdb31e22635b.tar.bz2 |
Merge branch 'master' of github.com:doxygen/doxygen
-rw-r--r-- | src/htmlgen.cpp | 6 | ||||
-rw-r--r-- | src/searchindex.cpp | 4 | ||||
-rw-r--r-- | templates/html/search.js | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 601c02e..2c89507 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1139,7 +1139,7 @@ void HtmlGenerator::startFile(const char *name,const char *, t << "<script type=\"text/javascript\">\n"; t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" - << m_relPath<< "search\",false,'" << theTranslator->trSearch() << "');\n"; + << m_relPath<< "search\",false,'" << theTranslator->trSearch() << "','" << Doxygen::htmlFileExtension << "');\n"; t << "/* @license-end */\n"; t << "</script>\n"; } @@ -2674,7 +2674,7 @@ void HtmlGenerator::writeSearchPage() t << "<script type=\"text/javascript\">\n"; t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" - << "search\",false,'" << theTranslator->trSearch() << "');\n"; + << "search\",false,'" << theTranslator->trSearch() << "','" << Doxygen::htmlFileExtension << "');\n"; t << "/* @license-end */\n"; t << "</script>\n"; if (!Config_getBool(DISABLE_INDEX)) @@ -2728,7 +2728,7 @@ void HtmlGenerator::writeExternalSearchPage() t << "<script type=\"text/javascript\">\n"; t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n"; t << "var searchBox = new SearchBox(\"searchBox\", \"" - << "search\",false,'" << theTranslator->trSearch() << "');\n"; + << "search\",false,'" << theTranslator->trSearch() << "','" << Doxygen::htmlFileExtension << "');\n"; t << "/* @license-end */\n"; t << "</script>\n"; if (!Config_getBool(DISABLE_INDEX)) diff --git a/src/searchindex.cpp b/src/searchindex.cpp index ec7f7d6..d9e5c99 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -956,7 +956,7 @@ void writeJavaScriptSearchIndex() QCString baseName; baseName.sprintf("%s_%x",g_searchIndexInfo[i].name.data(),p); - QCString fileName = searchDirName + "/"+baseName+".html"; + QCString fileName = searchDirName + "/"+baseName+Doxygen::htmlFileExtension; QCString dataFileName = searchDirName + "/"+baseName+".js"; QFile outFile(fileName); @@ -1268,7 +1268,7 @@ void writeJavaScriptSearchIndex() ResourceMgr::instance().copyResource("search.js",searchDirName); } { - QFile f(searchDirName+"/nomatches.html"); + QFile f(searchDirName+"/nomatches"+Doxygen::htmlFileExtension); if (f.open(IO_WriteOnly)) { FTextStream t(&f); diff --git a/templates/html/search.js b/templates/html/search.js index 92b6094..f591fd6 100644 --- a/templates/html/search.js +++ b/templates/html/search.js @@ -80,9 +80,10 @@ function getYPos(item) storing this instance. Is needed to be able to set timeouts. resultPath - path to use for external files */ -function SearchBox(name, resultsPath, inFrame, label) +function SearchBox(name, resultsPath, inFrame, label, extension) { if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } + if (!extension || extension == "") { extension = ".html"; } // ---------- Instance variables this.name = name; @@ -97,6 +98,7 @@ function SearchBox(name, resultsPath, inFrame, label) this.searchActive = false; this.insideFrame = inFrame; this.searchLabel = label; + this.extension = extension; // ----------- DOM Elements @@ -347,7 +349,7 @@ function SearchBox(name, resultsPath, inFrame, label) if (idx!=-1) { var hexCode=idx.toString(16); - resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension; resultsPageWithSearch = resultsPage+'?'+escape(searchValue); hasResultsPage = true; } |