js: show correct initial disclosure widget state

Add the class "collapsed" to the html elements defined as
not shown in the local storage for the images list sidebar.
master
Alejandro Sirgo Rica 2024-06-17 17:29:07 +02:00
parent a7423d2943
commit 48bc51ca0a
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -111,7 +111,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=8"></script>
<script src="{{ url_for('static', filename='js/ogcp.js') }}?v=9"></script>
<script>
// error messages