diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-09-11 00:57:10 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-09-11 00:57:10 +0000 |
commit | 66f881aad385e33ee3b4d60c21cbe287cc9c17da (patch) | |
tree | b39344fd1f49b75170f63973f0fa865fbd36c6a0 /lib | |
parent | d3d719c0e75086ed874d5af70764242511ee5823 (diff) | |
download | redmine-66f881aad385e33ee3b4d60c21cbe287cc9c17da.tar.gz redmine-66f881aad385e33ee3b4d60c21cbe287cc9c17da.zip |
gantt: use content_tag instead of html tag at the task bar
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10355 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/helpers/gantt.rb | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index 8187efe51..59b40fc16 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -704,12 +704,33 @@ module Redmine output = '' # Renders the task bar, with progress and late if coords[:bar_start] && coords[:bar_end] - output << "<div style='top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_end] - coords[:bar_start] - 2}px;' class='#{options[:css]} task_todo'> </div>".html_safe + width = coords[:bar_end] - coords[:bar_start] - 2 + style = "" + style << "top: #{params[:top]}px;" + style << "left: #{coords[:bar_start]}px;" + style << "width: #{width}px;" + output << view.content_tag(:div, ' '.html_safe, + :style => style, + :class => "#{options[:css]} task_todo") if coords[:bar_late_end] - output << "<div style='top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_late_end] - coords[:bar_start] - 2}px;' class='#{options[:css]} task_late'> </div>".html_safe + width = coords[:bar_late_end] - coords[:bar_start] - 2 + style = "" + style << "top: #{params[:top]}px;" + style << "left: #{coords[:bar_start]}px;" + style << "width: #{width}px;" + output << view.content_tag(:div, ' '.html_safe, + :style => style, + :class => "#{options[:css]} task_late") end if coords[:bar_progress_end] - output << "<div style='top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_progress_end] - coords[:bar_start] - 2}px;' class='#{options[:css]} task_done'> </div>".html_safe + width = coords[:bar_progress_end] - coords[:bar_start] - 2 + style = "" + style << "top: #{params[:top]}px;" + style << "left: #{coords[:bar_start]}px;" + style << "width: #{width}px;" + output << view.content_tag(:div, ' '.html_safe, + :style => style, + :class => "#{options[:css]} task_done") end end # Renders the markers |