ogcp: add disclosure widget to sidebar

Add cache buster to soleta.css in base.html to have control over
cache expirity.
Bump soleta.css version to ensure browser does not used older (cached)
version.
Add CSS rules to show a disclosure widget in the sidebar.
Show center checkboxes as disabled in the commands view sidebar
for visual consistency.
Add class "collapsed" to the proper HTML components to keep a
proper state on page reload.
master
Alejandro Sirgo Rica 2024-06-13 12:29:21 +02:00
parent 272a5067ad
commit 37ae1bc5a2
4 changed files with 19 additions and 3 deletions

View File

@ -61,3 +61,18 @@ html, body {
#dhcpd_conf {
height: 25rem;
}
a.nav-link.collapsed:not(.disabled)[data-toggle="collapse"]::before {
content: "▶";
position: absolute;
left: -15px;
font-size: 0.7em;
}
a.nav-link:not(.collapsed):not(.disabled)[data-toggle="collapse"]::before {
content: "▶";
position: absolute;
left: -15px;
transform: rotate(90deg);
font-size: 0.7em;
}

View File

@ -193,6 +193,8 @@ function keepScopesTreeState() {
scopes_tree.each(function () {
if (localStorage.getItem(this.id) == 'show') {
$(this).collapse('show');
} else {
$(this).siblings('a').addClass('collapsed');
}
});
}

View File

@ -10,7 +10,7 @@
<link rel="stylesheet" href="{{ url_for('static', filename='AdminLTE/plugins/fontawesome-free/css/all.min.css') }}">
<!-- Theme style -->
<link rel="stylesheet" href="{{ url_for('static', filename='AdminLTE/dist/css/adminlte.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/soleta.css') }}" />
<link rel="stylesheet" href="{{ url_for('static', filename='css/soleta.css') }}?v=1" />
{% endblock %}
</head>
<body>

View File

@ -36,13 +36,12 @@
{% if scope.get("selected", False) %}checked{% endif %}
name="scope-server" hidden/>
{% elif scope["type"] == "center" %}
{% if selection_mode != "commands" %}
<input id="{{ input_id }}" class="form-check-input" type="checkbox" form="scopesForm"
value="{{ scope["id"] }}"
{% if state %}style="filter: grayscale(100%);" onclick="return false;"{% endif %}
{% if scope.get("selected", False) %}checked{% endif %}
{% if selection_mode == "commands" %}disabled="disabled"{% endif %}
name="scope-center" />
{% endif %}
{% elif scope["type"] == "room" %}
{% set parent_room = scope.name + "-" + scope.id|string %}
<input id="{{ input_id }}" class="form-check-input" type="checkbox" form="scopesForm"