summaryrefslogtreecommitdiffstats
path: root/public/javascripts/gantt.js
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-05 12:34:20 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-05 12:34:20 +0000
commit59ddbf8c09a730d042806c6b52db32e392a78c95 (patch)
tree2aabf2f5c0712140966ce7d67f3bb81cd22eaf07 /public/javascripts/gantt.js
parent601148c5b11dd53a834e4dc738d33668970f9193 (diff)
downloadredmine-59ddbf8c09a730d042806c6b52db32e392a78c95.tar.gz
redmine-59ddbf8c09a730d042806c6b52db32e392a78c95.zip
Use JSON so we don't have to parse data-rels manually (#3436).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11119 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts/gantt.js')
-rw-r--r--public/javascripts/gantt.js13
1 files changed, 5 insertions, 8 deletions
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});
+ });
}
}
}