diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 33220eea..1e38647e 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -60,7 +60,7 @@ end # Width of the entire chart g_width = (@gantt.date_to - @gantt.date_from + 1)*zoom -@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width) +@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width) g_height = [(20 * (@gantt.number_of_rows + 6))+150, 206].max t_height = g_height + headers_height diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index b68534b2..9d0ea8cf 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -713,7 +713,10 @@ module Redmine end def html_subject(params, subject, options={}) - output = "
" + style = "position: absolute;line-height:1.2em;height:16px;top:#{params[:top]}px;left:#{params[:indent]}px;overflow:hidden;white-space:nowrap;text-overflow: ellipsis;" + style << "width:#{params[:subject_width] - params[:indent]}px;" if params[:subject_width] + + output = "
" output << subject output << "
" @subjects << output