Commit 52a2a174 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang Committed by Eric Davis

Reverted r4780 that broke gantt tests (#7280).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4782 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 9ed03878
...@@ -60,7 +60,7 @@ end ...@@ -60,7 +60,7 @@ end
# Width of the entire chart # Width of the entire chart
g_width = (@gantt.date_to - @gantt.date_from + 1)*zoom g_width = (@gantt.date_to - @gantt.date_from + 1)*zoom
@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width) @gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width)
g_height = [(20 * (@gantt.number_of_rows + 6))+150, 206].max g_height = [(20 * (@gantt.number_of_rows + 6))+150, 206].max
t_height = g_height + headers_height t_height = g_height + headers_height
......
...@@ -263,7 +263,7 @@ module Redmine ...@@ -263,7 +263,7 @@ module Redmine
def subject_for_project(project, options) def subject_for_project(project, options)
case options[:format] case options[:format]
when :html when :html
subject = "<span class='gantt_subject-text icon icon-projects #{project.overdue? ? 'project-overdue' : ''}'>" subject = "<span class='icon icon-projects #{project.overdue? ? 'project-overdue' : ''}'>"
subject << view.link_to_project(project) subject << view.link_to_project(project)
subject << '</span>' subject << '</span>'
html_subject(options, subject, :css => "project-name") html_subject(options, subject, :css => "project-name")
...@@ -301,7 +301,7 @@ module Redmine ...@@ -301,7 +301,7 @@ module Redmine
def subject_for_version(version, options) def subject_for_version(version, options)
case options[:format] case options[:format]
when :html when :html
subject = "<span class='gantt_subject-text icon icon-package #{version.behind_schedule? ? 'version-behind-schedule' : ''} #{version.overdue? ? 'version-overdue' : ''}'>" subject = "<span class='icon icon-package #{version.behind_schedule? ? 'version-behind-schedule' : ''} #{version.overdue? ? 'version-overdue' : ''}'>"
subject << view.link_to_version(version) subject << view.link_to_version(version)
subject << '</span>' subject << '</span>'
html_subject(options, subject, :css => "version-name") html_subject(options, subject, :css => "version-name")
...@@ -345,7 +345,7 @@ module Redmine ...@@ -345,7 +345,7 @@ module Redmine
output = case options[:format] output = case options[:format]
when :html when :html
css_classes = 'gantt_subject-text' css_classes = ''
css_classes << ' issue-overdue' if issue.overdue? css_classes << ' issue-overdue' if issue.overdue?
css_classes << ' issue-behind-schedule' if issue.behind_schedule? css_classes << ' issue-behind-schedule' if issue.behind_schedule?
css_classes << ' icon icon-issue' unless Setting.gravatar_enabled? && issue.assigned_to css_classes << ' icon icon-issue' unless Setting.gravatar_enabled? && issue.assigned_to
...@@ -357,7 +357,7 @@ module Redmine ...@@ -357,7 +357,7 @@ module Redmine
end end
subject << view.link_to_issue(issue) subject << view.link_to_issue(issue)
subject << '</span>' subject << '</span>'
html_subject(options, subject, :css => 'issue-subject') + "\n" html_subject(options, subject, :css => "issue-subject") + "\n"
when :image when :image
image_subject(options, issue.subject) image_subject(options, issue.subject)
when :pdf when :pdf
...@@ -709,7 +709,7 @@ module Redmine ...@@ -709,7 +709,7 @@ module Redmine
end end
def html_subject(params, subject, options={}) def html_subject(params, subject, options={})
output = "<div class='gantt_subject #{options[:css] }' style='top:#{params[:top]}px;left:#{params[:indent]}px;width:#{params[:subject_width]-params[:indent]}px;'>" output = "<div class=' #{options[:css] }' style='position: absolute;line-height:1.2em;height:16px;top:#{params[:top]}px;left:#{params[:indent]}px;overflow:hidden;'>"
output << subject output << subject
output << "</div>" output << "</div>"
@subjects << output @subjects << output
......
...@@ -783,8 +783,6 @@ background-image:url('../images/close_hl.png'); ...@@ -783,8 +783,6 @@ background-image:url('../images/close_hl.png');
} }
.gantt_subjects { font-size: 0.8em; } .gantt_subjects { font-size: 0.8em; }
.gantt_subject { position: absolute; line-height: 1.2em; height: 16px; overflow: hidden; text-overflow: ellipsis; }
.gantt_subject-text { float: left; white-space: nowrap; }
.task { .task {
position: absolute; position: absolute;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment