summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--user_guide_src/source/_themes/eldocs/layout.html12
-rw-r--r--user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js44
2 files changed, 51 insertions, 5 deletions
diff --git a/user_guide_src/source/_themes/eldocs/layout.html b/user_guide_src/source/_themes/eldocs/layout.html
index 7f2fe1a34..535c2f194 100644
--- a/user_guide_src/source/_themes/eldocs/layout.html
+++ b/user_guide_src/source/_themes/eldocs/layout.html
@@ -31,7 +31,7 @@
{%- for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}
-
+
{%- if not embedded %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
@@ -46,11 +46,13 @@
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
+ <script type="text/javascript" src="{{ pathto('_static/asset/js/method-toc.js', 1) }}"></script>
+
{%- if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{%- endif %}
{%- endif %}
-
+
{%- block linktags %}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
@@ -96,7 +98,7 @@
{%- block rootrellink %}
<li><a href="{{ pathto(master_doc) }}">User Guide Home</a>{%- if pagename != 'index' %}&nbsp;&nbsp;{{ reldelim1 }}{%- endif %}</li>
{%- endblock %}
-
+
{%- for parent in parents %}
<li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>&nbsp;&nbsp; {{ reldelim1 }}</li>
{%- endfor %}
@@ -117,8 +119,8 @@
{% if pagename not in exclude_comments -%}
<!-- {user_guide_comments} -->
{% endif %}
-
- {%- block footer %}
+
+ {%- block footer %}
<div id="footer">
<p class="top"><a href="#header" title="Return to top">Return to top</a></p>
<p><a href="http://{{ project_domain }}/">{{ project }}</a> &ndash; Copyright &copy; {{ copyright }}</a></p>
diff --git a/user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js b/user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js
new file mode 100644
index 000000000..92024c70a
--- /dev/null
+++ b/user_guide_src/source/_themes/eldocs/static/asset/js/method-toc.js
@@ -0,0 +1,44 @@
+/* modified from http://stackoverflow.com/a/12459801 */
+$(function (){
+ var createList = function(selector){
+
+ var ul = $('<ul>');
+ var selected = $(selector);
+
+ if (selected.length === 0){
+ return;
+ }
+
+ selected.clone().each(function (i,e){
+
+ var p = $(e).children('.descclassname');
+ var n = $(e).children('.descname');
+ var l = $(e).children('.headerlink');
+
+ var a = $('<a>');
+ a.attr('href',l.attr('href')).attr('title', 'Link to this definition');
+
+ a.append(p).append(n);
+
+ var entry = $('<li>').append(a);
+ ul.append(entry);
+ });
+ return ul;
+ }
+
+ var c = $('<div>');
+
+ var ul0 = c.clone().append($('.submodule-index'))
+
+ customIndex = $('.custom-index');
+ customIndex.empty();
+ customIndex.append(ul0);
+
+ var l = createList('dl.method > dt');
+ if (l) {
+ var ul = c.clone()
+ .append('<h3>Methods / Function</h3>')
+ .append(l);
+ }
+ customIndex.append(ul);
+}); \ No newline at end of file