summaryrefslogtreecommitdiffstats
path: root/lib/redmine
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-11 03:45:06 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-11 03:45:06 +0000
commit097d9661c92cda6abeb524ee83e216de658bccc3 (patch)
tree2a0bbf89c5585ddd5e36c470b8f5f72314c84b03 /lib/redmine
parentf8cedf00a805584e3934887c0d76a5ba8b478780 (diff)
downloadredmine-097d9661c92cda6abeb524ee83e216de658bccc3.tar.gz
redmine-097d9661c92cda6abeb524ee83e216de658bccc3.zip
gantt: use content_tag instead of html tag at the tooltip
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10362 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r--lib/redmine/helpers/gantt.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index 46f6ec6a0..39fdc5cde 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -769,10 +769,18 @@ module Redmine
end
# Renders the tooltip
if options[:issue] && coords[:bar_start] && coords[:bar_end]
- output << "<div class='tooltip' style='position: absolute;top:#{ params[:top] }px;left:#{ coords[:bar_start] }px;width:#{ coords[:bar_end] - coords[:bar_start] }px;height:12px;'>".html_safe
- output << '<span class="tip">'.html_safe
- output << view.render_issue_tooltip(options[:issue]).html_safe
- output << "</span></div>".html_safe
+ s = view.content_tag(:span,
+ view.render_issue_tooltip(options[:issue]).html_safe,
+ :class => "tip")
+ style = ""
+ style << "position: absolute;"
+ style << "top:#{params[:top]}px;"
+ style << "left:#{coords[:bar_start]}px;"
+ style << "width:#{coords[:bar_end] - coords[:bar_start]}px;"
+ style << "height:12px;"
+ output << view.content_tag(:div, s.html_safe,
+ :style => style,
+ :class => "tooltip")
end
@lines << output
output