diff --git a/src/frontend/partials/controls.eta.html b/src/frontend/partials/controls.eta.html
index 68e032c..df601fa 100644
--- a/src/frontend/partials/controls.eta.html
+++ b/src/frontend/partials/controls.eta.html
@@ -126,7 +126,7 @@
data-bs-target="#collapseSettingsStorages"
aria-expanded="<%= it.active == 'SETT_STORE' ? 'true' : 'false'%>"
aria-controls="collapseSettingsStorages">
-
+
@@ -159,20 +159,18 @@
JSON Import
-
-
-
+
diff --git a/static/css/dashboard.css b/static/css/dashboard.css
index 8683fbd..0c183eb 100644
--- a/static/css/dashboard.css
+++ b/static/css/dashboard.css
@@ -108,10 +108,17 @@ body {
transform: rotate(-90deg) !important;
transition: 0.5s;
}
-
-.dropdownIndicator {
+.derotate {
+ transform: rotate(0deg) !important;
transition: 0.5s;
}
+.derotate::before {
+ transform: rotate(0deg) !important;
+ transition: 0.5s;
+}
+.dropdownIndicator {
+ transition: all 0.5s;
+}
/*
diff --git a/static/js/handleSidebarTriangles.js b/static/js/handleSidebarTriangles.js
index 02e7fe0..f330b34 100644
--- a/static/js/handleSidebarTriangles.js
+++ b/static/js/handleSidebarTriangles.js
@@ -1,18 +1,22 @@
const trinagles = $('.dropdownIndicator');
-//const containers = $('');
+console.log(`Found ${trinagles.length} triangles`)
+
trinagles.each(function () {
var target = $(this.dataset.refTarget);
+ var triTar = $(this);
+ // Apply rotate if target is open
+ if (target.hasClass('show')) {
+ $(this).addClass('rotate');
+ }
+
+ console.log('target', target);
target.on('show.bs.collapse', function () {
- //$(this).parent.addClass('rotate');
- $(this).parent().find('.dropdownIndicator').addClass('rotate');
- console.log($(this).parent().find('.dropdownIndicator'));
- console.log('show');
+ $(triTar).addClass('rotate');
+ $(triTar).removeClass('derotate');
});
target.on('hide.bs.collapse', function () {
- //$(this).parent.removeClass('rotate');
- $(this).parent().find('.dropdownIndicator').removeClass('rotate');
- console.log('hide');
+ $(triTar).removeClass('rotate');
+ $(triTar).addClass('derotate');
});
- // bootstrap.Collapse.getOrCreateInstance(document.querySelector(this.dataset.refTarget))
});