1) jsgantt/jsgantt.js, line 369 should end with a semicolon ";". I know, I know, it's not your code, but anyway, esp since you have packaged your module together with 3rd party code :), which leads us into...
2) The whole jsgantt folder should be taken out of module folder and put into sites/all/library folder instead. Keeping the 3rd party libraries together with the module code is def. not recommended.

CommentFileSizeAuthor
#1 jsgantt.patch15.41 KBAzol

Comments

Azol’s picture

Priority: Minor » Normal
StatusFileSize
new15.41 KB

3) Another interesting thing is at line 1618 of jsgantt.js:

Task = ta[i].replace(/<[/]p/g, '<p');

should have probably been

Task = ta[i].replace(/<\/p/g, '<p');

as we try to use <p> to split parameters in the xml file.
Anyway, I did some cleaning, inserting missing semicolons etc, here is the patch (vs HEAD), feel free to give it a try to see if it resolves any previous issues with displaying dependencies between tasks.

Azol’s picture

Status: Active » Needs review
danepowell’s picture

Thanks for the patch, someone will need to review it before I can commit it.

PatchRanger’s picture

Thank you for the patch, Azol!
I've just applied it (with the help of Patch Manager).
1) This patch should be remade to fit -p1 standart (I had to remove some strings and to edit some other from .patch-file, because I don't know how to do it in civilized manner).
2) There were some 'fuzz' (what is it??) and 1 failure (see report below).
3) As I could see this patch didn't solve the problem with displaying task dependencies. Sometimes blue arrows are appearing - but not in predictable way. They are disappearing fast when I try to make them obedient. :)

•	Hmm...  Looks like a unified diff to me...
•	The text leading up to this was:
•	--------------------------
•	|--- views_jsgantt/jsgantt/jsgantt.js	25 Aug 2010 16:35:53 -0000	1.1
•	|+++ views_jsgantt/jsgantt/jsgantt.js	13 Jan 2011 09:27:25 -0000
•	--------------------------
•	Patching file jsgantt/jsgantt.js using Plan A...
•	Hunk #1 succeeded at 43.
•	Hunk #2 succeeded at 75.
•	Hunk #3 succeeded at 132.
•	Hunk #4 succeeded at 158.
•	Hunk #5 succeeded at 203.
•	Hunk #6 succeeded at 238.
•	Hunk #7 succeeded at 257.
•	Hunk #8 succeeded at 293.
•	Hunk #9 succeeded at 316.
•	Hunk #10 succeeded at 342.
•	Hunk #11 succeeded at 366.
•	Hunk #12 succeeded at 381.
•	Hunk #13 succeeded at 863 with fuzz 1.
•	Hunk #14 succeeded at 892.
•	Hunk #15 succeeded at 913.
•	Hunk #16 succeeded at 995.
•	Hunk #17 FAILED at 1004.
•	Hunk #18 succeeded at 1021 with fuzz 1.
•	Hunk #19 succeeded at 1077.
•	Hunk #20 succeeded at 1149.
•	Hunk #21 succeeded at 1238.
•	Hunk #22 succeeded at 1290.
•	Hunk #23 succeeded at 1316.
•	Hunk #24 succeeded at 1356.
•	Hunk #25 succeeded at 1374.
•	Hunk #26 succeeded at 1428.
•	Hunk #27 succeeded at 1446.
•	Hunk #28 succeeded at 1470.
•	Hunk #29 succeeded at 1499.
•	Hunk #30 succeeded at 1520.
•	Hunk #31 succeeded at 1528.
•	Hunk #32 succeeded at 1586.
•	Hunk #33 succeeded at 1596.
•	Hunk #34 succeeded at 1606.
•	Hunk #35 succeeded at 1615.
•	1 out of 35 hunks FAILED -- saving rejects to file jsgantt/jsgantt.js.rej
Azol’s picture

Last thing I noticed is that the developer of gantt javascript has made available the improved version as well as 'packaged' version which should be tried out first. Most of the errors of previous version were fixed. Not sure about dependencies though.

danepowell’s picture

Huh? I don't think there's been any development of jsGantt in about two years...

Azol’s picture

Status: Needs review » Needs work

http://www.jsgantt.com/zip/

This archive contains the fixed js code as well as compressed javascript file. I have been using this one for quite some time now.

danepowell’s picture

Ah... well that release is still two years old. And if I recall, it claims to be the same version (1.2?) as the version in the Google Code repository, which is obviously different. I wasn't able to tell which one was actually better / newer, they both seemed to have problems.

Azol’s picture

You can use some JS validation tool to compare them - the last version has most of the jscript-related errors fixed (most of those were the same I addressed in my patch).