Fixes for scm entry to switch between folder and folder-open icons and adjusts the padding for file icons (#23980).

git-svn-id: https://svn.redmine.org/redmine/trunk@23090 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2024-09-29 19:17:51 +00:00
parent dfbb1b6856
commit 5b546ef960
2 changed files with 6 additions and 5 deletions

View File

@@ -575,18 +575,19 @@ function expandScmEntry(id) {
function scmEntryClick(id, url) {
var el = $('#'+id);
if (el.hasClass('open')) {
collapseScmEntry(id);
el.find('.expander').switchClass('icon-expanded', 'icon-collapsed');
el.addClass('collapsed');
updateSVGIcon(el[0], 'folder')
updateSVGIcon(el.find('.icon-folder')[0], 'folder')
return false;
} else if (el.hasClass('loaded')) {
expandScmEntry(id);
el.find('.expander').switchClass('icon-collapsed', 'icon-expanded');
el.removeClass('collapsed');
updateSVGIcon(el[0], 'folder-open')
updateSVGIcon(el.find('.icon-folder-open')[0], 'folder-open')
return false;
}
@@ -599,7 +600,7 @@ function scmEntryClick(id, url) {
success: function(data) {
el.after(data);
el.addClass('open').addClass('loaded').removeClass('loading');
updateSVGIcon(el[0], 'folder-open')
updateSVGIcon(el.find('.icon-folder')[0], 'folder-open')
el.find('.expander').switchClass('icon-collapsed', 'icon-expanded');
}
});