-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No task type support. Down upgrade... #136
Comments
My hack... gantt.init("gantt_here");
load_promisse = gantt.load(gantt_json_data_url)
fix_task = function(task) {
if(task.type == "project") {
var g = document.getElementById("gantt_here")
var tl = g.querySelectorAll(`.gantt_task_line[task_id="${task.id}"]`)
for(let t of tl) {
t.classList.add("gantt_project")
}
}
}
async function fix_tasks() {
await load_promisse;
gantt.eachTask(fix_task)
}
fix_tasks() |
@andre-caldas, But due to a bug in the 7.0 version, the Project and Milestone task types started working. The bug was fixed in the 9.0 version, so this feature partially works in all versions between the 7.0 and 9.0. The code you are using only adds the class name to the task bars. As soon as Gantt is repainted, the original HTML elements are removed, and Gantt creates new ones instead. As a result, the class list you added is removed as well: If you only want to have the green color for the task bars with the children, you can return the Also, if a parent task is loaded without date parameters ( Of course, additional features related to the project tasks won't work. You will need to manually implement them. For example, instead of using the Here is an example in the snippet: Also, "pro" doesn't mean "non-gpl". There is a confusion in the license versions. The Standard version has less features than the Pro version. Some of the features it doesn't have (like the grid column resize) can be easily implemented. Implementing other features require more time. |
Lot's of features even in no-Pro. :-)
A very hackish hack made by someone who doesn't know how to work with dhtmlx properly. I was quite surprised when I realized that resizing (ctrl-+) would make everything being rebuilt. Probably it is something that makes sense in big projects with on demand data and stuff. :-)
I will do that. Thank you!
Nice to know. I hope it helps future visitors of this thread.
I only use dhtmlx_gantt for displaying simple Gantt charts. I do not really know about those amazing features. But I do hope this post can help visitors of this post in the future.
Very happy to know! Business models that depend on some sort of fear of the gpl makes me a little uncomfortable. I am very glad to know that this is not exactly the case. By the way, I do have a GPL python project I intend to use dhtmlx_gantt in the "example" section.
I hope DHX reconsiders its policy regarding those easily workable around stuff. After all, all "Standard" users are potential "Pro" customers and you don't really want them working arround stuff. Or worse, making a terrible hack like mine. :-) But I do not really have any right to discuss this with you. Sorry for that!
Very gray area we are stepping into, here... :-) |
I was using an older version of dhtmlx Gantt. When I upgraded, task types stopped working.
I found it a little disappointing. It is like being downgraded.
I do understand that DHX wants to have special features in a "PRO" version (I don't really understand why "pro" means "non-gpl"... my experience tells me that the less free it is, the less "pro" it is as well). But downgrading when I upgrade is like creating a problem to sell a solution.
It is not really hard to make a little hack to have the functionality back. But I'd rather have DHX fellows to change their approach. :-)
The text was updated successfully, but these errors were encountered: