Add/remove @icon-rtl@ class when switching between angle-down / angle-right SVG icons (#42465).

git-svn-id: https://svn.redmine.org/redmine/trunk@23656 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2025-04-13 20:57:15 +00:00
parent 6951e569c4
commit 99cc321840

View File

@@ -43,10 +43,18 @@ function toggleRowGroup(el) {
}
function toggleExpendCollapseIcon(el) {
const svg = el.getElementsByTagName('svg').item(0)
if (svg === null) {
return false;
}
if (el.classList.contains('icon-expanded')) {
updateSVGIcon(el, 'angle-down')
updateSVGIcon(svg, 'angle-down')
svg.classList.remove('icon-rtl')
} else {
updateSVGIcon(el, 'angle-right')
updateSVGIcon(svg, 'angle-right')
svg.classList.add('icon-rtl')
}
}