diff --git a/apps/assets/api.py b/apps/assets/api.py
index c61bf1e83..31577ec18 100644
--- a/apps/assets/api.py
+++ b/apps/assets/api.py
@@ -319,13 +319,13 @@ class TreeViewApi(APIView):
def get(self, request):
data = []
for node in self.get_queryset():
- if node.id == "0":
- parent = "#"
- else:
- parent = ":".join(node.id.split(":")[:-1])
- data.append({
+ parent = ":".join(node.id.split(":")[:-1])
+ d = {
"id": node.id,
- "parent": parent,
- "text": node.name
- })
- return Response(data)
\ No newline at end of file
+ "pId": parent,
+ "name": node.name
+ }
+ if node.id == "0":
+ d["open"] = True
+ data.append(d)
+ return Response(data)
diff --git a/apps/assets/templates/assets/tree.html b/apps/assets/templates/assets/tree.html
index acca9462c..d9796b592 100644
--- a/apps/assets/templates/assets/tree.html
+++ b/apps/assets/templates/assets/tree.html
@@ -4,6 +4,20 @@
{% block custom_head_css_js %}
+
+{# #}
+
+
+
+
{% endblock %}
{% block content %}
@@ -14,7 +28,7 @@
Tree View
-
@@ -22,49 +36,54 @@
-