summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-17 17:29:07 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-17 17:44:24 +0200
commit48bc51ca0a5a34bd526a0a2e608f66efa887daeb (patch)
treef4967f4774e919ffcddd718a1c6eaf32bcad536d
parenta7423d29436f20b440f81f7bf3c18d80cf1e6114 (diff)
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.
-rw-r--r--ogcp/static/js/ogcp.js2
-rw-r--r--ogcp/templates/base.html2
2 files changed, 3 insertions, 1 deletions
diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js
index b57fca7..4d69fb6 100644
--- a/ogcp/static/js/ogcp.js
+++ b/ogcp/static/js/ogcp.js
@@ -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');
}
});
}
diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html
index 22fe086..c98b0f9 100644
--- a/ogcp/templates/base.html
+++ b/ogcp/templates/base.html
@@ -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