Skip to content

Commit aef7a7e

Browse files
committed
add support for UUID to jstree_list_results
1 parent 701fcfe commit aef7a7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

polymorphic_tree/templates/admin/polymorphic_tree/jstree_list_results.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
*/
4848

4949
var data = [{% adminlist_recursetree cl %}{% with is_leaf=node.is_leaf_node %}
50-
{id: {{ node.pk }}, classes: 'nodetype-{{ node|real_model_name|lower }}', can_have_children: {{ node.can_have_children|yesno:'true,false' }}, label: '<div class="col-primary{% if is_leaf %} leaf{% endif %}"><div class="col first-column"><a href="{{ change_url }}"{% if cl.is_popup %} onclick="opener.dismissRelatedLookupPopup(window, {{ node.pk }}); return false;"{% endif %}>{{ first_column|escapejs }}</a></div></div>{% if other_columns %}<div class="col-metadata">{% for name, repr in other_columns %}<div class="col col-{{ name }}">{{ repr|escapejs }}</div>{% endfor %}</div>{% endif %}'{% if not is_leaf %},
50+
{id: '{{ node.pk }}', classes: 'nodetype-{{ node|real_model_name|lower }}', can_have_children: {{ node.can_have_children|yesno:'true,false' }}, label: '<div class="col-primary{% if is_leaf %} leaf{% endif %}"><div class="col first-column"><a href="{{ change_url }}"{% if cl.is_popup %} onclick="opener.dismissRelatedLookupPopup(window, {{ node.pk }}); return false;"{% endif %}>{{ first_column|escapejs }}</a></div></div>{% if other_columns %}<div class="col-metadata">{% for name, repr in other_columns %}<div class="col col-{{ name }}">{{ repr|escapejs }}</div>{% endfor %}</div>{% endif %}'{% if not is_leaf %},
5151
children: [ {{ children }}
5252
]{% endif %}},{% endwith %}{% endadminlist_recursetree %}
5353
null // for MSIE
@@ -88,9 +88,9 @@
8888
url: '{{ cl.model_admin.api_node_moved_view_url }}',
8989
dataType: 'json',
9090
data: {
91-
'moved_id': parseInt(move_info.moved_node.id),
92-
'target_id': parseInt(move_info.target_node.id),
93-
'previous_parent_id': parseInt(move_info.previous_parent.id || 0),
91+
'moved_id': move_info.moved_node.id,
92+
'target_id': move_info.target_node.id,
93+
'previous_parent_id': move_info.previous_parent.id,
9494
'position': move_info.position,
9595
'csrfmiddlewaretoken': '{{ csrf_token }}'
9696
},

0 commit comments

Comments
 (0)