I am encountering a few errors using dhtmlxGantt v2.0 build 130926.
html code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>""</title>
<script src="../codebase/dhtmlxgantt.js" type="text/javascript"></script>
<link rel="STYLESHEET" type="text/css" href="../codebase/dhtmlxgantt.css">
<script src="../data/scripts/schedEntry.js" type="text/javascript"></script>
<style>
html,body
{
margin:0px;
padding:0px;
width:100%;
height:100%;
overflow:hidden;
}
</style>
</head>
<body onload="ganttInit()">
</body>
</html>
schedEntry.js :
function ganttInit() {
gantt.config.xml_date = "%Y-%m-%d %H:%i";
gantt.config.columns = [
{name:"text", label:"Task Name", tree:true, width:'*' },
{name:"progress", label:"Progress", width:80, align: "center",
template: function(item) {
if (item.progress >= 1)
return "Complete";
if (item.progress == 0)
return "Not started";
return item.progress*100 + "%";
}
},
{name:"start_date", label:"Start Date", width:'80'},
{name:"add",label:"",width:30}];
gantt.config.lightbox.sections=[
{name:"description", height:70, map_to:"text", type:"textarea", focus:true},
{name:"progress", height:40, map_to:"progress",type:"textarea"},
{name:"duration", height:72, map_to:"duration", type:"duration"}
];
gantt.config.scale_unit = "month";
gantt.config.date_scale = "%F, %Y";
gantt.config.scale_height = 50;
gantt.config.subscales = [{unit:"day", step:7, date:"%j, %D" }];
gantt.init(document.body);
gantt.load('../codebase/connector/ganttData.php');
var dp = new dataProcessor('../codebase/connector/ganttData.php');
dp.init(gantt);
};
- When adding a new activity when there are no rows in the gantt_tasks table (schedule with no activities).
Uncaught TypeError: Cannot call method ‘getFullYear’ of undefined
If I manually add an activity to mySQL using an insert statement the Gantt will display the record and updates are written to the database. However new child tasks are not created in the database.
- In the edit task popup (lightbox) the names of the sections are not getting added. They are simply called undefined with the textarea or duration controls beneath it.
Any help will be greatly appreciated!