diff options
Diffstat (limited to 'ogcp/templates')
-rw-r--r-- | ogcp/templates/base.html | 2 | ||||
-rw-r--r-- | ogcp/templates/macros.html | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html index 7be19b4..3ad3b05 100644 --- a/ogcp/templates/base.html +++ b/ogcp/templates/base.html @@ -108,7 +108,7 @@ <!-- ChartJS --> <script src="{{ url_for('static', filename='AdminLTE/plugins/chart.js/Chart.min.js') }}"></script> - <script src="{{ url_for('static', filename='js/ogcp.js') }}?v=10"></script> + <script src="{{ url_for('static', filename='js/ogcp.js') }}?v=11"></script> <script> // error messages diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html index eda57ed..077bad5 100644 --- a/ogcp/templates/macros.html +++ b/ogcp/templates/macros.html @@ -28,7 +28,8 @@ {% macro scopes_tree_collapse_level(scopes, parent_room, parent_id, state, selection_mode) -%} {% for scope in scopes %} - <li id="{{ scope["name"]|replace(".", "_")|replace(" ", "_") }}_{{ scope["id"] }}" class="nav-item"> + {% set scope_name = scope["name"]|replace(".", "_")|replace(" ", "_") %} + <li id="{{ scope_name }}_{{ scope["id"] }}" class="nav-item"> {% set input_id = "input" ~ parent_id ~ "-" ~ loop.index %} {% if scope["type"] == "server" %} <input id="{{ input_id }}" class="form-check-input" type="checkbox" form="scopesForm" @@ -62,8 +63,10 @@ {% 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}}" - {% if scope["scope"] %}data-toggle="collapse"{% endif %}> + <a class="nav-link {% if not scope["scope"] %}disabled{% endif %}" + id="{{ scope["type"] }}-{{ scope.get('id', scope_name) }}" + href="#scope{{parent_id ~ "-" ~ loop.index}}" + {% if scope["scope"] %}data-toggle="collapse"{% endif %}> {% if "state" in scope %} <i class="nav-icon fa-circle {% if scope['state'] == 'OPG' %}fas text-warning |