mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 11:37:14 +00:00
Fixes expander icon not working in repository tree (#42532).
git-svn-id: https://svn.redmine.org/redmine/trunk@23605 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ad1ab0cd8d
commit
ec41a38e6e
@ -586,19 +586,23 @@ function expandScmEntry(id) {
|
||||
|
||||
function scmEntryClick(id, url) {
|
||||
var el = $('#'+id);
|
||||
var expander = el.find('.expander');
|
||||
var folder = el.find('.icon-folder');
|
||||
|
||||
if (el.hasClass('open')) {
|
||||
collapseScmEntry(id);
|
||||
el.find('.expander').switchClass('icon-expanded', 'icon-collapsed');
|
||||
el.addClass('collapsed');
|
||||
updateSVGIcon(el.find('.icon-folder')[0], 'folder')
|
||||
updateSVGIcon(folder[0], 'folder')
|
||||
toggleExpendCollapseIcon(expander[0]);
|
||||
|
||||
return false;
|
||||
} else if (el.hasClass('loaded')) {
|
||||
expandScmEntry(id);
|
||||
el.find('.expander').switchClass('icon-collapsed', 'icon-expanded');
|
||||
el.removeClass('collapsed');
|
||||
updateSVGIcon(el.find('.icon-folder-open')[0], 'folder-open')
|
||||
updateSVGIcon(folder[0], 'folder-open')
|
||||
toggleExpendCollapseIcon(expander[0]);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -611,8 +615,9 @@ function scmEntryClick(id, url) {
|
||||
success: function(data) {
|
||||
el.after(data);
|
||||
el.addClass('open').addClass('loaded').removeClass('loading');
|
||||
updateSVGIcon(el.find('.icon-folder')[0], 'folder-open')
|
||||
el.find('.expander').switchClass('icon-collapsed', 'icon-expanded');
|
||||
updateSVGIcon(folder[0], 'folder-open')
|
||||
toggleExpendCollapseIcon(expander[0]);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user