File: base-index.html

package info (click to toggle)
taskflow 3.9.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 45,948 kB
  • sloc: cpp: 39,058; xml: 35,572; python: 12,935; javascript: 1,732; makefile: 59; sh: 16
file content (20 lines) | stat: -rw-r--r-- 900 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{% extends 'base.html' %}

{% block main %}
        <script>
        function toggle(e) {
            e.parentElement.className = e.parentElement.className == 'm-doc-collapsible' ?
                'm-doc-expansible' : 'm-doc-collapsible';
            return false;
        }
        /* Collapse all nodes marked as such. Doing it via JS instead of
           directly in markup so disabling it doesn't harm usability. The list
           is somehow regenerated on every iteration and shrinks as I change
           the classes. It's not documented anywhere and I'm not sure if this
           is the same across browsers, so I am going backwards in that list to
           be sure. */
        var collapsed = document.getElementsByClassName("collapsed");
        for(var i = collapsed.length - 1; i >= 0; --i)
            collapsed[i].className = 'm-doc-expansible';
        </script>
{% endblock %}