Hi all,
I have a weird issue. When I run my gantt chart from my hosted IIS server, I am unable to see the progress bar drag icon. This will probably confuse my users. The weird part is that I am able to see it when I run locally. I have posted my template code to show you what I have tried.
gantt.attachEvent("onBeforeTaskDrag", // before task is dragged
function (id, mode, e) {
var task = gantt.getTask(id);
if (mode === "progress" && (task.type === gantt.config.types.project || task.template)) {
console.log("You cannot update progress of a template");
// prevent direct updating of project's completion percentage because it is calculated base on child tasks or it is a template
return false;
}
return true;
});
gantt.templates.task_class = function(start, end, task) {
//var css = [];
//if (task.type == gantt.config.types.project) {
// css.push("drag_progress");
//}
//return css.join(" ");
//if (task.progress < 0.5) return "bad";
//return "";
if (task.template == true) {
return "bad";
}
if (gantt.hasChild(task.id) > 0) {
return "bad";
}
if (task.template == false) {
//console.log("you are updated the progress of a non template");
return "good";
}
return "";
}
<style>
/*Made my own styles here, so it wouldnt mess with our flat styles*/
/*This is for hiding the progress bar on templates and project level tasks*/
.bad .gantt_task_progress_drag {
display: none !important;
}
.good .gantt_task_progress_drag {
display: unset !important;
}
</style>
Can anyone relate to this problem, and maybe toss me some ideas to try?