diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-10-08 21:19:29 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-10-08 21:19:29 +0000 |
commit | a8c9e9124578858963167cd02d99025812b2a8ff (patch) | |
tree | 66d9abe980c2dee34a59a361540b7e07eb8143a2 /app | |
parent | a43c68b48f4828b8dcc3d2a4ce5a63c3706d027c (diff) | |
download | redmine-a8c9e9124578858963167cd02d99025812b2a8ff.tar.gz redmine-a8c9e9124578858963167cd02d99025812b2a8ff.zip |
Fixes gantt collapse/expand buttons are not available after switching to SVG icons (#41447, #23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@23104 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/gantt.js | 14 | ||||
-rw-r--r-- | app/assets/stylesheets/application.css | 6 |
2 files changed, 14 insertions, 6 deletions
diff --git a/app/assets/javascripts/gantt.js b/app/assets/javascripts/gantt.js index 08bf34631..6a42e5be9 100644 --- a/app/assets/javascripts/gantt.js +++ b/app/assets/javascripts/gantt.js @@ -234,7 +234,7 @@ function resizableSubjectColumn(){ } ganttEntryClick = function(e){ - var icon_expander = e.target; + var icon_expander = e.currentTarget; var subject = $(icon_expander.parentElement); var subject_left = parseInt(subject.css('left')) + parseInt(icon_expander.offsetWidth); var target_shown = null; @@ -244,13 +244,21 @@ ganttEntryClick = function(e){ var iconChange = null; if(subject.hasClass('open')) iconChange = function(element){ - $(element).find('.expander').switchClass('icon-expanded', 'icon-collapsed'); + var expander = $(element).find('.expander') + expander.switchClass('icon-expanded', 'icon-collapsed'); $(element).removeClass('open'); + if (expander.find('svg').length === 1) { + updateSVGIcon(expander[0], 'angle-right') + } }; else iconChange = function(element){ - $(element).find('.expander').switchClass('icon-collapsed', 'icon-expanded'); + var expander = $(element).find('.expander') + expander.find('.expander').switchClass('icon-collapsed', 'icon-expanded'); $(element).addClass('open'); + if (expander.find('svg').length === 1) { + updateSVGIcon(expander[0], 'angle-down') + } }; iconChange(subject); subject.nextAll('div').each(function(_, element){ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 9b2cbb9d5..d45523956 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -359,10 +359,9 @@ tr.entry td.age { text-align: right; } tr.entry.file td.filename a { margin-left: 26px; } tr.entry.file td.filename_no_report a { margin-left: 16px; } -tr span.expander, .gantt_subjects div > span.expander {padding-left: 4px; margin-left: 0; cursor: pointer;} -.gantt_subjects div > span.expander {padding-left: 12px;} +tr span.expander, .gantt_subjects div > span.expander {margin-left: 0; cursor: pointer;} .gantt_subjects div > span .icon-gravatar {float: none;} -.gantt_subjects svg {margin-left: 4px; margin-right: 4px;} +.gantt_subjects div.project-name a, .gantt_subjects div.version-name a {margin-left: 4px;} tr.changeset { height: 20px } tr.changeset ul, ol { margin-top: 0px; margin-bottom: 0px; } @@ -1578,6 +1577,7 @@ table.gantt-table td { .gantt_subjects .issue-subject img.icon-gravatar { margin: 2px 5px 0px 2px; } + .gantt_hdr_selected_column_name { position: absolute; top: 50%; |