diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-10-26 14:01:45 +0200 |
---|---|---|
committer | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-11-17 17:56:07 +0100 |
commit | 285dfb6eac9b1a358a1bc48d076352151259d7ac (patch) | |
tree | 16892b3485fe46098dbf88d158c306fd4d47bbd2 /ogcp/templates/macros.html | |
parent | 20935966efdae847023680217a4c109648698340 (diff) |
wip make tree async parte 2async-tree
Estos cambio eran necesarios porque si no había elementos del html con
el mismo id y esto provoca que se rompa parte del javascript.
Diffstat (limited to 'ogcp/templates/macros.html')
-rw-r--r-- | ogcp/templates/macros.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html index e114692..5e10b0f 100644 --- a/ogcp/templates/macros.html +++ b/ogcp/templates/macros.html @@ -23,9 +23,9 @@ {% endmacro %} -{% macro scopes_tree_collapse_level(scopes, parent_room, parent_id, state, selection_mode) -%} +{% macro scopes_tree_collapse_level(scopes, parent_server, parent_room, parent_id, state, selection_mode) -%} {% for scope in scopes %} - <li id="{{ scope["name"]|replace(".", "_")|replace(" ", "_") }}_{{ scope["id"] }}" class="nav-item"> + <li id="{{ parent_server }}_{{ scope["name"]|replace(".", "_")|replace(" ", "_") }}_{{ scope["id"] }}" class="nav-item"> {% if scope["type"] == "server" %} <input class="form-check-input" type="checkbox" form="scopesForm" value="{{ scope["server_ip_port"] }}" onclick="return false;" @@ -53,7 +53,7 @@ {% if scope.get("selected", False) %}checked{% endif %} name="{{ scope["name"] }}_{{ scope["id"] }}" /> {% endif %} - <a class="nav-link {% if not scope["scope"] %}disabled{% endif %}" href="#scope{{parent_id ~ "-" ~ loop.index}}" + <a class="nav-link {% if not scope["scope"] %}disabled{% endif %}" href="#{{parent_server ~ parent_id ~ "-" ~ loop.index}}" {% if scope["scope"] %}data-toggle="collapse"{% endif %}> {% if "state" in scope %} <i class="nav-icon fa-circle @@ -70,8 +70,8 @@ {{ scope["name"] }} </a> {% if scope["scope"] %} - <ul class="nav flex-column collapse level{{i}}" id="scope{{parent_id ~ "-" ~ loop.index}}"> - {{ scopes_tree_collapse_level(scope["scope"], parent_room, parent_id ~ "-" ~ loop.index, state, selection_mode) }} + <ul class="nav flex-column collapse level{{i}}" id="{{parent_server ~ parent_id ~ "-" ~ loop.index}}"> + {{ scopes_tree_collapse_level(scope["scope"], parent_server, parent_room, parent_id ~ "-" ~ loop.index, state, selection_mode) }} </ul> {% endif %} </li> |