summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-09-29 17:21:00 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-11-17 17:56:07 +0100
commit20935966efdae847023680217a4c109648698340 (patch)
treeb36281271b133a141a1666d6039e4695128b9f3c /ogcp/templates
parentd029df8e842f8dce9d48f8ec9e11e336b0af46e9 (diff)
WIP Make scopes tree async
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/macros.html7
-rw-r--r--ogcp/templates/scopes.html2
-rw-r--r--ogcp/templates/tree.html2
3 files changed, 6 insertions, 5 deletions
diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html
index c56e4e8..e114692 100644
--- a/ogcp/templates/macros.html
+++ b/ogcp/templates/macros.html
@@ -1,8 +1,6 @@
-{% macro scopes_tree_collapse(scopes, state='', selection_mode='scopes') -%}
+{% macro scopes_tree_collapse(state='', selection_mode='scopes') -%}
-<ul id="scopes" class="nav ogcp-nav flex-column nav-pills">
- {{ scopes_tree_collapse_level(scopes["scope"], "", "", state, selection_mode) }}
-</ul>
+<ul id="scopes" class="nav ogcp-nav flex-column nav-pills"></ul>
<script>
// Launch the javascript on document ready, so all the global functions exists
// in the scope
@@ -18,6 +16,7 @@
{% elif selection_mode == 'scopes' %}
limitCheckboxes();
{% endif %}
+ buildScopesTree();
}
});
</script>
diff --git a/ogcp/templates/scopes.html b/ogcp/templates/scopes.html
index d07e7d3..db2b742 100644
--- a/ogcp/templates/scopes.html
+++ b/ogcp/templates/scopes.html
@@ -12,7 +12,7 @@
{% endblock %}
{% block sidebar %}
- {{ macros.scopes_tree_collapse(scopes, sidebar_state, 'scopes') }}
+ {{ macros.scopes_tree_collapse(sidebar_state, 'scopes') }}
{% endblock %}
{% block commands %}
diff --git a/ogcp/templates/tree.html b/ogcp/templates/tree.html
new file mode 100644
index 0000000..fc06105
--- /dev/null
+++ b/ogcp/templates/tree.html
@@ -0,0 +1,2 @@
+{% import "macros.html" as macros %}
+{{ macros.scopes_tree_collapse_level(scopes["scope"], '', '', '', 'scopes') }}