mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-06 17:23:06 +00:00
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
This commit is contained in:
parent
a43c68b48f
commit
a8c9e91245
@ -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){
|
||||
|
||||
@ -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%;
|
||||
|
||||
@ -726,7 +726,7 @@ module Redmine
|
||||
css_classes << ' over-end-date' if progress_date > self.date_to && issue.done_ratio > 0
|
||||
end
|
||||
s = (+"").html_safe
|
||||
s << view.sprite_icon('issue').html_safe
|
||||
s << view.sprite_icon('issue').html_safe unless Setting.gravatar_enabled? && issue.assigned_to
|
||||
s << view.assignee_avatar(issue.assigned_to, :size => 13, :class => 'icon-gravatar')
|
||||
s << view.link_to_issue(issue).html_safe
|
||||
s << view.content_tag(:input, nil, :type => 'checkbox', :name => 'ids[]',
|
||||
@ -792,12 +792,12 @@ module Redmine
|
||||
}
|
||||
end
|
||||
if has_children
|
||||
content = view.content_tag(:span, nil, :class => 'icon icon-expanded expander') + content
|
||||
content = view.content_tag(:span, view.sprite_icon('angle-down').html_safe, :class => 'icon icon-expanded expander') + content
|
||||
tag_options[:class] += ' open'
|
||||
else
|
||||
if params[:indent]
|
||||
params = params.dup
|
||||
params[:indent] += 12
|
||||
params[:indent] += 18
|
||||
end
|
||||
end
|
||||
style = "position: absolute;top:#{params[:top]}px;left:#{params[:indent]}px;"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user