##// END OF EJS Templates
Prevent text wrap in gantt subjects (#7280)....
Jean-Philippe Lang -
r4793:2f7084f7a276
parent child
Show More
@@ -60,7 +60,7 end
60 # Width of the entire chart
60 # Width of the entire chart
61 g_width = (@gantt.date_to - @gantt.date_from + 1)*zoom
61 g_width = (@gantt.date_to - @gantt.date_from + 1)*zoom
62
62
63 @gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width)
63 @gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width)
64
64
65 g_height = [(20 * (@gantt.number_of_rows + 6))+150, 206].max
65 g_height = [(20 * (@gantt.number_of_rows + 6))+150, 206].max
66 t_height = g_height + headers_height
66 t_height = g_height + headers_height
@@ -709,7 +709,10 module Redmine
709 end
709 end
710
710
711 def html_subject(params, subject, options={})
711 def html_subject(params, subject, options={})
712 output = "<div class=' #{options[:css] }' style='position: absolute;line-height:1.2em;height:16px;top:#{params[:top]}px;left:#{params[:indent]}px;overflow:hidden;'>"
712 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;"
713 style << "width:#{params[:subject_width] - params[:indent]}px;" if params[:subject_width]
714
715 output = "<div class='#{options[:css]}' style='#{style}'>"
713 output << subject
716 output << subject
714 output << "</div>"
717 output << "</div>"
715 @subjects << output
718 @subjects << output
General Comments 0
You need to be logged in to leave comments. Login now