summaryrefslogtreecommitdiffstats
path: root/app/views/gantts
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-05 12:28:34 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-05 12:28:34 +0000
commit601148c5b11dd53a834e4dc738d33668970f9193 (patch)
tree41da71fb73027b0cd02acaa4246d47cb2a660322 /app/views/gantts
parent9adb0c61a903eae9930a84510b25a8ed156ed4f8 (diff)
downloadredmine-601148c5b11dd53a834e4dc738d33668970f9193.tar.gz
redmine-601148c5b11dd53a834e4dc738d33668970f9193.zip
Show precedes/follows and blocks/blocked relations on the Gantt diagram (#3436).
Based on Toshi MARUYAMA's patch. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11118 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/gantts')
-rw-r--r--app/views/gantts/show.html.erb23
1 files changed, 21 insertions, 2 deletions
diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb
index 0cebd0a65..caec4c3c2 100644
--- a/app/views/gantts/show.html.erb
+++ b/app/views/gantts/show.html.erb
@@ -102,7 +102,7 @@
</td>
<td>
-<div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;">
+<div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;" id="gantt_area">
<%
style = ""
style += "width: #{g_width - 1}px;"
@@ -231,7 +231,15 @@
%>
<%= content_tag(:div, '&nbsp;'.html_safe, :style => style) %>
<% end %>
-
+<%
+ style = ""
+ style += "position: absolute;"
+ style += "height: #{g_height}px;"
+ style += "top: #{headers_height + 1}px;"
+ style += "left: 0px;"
+ style += "width: #{g_width - 1}px;"
+%>
+<%= content_tag(:div, '', :style => style, :id => "gantt_draw_area") %>
</div>
</td>
</tr>
@@ -261,3 +269,14 @@
<% end %>
<% html_title(l(:label_gantt)) -%>
+
+<% content_for :header_tags do %>
+ <%= javascript_include_tag 'raphael' %>
+ <%= javascript_include_tag 'gantt' %>
+<% end %>
+
+<%= javascript_tag do %>
+ var issue_relation_type = <%= raw Redmine::Helpers::Gantt::DRAW_TYPES.to_json %>;
+ $(document).ready(drawGanttHandler);
+ $(window).resize(drawGanttHandler);
+<% end %>