From 95ddae6e2c22bd28417f2d433896cdd1580f35e8 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Mon, 7 Apr 2025 20:09:17 +0000 Subject: [PATCH] Use toggleExpendCollapseIcon function in Collapse all/Expand all (#42369). git-svn-id: https://svn.redmine.org/redmine/trunk@23606 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/assets/javascripts/application.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 500e3f2dc..d991035b6 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -66,8 +66,9 @@ function collapseAllRowGroups(el) { tbody.children('tr').each(function(index) { if ($(this).hasClass('group')) { $(this).removeClass('open'); - $(this).find('.expander').switchClass('icon-expanded', 'icon-collapsed'); - updateSVGIcon($(this).find('.expander')[0], 'angle-right') + var expander = $(this).find('.expander'); + expander.switchClass('icon-expanded', 'icon-collapsed'); + toggleExpendCollapseIcon(expander[0]); } else { $(this).hide(); } @@ -79,8 +80,9 @@ function expandAllRowGroups(el) { tbody.children('tr').each(function(index) { if ($(this).hasClass('group')) { $(this).addClass('open'); - $(this).find('.expander').switchClass('icon-collapsed', 'icon-expanded'); - updateSVGIcon($(this).find('.expander')[0], 'angle-down') + var expander = $(this).find('.expander'); + expander.switchClass('icon-collapsed', 'icon-expanded'); + toggleExpendCollapseIcon(expander[0]); } else { $(this).show(); }