summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-12-30 12:57:27 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-08-27 13:43:31 (GMT)
commit6bb0d2908b4ca7908a8e655a5abcf7615a5f4c77 (patch)
tree1153cbbc2ea585505b9b08f2756fa3d0cade6b2c /templates
parentcfac0824b1d201fac37772ac42662901efc88ba7 (diff)
downloadDoxygen-6bb0d2908b4ca7908a8e655a5abcf7615a5f4c77.zip
Doxygen-6bb0d2908b4ca7908a8e655a5abcf7615a5f4c77.tar.gz
Doxygen-6bb0d2908b4ca7908a8e655a5abcf7615a5f4c77.tar.bz2
Added javascript search engine data to the template context
Diffstat (limited to 'templates')
-rw-r--r--templates/html/htmlallmembers.tpl6
-rw-r--r--templates/html/htmlbase.tpl3
-rw-r--r--templates/html/htmlclasses.tpl2
-rw-r--r--templates/html/htmljssearchdata.tpl31
-rw-r--r--templates/html/htmljssearchindex.tpl15
-rw-r--r--templates/html/htmllayout.tpl17
-rw-r--r--templates/html/htmlsearchresult.tpl27
-rw-r--r--templates/html/htmltabs.tpl2
8 files changed, 99 insertions, 4 deletions
diff --git a/templates/html/htmlallmembers.tpl b/templates/html/htmlallmembers.tpl
index 98f88d6..e4b8460 100644
--- a/templates/html/htmlallmembers.tpl
+++ b/templates/html/htmlallmembers.tpl
@@ -9,11 +9,13 @@
<p>{{ tr.theListOfAllMembers }} <a class="el" href="{{ compound.fileName }}{{ config.HTML_FILE_EXTENSION }}">{{ compound.name }}</a>{{ tr.incInheritedMembers }}</p>
<table class="directory">
{% for mi in compound.allMembersList %}
- <tr {% cycle 'class="even"' '' %}>
+ <tr class="{% cycle 'even' 'odd' %}">
{# TODO: objective-C #}
- <td>{% with obj=mi.member text=mi.ambiguityScope|append:mi.member.name %}
+ <td class="entry">{% with obj=mi.member text=mi.ambiguityScope|append:mi.member.name %}
{% include 'htmlobjlink.tpl' %}
{% endwith %}
+ {# TODO: add arguments #}
+ {# TODO: add column with scope #}
</td>
</tr>
{% endfor %}
diff --git a/templates/html/htmlbase.tpl b/templates/html/htmlbase.tpl
index d394b45..2191186 100644
--- a/templates/html/htmlbase.tpl
+++ b/templates/html/htmlbase.tpl
@@ -21,6 +21,9 @@
{% endif %}
{% if config.SEARCHENGINE %}
<link href="{{ page.relPath }}search/search.css" rel="stylesheet" type="text/css"/>
+ {% if not config.SERVER_BASED_SEARCH %}
+<script type="text/javascript" src="{{ page.relPath }}search/searchdata.js"></script>
+ {% endif %}
<script type="text/javascript" src="{{ page.relPath }}search/search.js"></script>
{% if config.SERVER_BASED_SEARCH %}
<script type="text/javascript">
diff --git a/templates/html/htmlclasses.tpl b/templates/html/htmlclasses.tpl
index 803b1a9..8a1bf18 100644
--- a/templates/html/htmlclasses.tpl
+++ b/templates/html/htmlclasses.tpl
@@ -22,7 +22,7 @@
<li>
<span class="ai">
{% if forloop.first %}
- <a name="#letter_{{ section.label }}"></a>
+ <a name="letter_{{ section.label }}"></a>
<span class="ah">&#160;&#160;{{ section.letter }}&#160;&#160;</span><br/>
{% endif %}
{% with obj=cls text=cls.name %}
diff --git a/templates/html/htmljssearchdata.tpl b/templates/html/htmljssearchdata.tpl
new file mode 100644
index 0000000..c48ea1d
--- /dev/null
+++ b/templates/html/htmljssearchdata.tpl
@@ -0,0 +1,31 @@
+{# input: si: SymbolIndex #}
+var indexSectionsWithContent =
+{
+{% set count=0 %}
+{% for idx in searchIndices %}
+ {% if idx.symbolIndices %}
+ {{ count }}:"{% for si in idx.symbolIndices %}{{ si.letter }}{% endfor %}"{%if not forloop.last %},{% endif %}
+ {% set count=count+1 %}
+ {% endif %}
+{% endfor %}
+};
+var indexSectionNames =
+{
+{% set count=0 %}
+{% for idx in searchIndices %}
+ {% if idx.symbolIndices %}
+ {{ count }}:"{{ idx.name }}"{% if not forloop.last %},{% endif %}
+ {% set count=count+1 %}
+ {% endif %}
+{% endfor %}
+};
+var IndexSectionLabels =
+{
+{% set count=0 %}
+{% for idx in searchIndices %}
+ {% if idx.symbolIndices %}
+ {{ count }}:"{{ idx.text }}"{% if not forloop.last %},{% endif %}
+ {% set count=count+1 %}
+ {% endif %}
+{% endfor %}
+};
diff --git a/templates/html/htmljssearchindex.tpl b/templates/html/htmljssearchindex.tpl
new file mode 100644
index 0000000..a16fa4f
--- /dev/null
+++ b/templates/html/htmljssearchindex.tpl
@@ -0,0 +1,15 @@
+{# input: si symbolIndex #}
+var searchData =
+[
+{% for group in si.symbolGroups %}['{{ group.id }}',['{{ group.name }}',
+{% for sym in group.symbols %}
+{% spaceless %}
+['{{ sym.relPath }}{{ sym.fileName }}{{ config.HTML_FILE_EXTENSION }}{% if sym.anchor %}#{{ sym.anchor }}{% endif %}',
+{% if not config.EXT_LINKS_IN_WINDOW %}1{% else %}0{% endif %},
+'{{ sym.scope|nowrap }}']
+{% endspaceless %}
+{% if not forloop.last %},{% endif %}
+{% endfor %}
+]]{% if not forloop.last %},{% endif %}
+{% endfor %}
+];
diff --git a/templates/html/htmllayout.tpl b/templates/html/htmllayout.tpl
index 9b82238..13fb330 100644
--- a/templates/html/htmllayout.tpl
+++ b/templates/html/htmllayout.tpl
@@ -183,7 +183,9 @@
{% endwith %}
{% with page=classHierarchy %}
{% if config.HAVE_DOT and config.GRAPHICAL_HIERARCHY %}
- {% create 'inherits'|append:config.HTML_FILE_EXTENSION from 'htmlgraphhierarchy.tpl' %}
+ {% with fileName='inherits' %}
+ {% create fileName|append:config.HTML_FILE_EXTENSION from 'htmlgraphhierarchy.tpl' %}
+ {% endwith %}
{% endif %}
{% endwith %}
{% endif %}
@@ -229,6 +231,19 @@
{# close the global navigation index #}
{% closesubindex nav %}
+{# write search data #}
+{% if config.SEARCHENGINE and not config.SERVER_BASED_SEARCH %}
+ {% create 'search/searchdata.js' from 'htmljssearchdata.tpl' %}
+ {% for idx in searchIndices %}
+ {% for si in idx.symbolIndices %}
+ {% with baseName=si.name|append:'_'|append:forloop.counter0 %}
+ {% create baseName|prepend:'search/'|append:config.HTML_FILE_EXTENSION from 'htmlsearchresult.tpl' %}
+ {% create baseName|prepend:'search/'|append:'.js' from 'htmljssearchindex.tpl' %}
+ {% endwith %}
+ {% endfor %}
+ {% endfor %}
+{% endif %}
+
{# write the navigation tree data #}
{% if config.GENERATE_TREEVIEW %}
{% create 'navtreedata.js' from 'htmljsnavtree.tpl' %}
diff --git a/templates/html/htmlsearchresult.tpl b/templates/html/htmlsearchresult.tpl
new file mode 100644
index 0000000..2cf45fc
--- /dev/null
+++ b/templates/html/htmlsearchresult.tpl
@@ -0,0 +1,27 @@
+{# input: baseName #}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen {{ doxygen.version }}"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="{{ baseName }}.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">{{ tr.loading }}</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">{{ tr.searching }}</div>
+<div class="SRStatus" id="NoMatches">{{ tr.noMatches }}</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/templates/html/htmltabs.tpl b/templates/html/htmltabs.tpl
index 9ce8c44..4c48f54 100644
--- a/templates/html/htmltabs.tpl
+++ b/templates/html/htmltabs.tpl
@@ -69,6 +69,7 @@
</ul>
</div>
{# second navigation row #}
+{% if page.highlight=='namespace' or page.highlight=='classes' or page.highlight=='files' %}
<div id="navrow2" class="tabs2">
<ul class="tablist">
{# namespace subtabs #}
@@ -94,3 +95,4 @@
{% endif %}
</ul>
</div>
+{% endif %}