summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/redmine/helpers/gantt.rb6
-rw-r--r--public/javascripts/gantt.js13
2 files changed, 6 insertions, 13 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index 5bf0a1e98..3238de8cf 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -749,11 +749,7 @@ module Redmine
:class => "#{options[:css]} task_todo",
:id => html_id}
if options[:issue]
- rels_hash = {}
- issue_relations(options[:issue]).each do |k, v|
- rels_hash[k] = v.join(',')
- end
- content_opt[:data] = {"rels" => rels_hash}
+ content_opt[:data] = {"rels" => issue_relations(options[:issue]).to_json}
end
output << view.content_tag(:div, '&nbsp;'.html_safe, content_opt)
if coords[:bar_late_end]
diff --git a/public/javascripts/gantt.js b/public/javascripts/gantt.js
index e16f4028f..51e2257e0 100644
--- a/public/javascripts/gantt.js
+++ b/public/javascripts/gantt.js
@@ -19,14 +19,11 @@ function getRelationsArray() {
var issue_id = element_id.replace("task-todo-issue-", "");
var data_rels = $(element).data("rels");
if (data_rels != null) {
- for (rel_type_key in issue_relation_type) {
- if (rel_type_key in data_rels) {
- var issue_arr = data_rels[rel_type_key].toString().split(",");
- $.each(issue_arr, function(index_issue, element_issue) {
- arr.push({issue_from: issue_id, issue_to: element_issue,
- rel_type: rel_type_key});
- });
- }
+ for (rel_type_key in data_rels) {
+ $.each(data_rels[rel_type_key], function(index_issue, element_issue) {
+ arr.push({issue_from: issue_id, issue_to: element_issue,
+ rel_type: rel_type_key});
+ });
}
}
}