<script src="../../assets/Ganttv2/dhtmlxgantt.js" type="text/javascript"></script>
<script src="../../assets/Ganttv2/locale/locale_fr.js" type="text/javascript"></script>
<script src="../../assets/javascript/jquery-1.9.1.js"></script>
</HEAD>
<BODY>
Hello World
<div id="gantt_here" style='width:100%; height:500px;'></div>
<script type="text/javascript">
tasks =
{
"data": [
{
"id": -739,
"text": "Project #1",
"start_date": "05-05-2015 00:00:00",
"end_date": "06-05-2015 00:00:00",
"open": "true"
},
{
"id": "739",
"text": "D.S.",
"start_date": "05-05-2015 00:00:00",
"end_date": "06-05-2015 00:00:00",
"parent": -739,
"progress": "0.00"
},
{
"id": "740",
"text": "H.J.",
"start_date": "05-05-2015 00:00:00",
"end_date": "06-05-2015 00:00:00",
"parent": -739,
"progress": "0.00"
},
{
"id": -789,
"text": "Project #2",
"start_date": "05-06-2015 00:00:00",
"end_date": "06-06-2015 00:00:00",
"open": "true"
},
{
"id": "789",
"text": "H.J.",
"start_date": "05-06-2015 00:00:00",
"end_date": "06-06-2015 00:00:00",
"parent": -789,
"progress": "0.00"
},
{
"id": "790",
"text": "D.S.",
"start_date": "05-06-2015 00:00:00",
"end_date": "06-06-2015 00:00:00",
"parent": -789,
"progress": "0.00"
},
{
"id": -763,
"text": "Project #3",
"start_date": "16-04-2015 00:00:00",
"end_date": "01-01-2016 00:00:00",
"open": "true"
},
{
"id": -865,
"text": "Project #4",
"start_date": "04-05-2015 00:00:00",
"end_date": "15-08-2015 00:00:00",
"open": "true"
}
]
}
gantt.config.work_time = true;
gantt.config.correct_work_time = true;
gantt.config.drag_links = false;
//gantt.config.date_scale = "%D, %d";
gantt.config.duration_unit = "day";
//gantt.config.scale_height = 20*3;
//gantt.config.row_height = 30;
//TODO: Débugger le progress...
gantt.config.drag_progress = true;
gantt.config.autosize = true;
gantt.config.sort = true;
//gantt.config.order_branch = true;
gantt.config.columns = [
{name:"text", label:"Nom de la tâche", width:"*", tree:true },
//{name:"start_date", label:"Date initiale", align: "center" },
//{name:"end_date", label:"Date Fin", align: "center" },
//{name:"duration", label:"Durée", align: "center" },
{name:"progress", label:"Progress", align: "center" },
];
gantt.init("gantt_here");
gantt.parse(tasks);
</script>
</BODY>