summaryrefslogtreecommitdiff
path: root/templates/tree.html
blob: 670acb0b41db5c74da3d8fbad5f3150d01b1a77b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{% extends "base.html" %}
{% load userdisplay %}
{% block js %}
<script type="text/javascript">
$(function() {
    {% block widgets %}{% endblock %}
   	$('#jstree').jstree({
	   		'json_data': {
	   			'ajax': {
	   				'url': function(n) {
	   					if (n == -1) {
	   						return {% if name %}"/rtree/"+{{name.id}}+".json"{% else %}"/rtree.json"{% endif %};
	   					} else {
	   						return "/ctree/"+n.attr('id')+".json";
	   					}
	   				}
	   			},
	   			"progressive_render"  : true
	   		},
	   		'animation': 0,
	   		'themeroller': {
	   			'item': 'ui-state-none',
	   			'opened': 'ui-icon-circlesmall-minus',
	   			'closed': 'ui-icon-circlesmall-plus'
	   		},
	   		'plugins': ['json_data','themeroller']
	   	});
	//$('#jstree').removeClass('ui-widget-content');
	//$('#tree').addClass('ui-widget ui-corner-all ui-widget-content');
	$('#jstree').addClass('ui-corner-all');
	$('#sidemenu').menu();
	$('.tabs').tabs();
});
</script>
{% endblock %}
{% block main %}
                        {% if user.is_authenticated %}
                <!-- <a class="gravatar" href="#" title="{{user.email}}"></a> -->
                <!-- <a href="/user/home">{{user|userdisplay}}</a> -->
            {% endif %}
            <!--
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#mygroups">My Groups</a>
                </li>
                <li>
                    <a href="#jstree">All Groups</a>
                </li>
            </ul>
            -->
                        <!-- <div id="jstree"></div> -->
                        <!-- <div id="mygroups">My groups</div> -->
            <!--
            <div id="headline">
                {% block headline %}<a style="text-decoration: none" href="{% if name %}{{name.url}}{% else %}/user/home{% endif %}">{% if name %}{{name.shortname}}{% else %}Dashboard{% endif %}</a>{% endblock %}
            </div>
            -->
                {% block content %}{% endblock %}
{% endblock %}