assetflow/static/js/handleSidebarTriangles.js
grey 0233453084 - introduced table view with client side loading
- improved /items/ with support for pagination
- improved helper functions for tooltips and popovers
- removed console log residue from handleSidebarTriangles
- introduction of version route
2023-07-08 00:09:54 +02:00

22 lines
532 B
JavaScript

const trinagles = $('.dropdownIndicator');
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');
}
target.on('show.bs.collapse', function () {
$(triTar).addClass('rotate');
$(triTar).removeClass('derotate');
});
target.on('hide.bs.collapse', function () {
$(triTar).removeClass('rotate');
$(triTar).addClass('derotate');
});
});