From 3655a0164951b5bce015196381267d2b878ab901 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 25 Nov 2020 11:59:50 +0100 Subject: Default doxygen search mechanism doesn't work when using with XHTML output The problem has been tested with the doxygen test 021. With the output format html all works OK. - When giving a `t` in the search window a window appears with the message "This XML file does not appear to have any style information associated with it. The document tree is shown below." - the ` statement has to replaced by `` in searchindex.cpp (is normally also present in the non search xhtml files). - this results in a window with just the words: Loading.... Searching... No Matches - this is due to the extra `` in the htmlsearchresults.tpl (strange enough html output has no problem with it). - When giving a `a` in the search windows we get a "File not found" message as the file nomatches.html cannot be found - the extension for "nomatches" has to be set properly as well (search.js), for the other files this is done a few lines upward. --- src/searchindex.cpp | 22 ++++++++++++---------- templates/html/htmlsearchresult.tpl | 8 ++++---- templates/html/search.js | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/searchindex.cpp b/src/searchindex.cpp index b0f6abb..0464cb4 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -923,7 +923,8 @@ void writeJavaScriptSearchIndex() t << "" << endl; - t << "" << endl; + t << "" << endl; + t << "" << endl; t << "" << endl; t << "" << endl; t << "" << endl; @@ -934,18 +935,18 @@ void writeJavaScriptSearchIndex() t << "
" << endl; t << "
" << theTranslator->trLoading() << "
" << endl; t << "
" << endl; // here the results will be inserted - t << "" << endl; + t << "/* @license-end */\n"; + t << "" << endl; t << "
" << theTranslator->trSearching() << "
" << endl; t << "
" << theTranslator->trNoMatches() << "
" << endl; - t << "" << endl; + t << "/* @license-end */\n"; + t << "" << endl; t << "
" << endl; // SRIndex t << "" << endl; t << "" << endl; @@ -1229,7 +1230,8 @@ void writeJavaScriptSearchIndex() FTextStream t(&f); t << "" << endl; - t << "" << endl; + t << "" << endl; + t << "" << endl; t << "" << endl; t << "" << endl; t << "" << endl; diff --git a/templates/html/htmlsearchresult.tpl b/templates/html/htmlsearchresult.tpl index 4e15414..139faf2 100644 --- a/templates/html/htmlsearchresult.tpl +++ b/templates/html/htmlsearchresult.tpl @@ -11,14 +11,14 @@
{{ tr.loading }}
- +
{{ tr.searching }}
{{ tr.noMatches }}
- +
diff --git a/templates/html/search.js b/templates/html/search.js index f591fd6..77ee7ab 100644 --- a/templates/html/search.js +++ b/templates/html/search.js @@ -355,7 +355,7 @@ function SearchBox(name, resultsPath, inFrame, label, extension) } else // nothing available for this search term { - resultsPage = this.resultsPath + '/nomatches.html'; + resultsPage = this.resultsPath + '/nomatches' + this.extension; resultsPageWithSearch = resultsPage; hasResultsPage = false; } -- cgit v0.12