forked from extern/egroupware
remove not needed dhtmlx samples
This commit is contained in:
parent
b4ef509c03
commit
2fcfa9e0a8
@ -1,39 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Basic initialization</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
var tasks = {
|
||||
data:[
|
||||
{id:1, text:"Project #2", start_date:"01-04-2013", duration:18,order:10,
|
||||
progress:0.4, open: true},
|
||||
{id:2, text:"Task #1", start_date:"02-04-2013", duration:8, order:10,
|
||||
progress:0.6, parent:1},
|
||||
{id:3, text:"Task #2", start_date:"11-04-2013", duration:8, order:20,
|
||||
progress:0.6, parent:1}
|
||||
],
|
||||
links:[
|
||||
{ id:1, source:1, target:2, type:"1"},
|
||||
{ id:2, source:2, target:3, type:"0"},
|
||||
{ id:3, source:3, target:4, type:"0"},
|
||||
{ id:4, source:2, target:5, type:"2"},
|
||||
]
|
||||
};
|
||||
|
||||
gantt.init("gantt_here");
|
||||
|
||||
|
||||
gantt.parse(tasks);
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Load data from JSON file</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<body>
|
||||
<style type="text/css">
|
||||
html, body{ padding:0px; margin:0px; height:100%; }
|
||||
</style>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.xml_date = "%Y-%m-%d %H:%i:%s";
|
||||
gantt.init("gantt_here");
|
||||
gantt.load("../common/data.json", "json");
|
||||
</script>
|
||||
</body>
|
@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Load data from XML file</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<body>
|
||||
<style type="text/css">
|
||||
html, body{ padding:0px; margin:0px; height:100%; }
|
||||
</style>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.date_grid = "%Y-%m-%d %H:%i";
|
||||
gantt.config.xml_date = "%Y-%m-%d %H:%i:%s";
|
||||
gantt.init("gantt_here");
|
||||
gantt.load("../common/data.xml", "xml");
|
||||
</script>
|
||||
</body>
|
@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Loading using connector and JSON</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.xml_date = "%Y-%m-%d %H:%i:%s";
|
||||
gantt.init("gantt_here");
|
||||
gantt.load("../common/connector.php");
|
||||
|
||||
var dp = new dataProcessor("../common/connector.php");
|
||||
dp.init(gantt);
|
||||
</script>
|
||||
</body>
|
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Loading using connector and XML</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<body>
|
||||
<style type="text/css">
|
||||
html, body{ padding:0px; margin:0px; height:100%; }
|
||||
</style>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.xml_date = "%Y-%m-%d %H:%i:%s";
|
||||
gantt.init("gantt_here");
|
||||
gantt.load("../common/connector_xml.php", "xml");
|
||||
|
||||
var dp = new dataProcessor("../common/connector.php");
|
||||
dp.init(gantt);
|
||||
</script>
|
||||
</body>
|
@ -1,23 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Forced touch mode</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.touch = "force";
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>jQuery integration</title>
|
||||
<script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="mygantt" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
$(".mygantt").dhx_gantt({
|
||||
data:demo_tasks
|
||||
});
|
||||
</script>
|
||||
</body>
|
@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Define date range</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/skins/dhtmlxgantt_meadow.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.subscales = [
|
||||
{unit:"month", step:1, date:"%M" },
|
||||
{unit:"year", step:1, date:"%Y" }
|
||||
];
|
||||
gantt.config.scale_height = 3*28;
|
||||
gantt.init("gantt_here", new Date(2013, 02, 10), new Date(2013, 03, 20));
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Loading data in Gantt 1.6 format</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ padding:0px; margin:0px; height:100%; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.xml_date = "%Y,%m,%d";
|
||||
gantt.init("gantt_here");
|
||||
gantt.load("../common/olddata.xml", "oldxml");
|
||||
</script>
|
||||
</body>
|
@ -1,16 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Fixed size gantt</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:1020px; height:400px;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Clickable links</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
|
||||
gantt.attachEvent("onLinkClick", function(id){
|
||||
var link = this.getLink(id),
|
||||
src = this.getTask(link.source),
|
||||
trg = this.getTask(link.target),
|
||||
types = this.config.links;
|
||||
|
||||
var first = "", second = "";
|
||||
switch (link.type){
|
||||
case types.finish_to_start:
|
||||
first = "finish";
|
||||
second = "start";
|
||||
break;
|
||||
case types.start_to_start:
|
||||
first = "start";
|
||||
second = "start";
|
||||
break;
|
||||
case types.finish_to_finish:
|
||||
first = "finish";
|
||||
second = "finish";
|
||||
break;
|
||||
}
|
||||
|
||||
dhtmlx.message("Must " + first + " <b>" + src.text + "</b> to " + second + " <b>" + trg.text + "</b>");
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Localization</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script src="../../codebase/locale/locale_fr.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Project duration</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
.gantt_task_line.gantt_dependent_task {
|
||||
background-color: #65c16f;
|
||||
border: 1px solid #3c9445;
|
||||
|
||||
}
|
||||
.gantt_task_line.gantt_dependent_task .gantt_task_progress {
|
||||
background-color: #46ad51;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
var demo_tasks = {
|
||||
"data":[
|
||||
{"id":11, "text":"Project #1", "start_date":"", "duration":"", "progress": 0.6, "open": true},
|
||||
|
||||
{"id":12, "text":"Task #1", "start_date":"03-04-2013", "duration":"5", "parent":"11", "progress": 1, "open": true},
|
||||
{"id":13, "text":"Task #2", "start_date":"", "duration":"", "parent":"11", "progress": 0.5, "open": true},
|
||||
{"id":14, "text":"Task #3", "start_date":"02-04-2013", "duration":"6", "parent":"11", "progress": 0.8, "open": true},
|
||||
{"id":15, "text":"Task #4", "start_date":"", "duration":"", "parent":"11", "progress": 0.2, "open": true},
|
||||
{"id":16, "text":"Task #5", "start_date":"02-04-2013", "duration":"7", "parent":"11", "progress": 0, "open": true},
|
||||
|
||||
{"id":17, "text":"Task #2.1", "start_date":"03-04-2013", "duration":"2", "parent":"13", "progress": 1, "open": true},
|
||||
{"id":18, "text":"Task #2.2", "start_date":"06-04-2013", "duration":"3", "parent":"13", "progress": 0.8, "open": true},
|
||||
{"id":19, "text":"Task #2.3", "start_date":"10-04-2013", "duration":"4", "parent":"13", "progress": 0.2, "open": true},
|
||||
{"id":20, "text":"Task #2.4", "start_date":"10-04-2013", "duration":"4", "parent":"13", "progress": 0, "open": true},
|
||||
{"id":21, "text":"Task #4.1", "start_date":"03-04-2013", "duration":"4", "parent":"15", "progress": 0.5, "open": true},
|
||||
{"id":22, "text":"Task #4.2", "start_date":"03-04-2013", "duration":"4", "parent":"15", "progress": 0.1, "open": true},
|
||||
{"id":23, "text":"Task #4.3", "start_date":"03-04-2013", "duration":"5", "parent":"15", "progress": 0, "open": true}
|
||||
],
|
||||
"links":[
|
||||
{"id":"10","source":"11","target":"12","type":"1"},
|
||||
{"id":"11","source":"11","target":"13","type":"1"},
|
||||
{"id":"12","source":"11","target":"14","type":"1"},
|
||||
{"id":"13","source":"11","target":"15","type":"1"},
|
||||
{"id":"14","source":"11","target":"16","type":"1"},
|
||||
{"id":"15","source":"13","target":"17","type":"1"},
|
||||
{"id":"16","source":"17","target":"18","type":"0"},
|
||||
{"id":"17","source":"18","target":"19","type":"0"},
|
||||
{"id":"18","source":"19","target":"20","type":"0"},
|
||||
{"id":"19","source":"15","target":"21","type":"2"},
|
||||
{"id":"20","source":"15","target":"22","type":"2"},
|
||||
{"id":"21","source":"15","target":"23","type":"2"}
|
||||
]
|
||||
};
|
||||
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 70, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "time", height: 72, type: "duration", map_to: "auto"}
|
||||
];
|
||||
|
||||
gantt.config.scale_unit = "month";
|
||||
gantt.config.date_scale = "%F, %Y";
|
||||
|
||||
gantt.config.scale_height = 50;
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"day", step:1, date:"%j, %D" }
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
|
||||
gantt.parse(demo_tasks);
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,44 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>ReInit in different container</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:40%;'></div>
|
||||
<br>
|
||||
<input type="button" value="Init in second html container" onclick="reinit()">
|
||||
<br>
|
||||
<div id="gantt_here2" style='width:100%; height:40%;'></div>
|
||||
<script type="text/javascript">
|
||||
var tasks = {
|
||||
data:[
|
||||
{id:1, text:"Project #2", start_date:"01-04-2013", duration:18,order:10,
|
||||
progress:0.4, open: true},
|
||||
{id:2, text:"Task #1", start_date:"02-04-2013", duration:8, order:10,
|
||||
progress:0.6, parent:1},
|
||||
{id:3, text:"Task #2", start_date:"11-04-2013", duration:8, order:20,
|
||||
progress:0.6, parent:1}
|
||||
],
|
||||
links:[
|
||||
{ id:1, source:1, target:2, type:"1"},
|
||||
{ id:2, source:2, target:3, type:"0"},
|
||||
{ id:3, source:3, target:4, type:"0"},
|
||||
{ id:4, source:2, target:5, type:"2"},
|
||||
]
|
||||
};
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(tasks);
|
||||
|
||||
function reinit(){
|
||||
gantt.init("gantt_here2");
|
||||
}
|
||||
</script>
|
||||
</body>
|
@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Loading using connector and JSON</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.xml_date = "%Y-%m-%d %H:%i:%s";
|
||||
gantt.init("gantt_here");
|
||||
gantt.load("../common/connector_enddate.php");
|
||||
|
||||
var dp = new dataProcessor("../common/connector_enddate.php");
|
||||
dp.init(gantt);
|
||||
</script>
|
||||
</body>
|
@ -1,83 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Projects and milestones</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
gantt.config.scale_unit = "month";
|
||||
gantt.config.date_scale = "%F, %Y";
|
||||
gantt.config.scale_height = 50;
|
||||
|
||||
gantt.config.types["customType"] = "type_id";
|
||||
gantt.locale.labels['type_' + "customType"] = "New Type";
|
||||
gantt.config.lightbox["customType" + "_sections"] = [
|
||||
{name: "description", height: 70, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "type", type: "typeselect", map_to: "type"}
|
||||
];
|
||||
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"day", step:1, date:"%j, %D" }
|
||||
];
|
||||
|
||||
gantt.templates.rightside_text = function(start, end, task){
|
||||
if(task.type == gantt.config.types.milestone){
|
||||
return task.text;
|
||||
}
|
||||
return "";
|
||||
};
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 70, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "type", type: "typeselect", map_to: "type"},
|
||||
{name: "time", height: 72, type: "duration", map_to: "auto"}
|
||||
];
|
||||
gantt.init("gantt_here");
|
||||
|
||||
var demo_tasks = {
|
||||
"data":[
|
||||
{"id":11, "text":"Project #1", type:gantt.config.types.project, "progress": 0.6, "open": true},
|
||||
|
||||
{"id":12, "text":"Task #1", "start_date":"03-04-2013", "duration":"5", "parent":"11", "progress": 1, "open": true},
|
||||
{"id":13, "text":"Task #2", "start_date":"03-04-2013", type:gantt.config.types.project, "parent":"11", "progress": 0.5, "open": true},
|
||||
{"id":14, "text":"Task #3", "start_date":"02-04-2013", "duration":"6", "parent":"11", "progress": 0.8, "open": true},
|
||||
{"id":15, "text":"Task #4", type:gantt.config.types.project, "parent":"11", "progress": 0.2, "open": true},
|
||||
{"id":16, "text":"Final milestone", "start_date":"15-04-2013", type:gantt.config.types.milestone, "parent":"11", "progress": 0, "open": true},
|
||||
|
||||
{"id":17, "text":"Task #2.1", "start_date":"03-04-2013", "duration":"2", "parent":"13", "progress": 1, "open": true},
|
||||
{"id":18, "text":"Task #2.2", "start_date":"06-04-2013", "duration":"3", "parent":"13", "progress": 0.8, "open": true},
|
||||
{"id":19, "text":"Task #2.3", "start_date":"10-04-2013", "duration":"4", "parent":"13", "progress": 0.2, "open": true},
|
||||
{"id":20, "text":"Task #2.4", "start_date":"10-04-2013", "duration":"4", "parent":"13", "progress": 0, "open": true},
|
||||
{"id":21, "text":"Task #4.1", "start_date":"03-04-2013", "duration":"4", "parent":"15", "progress": 0.5, "open": true},
|
||||
{"id":22, "text":"Task #4.2", "start_date":"03-04-2013", "duration":"4", "parent":"15", "progress": 0.1, "open": true},
|
||||
{"id":23, "text":"Mediate milestone", "start_date":"14-04-2013", type:gantt.config.types.milestone, "parent":"15", "progress": 0, "open": true}
|
||||
],
|
||||
"links":[
|
||||
{"id":"10","source":"11","target":"12","type":"1"},
|
||||
{"id":"11","source":"11","target":"13","type":"1"},
|
||||
{"id":"12","source":"11","target":"14","type":"1"},
|
||||
{"id":"13","source":"11","target":"15","type":"1"},
|
||||
{"id":"14","source":"23","target":"16","type":"0"},
|
||||
{"id":"15","source":"13","target":"17","type":"1"},
|
||||
{"id":"16","source":"17","target":"18","type":"0"},
|
||||
{"id":"17","source":"18","target":"19","type":"0"},
|
||||
{"id":"18","source":"19","target":"20","type":"0"},
|
||||
{"id":"19","source":"15","target":"21","type":"2"},
|
||||
{"id":"20","source":"15","target":"22","type":"2"},
|
||||
{"id":"21","source":"15","target":"23","type":"0"}
|
||||
]
|
||||
};
|
||||
gantt.parse(demo_tasks);
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,193 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Read-only Gantt</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="featured" content="yes"><meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body onload="createChartControl('GanttDiv')">
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/gantt.gif" alt="" >dhtmlxGantt</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Initialization</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Read-only Gantt</h3>
|
||||
</div>
|
||||
<div class="navigation-div">
|
||||
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
|
||||
</div>
|
||||
<link type="text/css" rel="stylesheet" href="../../codebase/dhtmlxgantt.css">
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxcommon.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxgantt.js"></script>
|
||||
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
/*<![CDATA[*/
|
||||
function createChartControl(htmlDiv1)
|
||||
{
|
||||
// Initialize Gantt data structures
|
||||
|
||||
//project 1
|
||||
var project1 = new GanttProjectInfo(1, "Applet redesign", new Date(2010, 5, 11));
|
||||
|
||||
var parentTask1 = new GanttTaskInfo(1, "Old code review", new Date(2010, 5, 11), 208, 50, "");
|
||||
parentTask1.addChildTask(new GanttTaskInfo(2, "Convert to J#", new Date(2010, 5, 11), 100, 40, ""));
|
||||
parentTask1.addChildTask(new GanttTaskInfo(13, "Add new functions", new Date(2010, 5, 12), 80, 90, ""));
|
||||
|
||||
var parentTask2 = new GanttTaskInfo(3, "Hosted Control", new Date(2010, 6, 7), 190, 80, "1");
|
||||
var parentTask5 = new GanttTaskInfo(5, "J# interfaces", new Date(2010, 6, 14), 60, 70, "6");
|
||||
var parentTask123 = new GanttTaskInfo(123, "use GUIDs", new Date(2010, 6, 14), 60, 70, "");
|
||||
parentTask5.addChildTask(parentTask123);
|
||||
parentTask2.addChildTask(parentTask5);
|
||||
parentTask2.addChildTask(new GanttTaskInfo(6, "Task D", new Date(2010, 6, 10), 30, 80, "14"));
|
||||
|
||||
var parentTask4 = new GanttTaskInfo(7, "Unit testing", new Date(2010, 6, 15), 118, 80, "6");
|
||||
var parentTask8 = new GanttTaskInfo(8, "core (com)", new Date(2010, 6, 15), 100, 10, "");
|
||||
parentTask8.addChildTask(new GanttTaskInfo(55555, "validate uids", new Date(2010, 6, 20), 60, 10, ""));
|
||||
parentTask4.addChildTask(parentTask8);
|
||||
parentTask4.addChildTask(new GanttTaskInfo(9, "Stress test", new Date(2010, 6, 15), 80, 50, ""));
|
||||
parentTask4.addChildTask(new GanttTaskInfo(10, "User interfaces", new Date(2010, 6, 16), 80, 10, ""));
|
||||
parentTask2.addChildTask(parentTask4);
|
||||
|
||||
parentTask2.addChildTask(new GanttTaskInfo(11, "Testing, QA", new Date(2010, 6, 21), 60, 100, "6"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(12, "Task B (Jim)", new Date(2010, 6, 8), 110, 1, "14"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(14, "Task A", new Date(2010, 6, 7), 8, 10, ""));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(15, "Task C", new Date(2010, 6, 9), 110, 90, "14"));
|
||||
|
||||
project1.addTask(parentTask1);
|
||||
project1.addTask(parentTask2);
|
||||
|
||||
//project 2
|
||||
var project2 = new GanttProjectInfo(2, "Web Design", new Date(2010, 5, 17));
|
||||
|
||||
var parentTask22 = new GanttTaskInfo(62, "Fill HTML pages", new Date(2010, 5, 17), 157, 50, "");
|
||||
parentTask22.addChildTask(new GanttTaskInfo(63, "Cut images", new Date(2010, 5, 22), 78, 40, ""));
|
||||
parentTask22.addChildTask(new GanttTaskInfo(64, "Manage CSS", null, 90, 90, ""));
|
||||
project2.addTask(parentTask22);
|
||||
|
||||
var parentTask70 = new GanttTaskInfo(70, "PHP coding", new Date(2010, 5, 18), 120, 10, "");
|
||||
parentTask70.addChildTask(new GanttTaskInfo(71, "Purchase D control", new Date(2010, 5, 18), 50, 0, ""));
|
||||
project2.addTask(parentTask70);
|
||||
|
||||
// Create Gantt control
|
||||
var ganttChartControl = new GanttChart();
|
||||
// Setup paths and behavior
|
||||
ganttChartControl.setImagePath("../../codebase/imgs/");
|
||||
ganttChartControl.setEditable(false);
|
||||
ganttChartControl.showTreePanel(false);
|
||||
ganttChartControl.showContextMenu(false);
|
||||
ganttChartControl.showDescTask(true,'n,s-f');
|
||||
ganttChartControl.showDescProject(true,'n,d');
|
||||
|
||||
// Load data structure
|
||||
ganttChartControl.addProject(project1);
|
||||
ganttChartControl.addProject(project2);
|
||||
|
||||
// Build control on the page
|
||||
ganttChartControl.create(htmlDiv1);
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Simple read-only chart:
|
||||
|
||||
<div style="width:950px; height:610px; position:relative" id="GanttDiv"></div>
|
||||
|
||||
Mouse-hover some task to see the description.
|
||||
|
||||
|
||||
</div>
|
||||
<div class="source">
|
||||
<div class="teg">Source</div>
|
||||
<div class="code" id="code">
|
||||
<div class="hl-main"><pre><span class="hl-code"><</span><span class="hl-identifier">link</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/css</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">rel</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">stylesheet</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">href</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.css</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment"><![CDATA[</span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">createChartControl</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Initialize Gantt data structures</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 1</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Applet redesign</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Old code review</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">208</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Convert to J#</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">13</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Add new functions</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">12</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Hosted Control</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">190</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask5</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">J# interfaces</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask123</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">123</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">use GUIDs</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask5</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask123</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask5</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task D</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask4</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">7</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Unit testing</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">118</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask8</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">core (com)</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask8</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">55555</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">validate uids</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">20</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask8</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">9</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Stress test</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">User interfaces</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">16</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask4</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">11</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Testing, QA</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">21</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">12</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task B (Jim)</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">14</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task A</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">15</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task C</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">9</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 2</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Web Design</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask22</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">62</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Fill HTML pages</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">157</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">63</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Cut images</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">22</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">78</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">64</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Manage CSS</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask22</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask70</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">PHP coding</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">120</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask70</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">71</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Purchase D control</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask70</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Create Gantt control</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">ganttChartControl</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttChart</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Setup paths and behavior</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setImagePath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/imgs/</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setEditable</span><span class="hl-brackets">(</span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showTreePanel</span><span class="hl-brackets">(</span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showContextMenu</span><span class="hl-brackets">(</span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescTask</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">n,s-f</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescProject</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">n,d</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Load data structure </span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Build control on the page</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">create</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment">]]></span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
|
||||
</span><span class="hl-identifier">Simple</span><span class="hl-code"> </span><span class="hl-identifier">read</span><span class="hl-code">-</span><span class="hl-identifier">only</span><span class="hl-code"> </span><span class="hl-identifier">chart</span><span class="hl-code">:
|
||||
<</span><span class="hl-identifier">div</span><span class="hl-code"> </span><span class="hl-identifier">style</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">width:950px; height:610px; position:relative</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">GanttDiv</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">div</span><span class="hl-code">>
|
||||
</span><span class="hl-identifier">Mouse</span><span class="hl-code">-</span><span class="hl-identifier">hover</span><span class="hl-code"> </span><span class="hl-identifier">some</span><span class="hl-code"> </span><span class="hl-identifier">task</span><span class="hl-code"> </span><span class="hl-identifier">to</span><span class="hl-code"> </span><span class="hl-identifier">see</span><span class="hl-code"> </span><span class="hl-identifier">the</span><span class="hl-code"> </span><span class="hl-identifier">description</span><span class="hl-code">.</span></pre></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,189 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Gantt with tree</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="featured" content="yes"><meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body onload="createChartControl('GanttDiv')">
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/gantt.gif" alt="" >dhtmlxGantt</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Initialization</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Gantt with tree</h3>
|
||||
</div>
|
||||
<div class="navigation-div">
|
||||
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
|
||||
</div>
|
||||
<link type="text/css" rel="stylesheet" href="../../codebase/dhtmlxgantt.css">
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxcommon.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxgantt.js"></script>
|
||||
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
/*<![CDATA[*/
|
||||
function createChartControl(htmlDiv1)
|
||||
{
|
||||
// Initialize Gantt data structures
|
||||
|
||||
//project 1
|
||||
var project1 = new GanttProjectInfo(1, "Applet redesign", new Date(2010, 5, 11));
|
||||
|
||||
var parentTask1 = new GanttTaskInfo(1, "Old code review", new Date(2010, 5, 11), 208, 50, "");
|
||||
parentTask1.addChildTask(new GanttTaskInfo(2, "Convert to J#", new Date(2010, 5, 11), 100, 40, ""));
|
||||
parentTask1.addChildTask(new GanttTaskInfo(13, "Add new functions", new Date(2010, 5, 12), 80, 90, ""));
|
||||
|
||||
var parentTask2 = new GanttTaskInfo(3, "Hosted Control", new Date(2010, 6, 7), 190, 80, "1");
|
||||
var parentTask5 = new GanttTaskInfo(5, "J# interfaces", new Date(2010, 6, 14), 60, 70, "6");
|
||||
var parentTask123 = new GanttTaskInfo(123, "use GUIDs", new Date(2010, 6, 14), 60, 70, "");
|
||||
parentTask5.addChildTask(parentTask123);
|
||||
parentTask2.addChildTask(parentTask5);
|
||||
parentTask2.addChildTask(new GanttTaskInfo(6, "Task D", new Date(2010, 6, 10), 30, 80, "14"));
|
||||
|
||||
var parentTask4 = new GanttTaskInfo(7, "Unit testing", new Date(2010, 6, 15), 118, 80, "6");
|
||||
var parentTask8 = new GanttTaskInfo(8, "core (com)", new Date(2010, 6, 15), 100, 10, "");
|
||||
parentTask8.addChildTask(new GanttTaskInfo(55555, "validate uids", new Date(2010, 6, 20), 60, 10, ""));
|
||||
parentTask4.addChildTask(parentTask8);
|
||||
parentTask4.addChildTask(new GanttTaskInfo(9, "Stress test", new Date(2010, 6, 15), 80, 50, ""));
|
||||
parentTask4.addChildTask(new GanttTaskInfo(10, "User interfaces", new Date(2010, 6, 16), 80, 10, ""));
|
||||
parentTask2.addChildTask(parentTask4);
|
||||
|
||||
parentTask2.addChildTask(new GanttTaskInfo(11, "Testing, QA", new Date(2010, 6, 21), 60, 100, "6"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(12, "Task B (Jim)", new Date(2010, 6, 8), 110, 1, "14"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(14, "Task A", new Date(2010, 6, 7), 8, 10, ""));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(15, "Task C", new Date(2010, 6, 9), 110, 90, "14"));
|
||||
|
||||
project1.addTask(parentTask1);
|
||||
project1.addTask(parentTask2);
|
||||
|
||||
//project 2
|
||||
var project2 = new GanttProjectInfo(2, "Web Design", new Date(2010, 5, 17));
|
||||
|
||||
var parentTask22 = new GanttTaskInfo(62, "Fill HTML pages", new Date(2010, 5, 17), 157, 50, "");
|
||||
parentTask22.addChildTask(new GanttTaskInfo(63, "Cut images", new Date(2010, 5, 22), 78, 40, ""));
|
||||
parentTask22.addChildTask(new GanttTaskInfo(64, "Manage CSS", null, 90, 90, ""));
|
||||
project2.addTask(parentTask22);
|
||||
|
||||
var parentTask70 = new GanttTaskInfo(70, "PHP coding", new Date(2010, 5, 18), 120, 10, "");
|
||||
parentTask70.addChildTask(new GanttTaskInfo(71, "Purchase D control", new Date(2010, 5, 18), 50, 0, ""));
|
||||
project2.addTask(parentTask70);
|
||||
|
||||
// Create Gantt control
|
||||
var ganttChartControl = new GanttChart();
|
||||
// Setup paths and behavior
|
||||
ganttChartControl.setImagePath("../../codebase/imgs/");
|
||||
ganttChartControl.setEditable(true);
|
||||
ganttChartControl.showTreePanel(true);
|
||||
ganttChartControl.showContextMenu(true);
|
||||
ganttChartControl.showDescTask(true,'d,s-f');
|
||||
ganttChartControl.showDescProject(true,'n,d');
|
||||
|
||||
// Load data structure
|
||||
ganttChartControl.addProject(project1);
|
||||
ganttChartControl.addProject(project2);
|
||||
|
||||
// Build control on the page
|
||||
ganttChartControl.create(htmlDiv1);
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="width:950px; height:620px; position:relative;" id="GanttDiv"></div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="source">
|
||||
<div class="teg">Source</div>
|
||||
<div class="code" id="code">
|
||||
<div class="hl-main"><pre><span class="hl-code"><</span><span class="hl-identifier">link</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/css</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">rel</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">stylesheet</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">href</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.css</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment"><![CDATA[</span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">createChartControl</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Initialize Gantt data structures</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 1</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Applet redesign</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Old code review</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">208</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Convert to J#</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">13</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Add new functions</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">12</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Hosted Control</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">190</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask5</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">J# interfaces</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask123</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">123</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">use GUIDs</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask5</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask123</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask5</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task D</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask4</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">7</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Unit testing</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">118</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask8</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">core (com)</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask8</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">55555</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">validate uids</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">20</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask8</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">9</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Stress test</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">User interfaces</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">16</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask4</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">11</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Testing, QA</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">21</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">12</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task B (Jim)</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">14</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task A</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">15</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task C</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">9</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 2</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Web Design</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask22</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">62</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Fill HTML pages</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">157</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">63</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Cut images</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">22</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">78</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">64</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Manage CSS</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask22</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask70</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">PHP coding</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">120</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask70</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">71</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Purchase D control</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask70</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Create Gantt control</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">ganttChartControl</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttChart</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Setup paths and behavior</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setImagePath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/imgs/</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setEditable</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showTreePanel</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showContextMenu</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescTask</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">d,s-f</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescProject</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">n,d</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Load data structure </span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Build control on the page</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">create</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment">]]></span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
|
||||
|
||||
<</span><span class="hl-identifier">div</span><span class="hl-code"> </span><span class="hl-identifier">style</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">width:950px; height:620px; position:relative;</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">GanttDiv</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">div</span><span class="hl-code">></span></pre></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,187 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Chart with hidden descriptions</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body onload="createChartControl('GanttDiv')">
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/gantt.gif" alt="" >dhtmlxGantt</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Initialization</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Chart with hidden descriptions</h3>
|
||||
</div>
|
||||
<div class="navigation-div">
|
||||
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
|
||||
</div>
|
||||
<link type="text/css" rel="stylesheet" href="../../codebase/dhtmlxgantt.css">
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxcommon.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxgantt.js"></script>
|
||||
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
/*<![CDATA[*/
|
||||
function createChartControl(htmlDiv1)
|
||||
{
|
||||
// Initialize Gantt data structures
|
||||
|
||||
//project 1
|
||||
var project1 = new GanttProjectInfo(1, "Applet redesign", new Date(2010, 5, 11));
|
||||
|
||||
var parentTask1 = new GanttTaskInfo(1, "Old code review", new Date(2010, 5, 11), 208, 50, "");
|
||||
parentTask1.addChildTask(new GanttTaskInfo(2, "Convert to J#", new Date(2010, 5, 11), 100, 40, ""));
|
||||
parentTask1.addChildTask(new GanttTaskInfo(13, "Add new functions", new Date(2010, 5, 12), 80, 90, ""));
|
||||
|
||||
var parentTask2 = new GanttTaskInfo(3, "Hosted Control", new Date(2010, 6, 7), 190, 80, "1");
|
||||
var parentTask5 = new GanttTaskInfo(5, "J# interfaces", new Date(2010, 6, 14), 60, 70, "6");
|
||||
var parentTask123 = new GanttTaskInfo(123, "use GUIDs", new Date(2010, 6, 14), 60, 70, "");
|
||||
parentTask5.addChildTask(parentTask123);
|
||||
parentTask2.addChildTask(parentTask5);
|
||||
parentTask2.addChildTask(new GanttTaskInfo(6, "Task D", new Date(2010, 6, 10), 30, 80, "14"));
|
||||
|
||||
var parentTask4 = new GanttTaskInfo(7, "Unit testing", new Date(2010, 6, 15), 118, 80, "6");
|
||||
var parentTask8 = new GanttTaskInfo(8, "core (com)", new Date(2010, 6, 15), 100, 10, "");
|
||||
parentTask8.addChildTask(new GanttTaskInfo(55555, "validate uids", new Date(2010, 6, 20), 60, 10, ""));
|
||||
parentTask4.addChildTask(parentTask8);
|
||||
parentTask4.addChildTask(new GanttTaskInfo(9, "Stress test", new Date(2010, 6, 15), 80, 50, ""));
|
||||
parentTask4.addChildTask(new GanttTaskInfo(10, "User interfaces", new Date(2010, 6, 16), 80, 10, ""));
|
||||
parentTask2.addChildTask(parentTask4);
|
||||
|
||||
parentTask2.addChildTask(new GanttTaskInfo(11, "Testing, QA", new Date(2010, 6, 21), 60, 100, "6"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(12, "Task B (Jim)", new Date(2010, 6, 8), 110, 1, "14"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(14, "Task A", new Date(2010, 6, 7), 8, 10, ""));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(15, "Task C", new Date(2010, 6, 9), 110, 90, "14"));
|
||||
|
||||
project1.addTask(parentTask1);
|
||||
project1.addTask(parentTask2);
|
||||
|
||||
//project 2
|
||||
var project2 = new GanttProjectInfo(2, "Web Design", new Date(2010, 5, 17));
|
||||
|
||||
var parentTask22 = new GanttTaskInfo(62, "Fill HTML pages", new Date(2010, 5, 17), 157, 50, "");
|
||||
parentTask22.addChildTask(new GanttTaskInfo(63, "Cut images", new Date(2010, 5, 22), 78, 40, ""));
|
||||
parentTask22.addChildTask(new GanttTaskInfo(64, "Manage CSS", null, 90, 90, ""));
|
||||
project2.addTask(parentTask22);
|
||||
|
||||
var parentTask70 = new GanttTaskInfo(70, "PHP coding", new Date(2010, 5, 18), 120, 10, "");
|
||||
parentTask70.addChildTask(new GanttTaskInfo(71, "Purchase D control", new Date(2010, 5, 18), 50, 0, ""));
|
||||
project2.addTask(parentTask70);
|
||||
|
||||
// Create Gantt control
|
||||
var ganttChartControl = new GanttChart();
|
||||
// Setup paths and behavior
|
||||
ganttChartControl.setImagePath("../../codebase/imgs/");
|
||||
ganttChartControl.setEditable(true);
|
||||
ganttChartControl.showContextMenu(true);
|
||||
ganttChartControl.showDescTask(false,'n,e');
|
||||
ganttChartControl.showDescProject(false,'n,d');
|
||||
|
||||
// Load data structure
|
||||
ganttChartControl.addProject(project1);
|
||||
ganttChartControl.addProject(project2);
|
||||
|
||||
// Build control on the page
|
||||
ganttChartControl.create(htmlDiv1);
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="width:950px; height:620px; position:relative" id="GanttDiv"></div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="source">
|
||||
<div class="teg">Source</div>
|
||||
<div class="code" id="code">
|
||||
<div class="hl-main"><pre><span class="hl-code"><</span><span class="hl-identifier">link</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/css</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">rel</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">stylesheet</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">href</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.css</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment"><![CDATA[</span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">createChartControl</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Initialize Gantt data structures</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 1</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Applet redesign</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Old code review</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">208</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Convert to J#</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">13</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Add new functions</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">12</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Hosted Control</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">190</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask5</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">J# interfaces</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask123</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">123</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">use GUIDs</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask5</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask123</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask5</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task D</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask4</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">7</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Unit testing</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">118</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask8</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">core (com)</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask8</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">55555</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">validate uids</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">20</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask8</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">9</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Stress test</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">User interfaces</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">16</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask4</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">11</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Testing, QA</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">21</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">12</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task B (Jim)</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">14</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task A</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">15</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task C</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">9</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 2</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Web Design</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask22</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">62</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Fill HTML pages</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">157</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">63</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Cut images</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">22</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">78</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">64</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Manage CSS</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask22</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask70</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">PHP coding</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">120</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask70</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">71</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Purchase D control</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask70</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Create Gantt control</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">ganttChartControl</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttChart</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Setup paths and behavior</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setImagePath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/imgs/</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setEditable</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showContextMenu</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescTask</span><span class="hl-brackets">(</span><span class="hl-reserved">false</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">n,e</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescProject</span><span class="hl-brackets">(</span><span class="hl-reserved">false</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">n,d</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Load data structure </span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Build control on the page</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">create</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment">]]></span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
|
||||
|
||||
<</span><span class="hl-identifier">div</span><span class="hl-code"> </span><span class="hl-identifier">style</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">width:950px; height:620px; position:relative</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">GanttDiv</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">div</span><span class="hl-code">></span></pre></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,152 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../common/docs.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<title>Gantt : Samples</title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class='abstop_header'>
|
||||
<div class='content_area'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="page_header">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='top_webix_logo'></div></a>
|
||||
Samples
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_space">
|
||||
<div class="webixdoc_page webixdoc_start">
|
||||
<div id="webixContent" class='webixdoc_content'>
|
||||
<div class="webixdoc_content_inner">
|
||||
<div class="webixdoc_breadcrumb nav_breadcrumb">
|
||||
<a href="http://docs.dhtmlx.com/gantt/" class="webixdoc_back">Documentation</a>
|
||||
<a href="../index.html" class="webixdoc_back">Samples</a>
|
||||
<a href='../index.html' class='webixdoc_back'>01 Initialization</a>
|
||||
</div>
|
||||
<table class='nav_table'>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='01_basic_init.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='01_basic_init.html'>Basic initialization</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='02_load_json.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='02_load_json.html'>Load data from JSON file</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='03_load_xml.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='03_load_xml.html'>Load data from XML file</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='04_connector_json.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='04_connector_json.html'>Loading using connector and JSON</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='05_connector_xml.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='05_connector_xml.html'>Loading using connector and XML</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='06_touch_forced.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='06_touch_forced.html'>Forced touch mode</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='07_jquery.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='07_jquery.html'>jQuery integration</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='08_explicit_time_range.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='08_explicit_time_range.html'>Define date range</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='09_backward_compatibility.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='09_backward_compatibility.html'>Loading data in Gantt 1.6 format</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='10_fixed_size.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='10_fixed_size.html'>Fixed size gantt</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='11_clickable_links.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='11_clickable_links.html'>Clickable links</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='12_localization.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='12_localization.html'>Localization</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='13_project_duration.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='13_project_duration.html'>Project duration</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='14_reinitializtion.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='14_reinitializtion.html'>ReInit in different container</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='15_connector_json_enddate.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='15_connector_json_enddate.html'>Loading using connector and JSON</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='16_projects_and_milestones.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='16_projects_and_milestones.html'>Projects and milestones</a> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Side quick links -->
|
||||
<div class="side_links">
|
||||
<a class="reference_link" href="http://docs.dhtmlx.com/gantt/api__refs__gantt.html">
|
||||
<span>API Reference</span>
|
||||
</a>
|
||||
<a class="sample_link" href="../index.html">
|
||||
<span>Code Samples</span>
|
||||
</a>
|
||||
<a class="forum_link" href="http://forum.dhtmlx.com/viewforum.php?f=15">
|
||||
<span>Developer Forum </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_linea"> </div>
|
||||
<div class="footer_lineb">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='bottom_webix_block bottom_webix_logo' ></div></a>
|
||||
<div class='copyright bottom_webix_block'>© 2014 Dinamenta, UAB<br>
|
||||
All rights reserved</div>
|
||||
<div class='bottom_webix_also'>
|
||||
<h4>Check also:</h4>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml' target='_blank'>DHTMLX Scheduler</a></li>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxSuite/index.shtml' target='_blank'>Other DHTMLX components</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,95 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Load from XML</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="featured" content="yes"><meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body onload="createChartControl('GanttDiv')">
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/gantt.gif" alt="" >dhtmlxGantt</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Data loading/saving</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Load from XML</h3>
|
||||
</div>
|
||||
<div class="navigation-div">
|
||||
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
|
||||
</div>
|
||||
<link type="text/css" rel="stylesheet" href="../../codebase/dhtmlxgantt.css">
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxcommon.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxgantt.js"></script>
|
||||
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
/*<![CDATA[*/
|
||||
function createChartControl(htmlDiv1)
|
||||
{
|
||||
// Create Gantt control
|
||||
var ganttChartControl = new GanttChart();
|
||||
// Setup paths and behavior
|
||||
ganttChartControl.setImagePath("../../codebase/imgs/");
|
||||
// Build control on the page
|
||||
ganttChartControl.create(htmlDiv1);
|
||||
// Load data structure
|
||||
ganttChartControl.loadData("data/data.xml",true,true);
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div style="width:950px; height:620px; position:relative" id="GanttDiv"></div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="source">
|
||||
<div class="teg">Source</div>
|
||||
<div class="code" id="code">
|
||||
<div class="hl-main"><pre><span class="hl-code"><</span><span class="hl-identifier">link</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/css</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">rel</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">stylesheet</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">href</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.css</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment"><![CDATA[</span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">createChartControl</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Create Gantt control</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">ganttChartControl</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttChart</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Setup paths and behavior</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setImagePath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/imgs/</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Build control on the page</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">create</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Load data structure </span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">loadData</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">data/data.xml</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment">]]></span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
|
||||
<</span><span class="hl-identifier">div</span><span class="hl-code"> </span><span class="hl-identifier">style</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">width:950px; height:620px; position:relative</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">GanttDiv</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">div</span><span class="hl-code">></span></pre></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,296 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Save and load XML data</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="featured" content="yes"><meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body onload="createChartControl('GanttDiv')">
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/gantt.gif" alt="" >dhtmlxGantt</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Data loading/saving</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Save and load XML data</h3>
|
||||
</div>
|
||||
<div class="navigation-div">
|
||||
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
|
||||
</div>
|
||||
<link type="text/css" rel="stylesheet" href="../../codebase/dhtmlxgantt.css">
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxcommon.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxgantt.js"></script>
|
||||
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
/*<![CDATA[*/
|
||||
function createChartControl(htmlDiv)
|
||||
{
|
||||
// Initialize Gantt data structures
|
||||
|
||||
//project 1
|
||||
var project1 = new GanttProjectInfo(1, "Project 1 test test test test", new Date(2010, 5, 11));
|
||||
|
||||
var parentTask1 = new GanttTaskInfo(1, "Project1 task 1", new Date(2010, 5, 11), 208, 50, "");
|
||||
parentTask1.addChildTask(new GanttTaskInfo(2, "Project1 task 2", new Date(2010, 5, 11), 100, 40, ""));
|
||||
parentTask1.addChildTask(new GanttTaskInfo(13, "Project1 task 13", new Date(2010, 5, 12), 80, 90, ""));
|
||||
|
||||
var parentTask3 = new GanttTaskInfo(4, "Project1 task 4", new Date(2010, 5, 22), 105, 46, "13");
|
||||
parentTask3.addChildTask(new GanttTaskInfo(21, "Project1 task 21", new Date(2010, 5, 23), 70, 30, ""));
|
||||
parentTask3.addChildTask(new GanttTaskInfo(22, "Project1 task 22", new Date(2010, 5, 22), 80, 30, ""));
|
||||
parentTask3.addChildTask(new GanttTaskInfo(23, "Project1 task 23", new Date(2010, 5, 25), 70, 30, ""));
|
||||
parentTask3.addChildTask(new GanttTaskInfo(24, "Project1 task 24", new Date(2010, 5, 26), 70, 55, ""));
|
||||
parentTask1.addChildTask(parentTask3);
|
||||
|
||||
var parentTask2 = new GanttTaskInfo(3, "Project1 task 3", new Date(2010, 6, 7), 190, 80, "1");
|
||||
var parentTask5 = new GanttTaskInfo(5, "Project1 task 5", new Date(2010, 6, 14), 60, 70, "6");
|
||||
var parentTask123 = new GanttTaskInfo(123, "Project1 task 12", new Date(2010, 6, 14), 60, 70, "");
|
||||
parentTask5.addChildTask(parentTask123);
|
||||
parentTask2.addChildTask(parentTask5);
|
||||
parentTask2.addChildTask(new GanttTaskInfo(6, "Project1 task 6", new Date(2010, 6, 10), 30, 80, "14"));
|
||||
|
||||
var parentTask4 = new GanttTaskInfo(7, "Project1 task 7", new Date(2010, 6, 15), 118, 80, "6");
|
||||
var parentTask8 = new GanttTaskInfo(8, "Project1 task 8", new Date(2010, 6, 15), 100, 10, "");
|
||||
parentTask8.addChildTask(new GanttTaskInfo(55555, "Project1 task 55555", new Date(2010, 6, 20), 60, 10, ""));
|
||||
parentTask4.addChildTask(parentTask8);
|
||||
parentTask4.addChildTask(new GanttTaskInfo(9, "Project1 task 9", new Date(2010, 6, 15), 80, 50, ""));
|
||||
parentTask4.addChildTask(new GanttTaskInfo(10, "Project1 task 10", new Date(2010, 6, 16), 80, 10, ""));
|
||||
parentTask2.addChildTask(parentTask4);
|
||||
|
||||
parentTask2.addChildTask(new GanttTaskInfo(11, "Project1 task 11", new Date(2010, 6, 21), 60, 100, "6"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(12, "Project1 task 12", new Date(2010, 6, 8), 110, 1, "14"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(14, "Project1 task 14", new Date(2010, 6, 7), 8, 10, ""));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(15, "Project1 task 15", new Date(2010, 6, 9), 110, 90, "14"));
|
||||
|
||||
var parentTask6 = new GanttTaskInfo(35, "Project1 task 35", new Date(2010, 7, 1), 130, 80, "1");
|
||||
parentTask6.addChildTask(new GanttTaskInfo(36, "Project1 task 36", new Date(2010, 7, 9), 64, 5, ""));
|
||||
parentTask6.addChildTask(new GanttTaskInfo(37, "Project1 task 37", null, 110, 90, ""));
|
||||
|
||||
project1.addTask(parentTask1);
|
||||
project1.addTask(parentTask2);
|
||||
project1.addTask(parentTask6);
|
||||
|
||||
//project 2
|
||||
var project2 = new GanttProjectInfo(2, "Project 2", new Date(2010, 5, 17));
|
||||
|
||||
var parentTask22 = new GanttTaskInfo(62, "Project2 task 62", new Date(2010, 5, 17), 157, 50, "");
|
||||
parentTask22.addChildTask(new GanttTaskInfo(63, "Project2 task 63", new Date(2010, 5, 22), 78, 40, ""));
|
||||
parentTask22.addChildTask(new GanttTaskInfo(64, "Project2 task 64", null, 90, 90, ""));
|
||||
project2.addTask(parentTask22);
|
||||
|
||||
var parentTask70 = new GanttTaskInfo(70, "Project2 task 70", new Date(2010, 5, 18), 120, 10, "");
|
||||
parentTask70.addChildTask(new GanttTaskInfo(71, "Project2 task 71", new Date(2010, 5, 18), 50, 0, ""));
|
||||
project2.addTask(parentTask70);
|
||||
|
||||
//project 3
|
||||
var project3 = new GanttProjectInfo(3, "Project 3", new Date(2010, 5, 14));
|
||||
|
||||
var parentTask80 = new GanttTaskInfo(80, "Project3 task 80", new Date(2010, 5, 14), 120, 10, "");
|
||||
project3.addTask(parentTask80);
|
||||
|
||||
// Create Gantt control
|
||||
var ganttChartControl = new GanttChart();
|
||||
// Setup paths and behavior
|
||||
ganttChartControl.setImagePath("../../codebase/imgs/");
|
||||
ganttChartControl.showTreePanel(true);
|
||||
ganttChartControl.showContextMenu(true);
|
||||
ganttChartControl.showDescTask(true,'p,n,e,d');// p - percentCompleted,n - name,e - est, d - duration
|
||||
ganttChartControl.showDescProject(true,'n,s,d,p');// p - percentCompleted,n - name,s - start date, d - duration
|
||||
ganttChartControl.setEditable(true);
|
||||
ganttChartControl.showNewProject(true);
|
||||
|
||||
ganttChartControl.setLoadPath("php/loadXML.php");
|
||||
ganttChartControl.setSavePath("php/saveXML.php");
|
||||
|
||||
// Load data structure
|
||||
ganttChartControl.addProject(project1);
|
||||
ganttChartControl.addProject(project2);
|
||||
ganttChartControl.addProject(project3);
|
||||
|
||||
// Build control on the page
|
||||
ganttChartControl.create(htmlDiv);
|
||||
|
||||
// Define event handler for button "Save data"
|
||||
var b1 = document.getElementById("b1");
|
||||
b1.onclick = function()
|
||||
{
|
||||
var name = document.getElementById("t1").value;
|
||||
ganttChartControl.saveData(name);
|
||||
}
|
||||
|
||||
// Define event handler for button "Load data"
|
||||
var b2 = document.getElementById("b2");
|
||||
b2.onclick = function()
|
||||
{
|
||||
var name = document.getElementById("t2").value;
|
||||
ganttChartControl.loadData(name,true,true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div style="width:950px; height:620px; position:relative" id="GanttDiv"></div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><input type="button" id="b1" value="Save data" /></td>
|
||||
<td><input type="text" id="t1" value="chart_name.xml" />
|
||||
To use save option, you should run this sample under Apache with PHP.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" id="b2" value="Load data"/></td>
|
||||
<td><select id="t2">
|
||||
<option value="data/data.xml">data/data.xml</option>
|
||||
<option value="data/data2.xml">data/data2.xml</option>
|
||||
<option value="data/data3.xml">data/data3.xml</option>
|
||||
<option value="data/sample1.xml">data/sample1.xml</option>
|
||||
<option value="data/sample2.xml">data/sample2.xml</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="source">
|
||||
<div class="teg">Source</div>
|
||||
<div class="code" id="code">
|
||||
<div class="hl-main"><pre><span class="hl-code"><</span><span class="hl-identifier">link</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/css</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">rel</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">stylesheet</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">href</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.css</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment"><![CDATA[</span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">createChartControl</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv</span><span class="hl-brackets">)</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Initialize Gantt data structures</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 1</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project 1 test test test test</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 1</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">208</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 2</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">13</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 13</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">12</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask3</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">4</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 4</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">22</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">105</span><span class="hl-code">, </span><span class="hl-number">46</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">13</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask3</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">21</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 21</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">23</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask3</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">22</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 22</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">22</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask3</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">23</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 23</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">25</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask3</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">24</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 24</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">26</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-number">55</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask3</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 3</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">190</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask5</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 5</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask123</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">123</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 12</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask5</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask123</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask5</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 6</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask4</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">7</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 7</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">118</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask8</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 8</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask8</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">55555</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 55555</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">20</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask8</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">9</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 9</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 10</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">16</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask4</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">11</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 11</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">21</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">12</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 12</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">14</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 14</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">15</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 15</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">9</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask6</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">35</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 35</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">130</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask6</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">36</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 36</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-code">, </span><span class="hl-number">9</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">64</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask6</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">37</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project1 task 37</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask6</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 2</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project 2</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask22</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">62</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project2 task 62</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">157</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">63</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project2 task 63</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">22</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">78</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">64</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project2 task 64</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask22</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask70</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project2 task 70</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">120</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask70</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">71</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project2 task 71</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask70</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 3</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project3</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project 3</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask80</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project3 task 80</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">120</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project3</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask80</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Create Gantt control</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">ganttChartControl</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttChart</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Setup paths and behavior</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setImagePath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/imgs/</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showTreePanel</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showContextMenu</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescTask</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">p,n,e,d</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;</span><span class="hl-comment">//</span><span class="hl-comment"> p - percentCompleted,n - name,e - est, d - duration</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescProject</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">n,s,d,p</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;</span><span class="hl-comment">//</span><span class="hl-comment"> p - percentCompleted,n - name,s - start date, d - duration</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setEditable</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showNewProject</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setLoadPath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">php/loadXML.php</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setSavePath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">php/saveXML.php</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Load data structure </span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project3</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Build control on the page</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">create</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Define event handler for button "Save data"</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">b1</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">b1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">b1</span><span class="hl-code">.</span><span class="hl-identifier">onclick</span><span class="hl-code"> = </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">name</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">t1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">saveData</span><span class="hl-brackets">(</span><span class="hl-identifier">name</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Define event handler for button "Load data"</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">b2</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">b2</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">b2</span><span class="hl-code">.</span><span class="hl-identifier">onclick</span><span class="hl-code"> = </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">name</span><span class="hl-code"> = </span><span class="hl-builtin">document</span><span class="hl-code">.</span><span class="hl-identifier">getElementById</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">t2</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">value</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">loadData</span><span class="hl-brackets">(</span><span class="hl-identifier">name</span><span class="hl-code">,</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment">]]></span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
|
||||
<</span><span class="hl-identifier">div</span><span class="hl-code"> </span><span class="hl-identifier">style</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">width:950px; height:620px; position:relative</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">GanttDiv</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">div</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">table</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">tr</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">td</span><span class="hl-code">><</span><span class="hl-identifier">input</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">button</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">b1</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">Save data</span><span class="hl-quotes">"</span><span class="hl-code"> /></</span><span class="hl-identifier">td</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">td</span><span class="hl-code">><</span><span class="hl-identifier">input</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">t1</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">chart_name.xml</span><span class="hl-quotes">"</span><span class="hl-code"> />
|
||||
</span><span class="hl-identifier">To</span><span class="hl-code"> </span><span class="hl-identifier">use</span><span class="hl-code"> </span><span class="hl-identifier">save</span><span class="hl-code"> </span><span class="hl-identifier">option</span><span class="hl-code">, </span><span class="hl-identifier">you</span><span class="hl-code"> </span><span class="hl-identifier">should</span><span class="hl-code"> </span><span class="hl-identifier">run</span><span class="hl-code"> </span><span class="hl-reserved">this</span><span class="hl-code"> </span><span class="hl-identifier">sample</span><span class="hl-code"> </span><span class="hl-identifier">under</span><span class="hl-code"> </span><span class="hl-identifier">Apache</span><span class="hl-code"> </span><span class="hl-reserved">with</span><span class="hl-code"> </span><span class="hl-identifier">PHP</span><span class="hl-code">.</</span><span class="hl-identifier">td</span><span class="hl-code">>
|
||||
</</span><span class="hl-identifier">tr</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">tr</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">td</span><span class="hl-code">><</span><span class="hl-identifier">input</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">button</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">b2</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">Load data</span><span class="hl-quotes">"</span><span class="hl-code">/></</span><span class="hl-identifier">td</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">td</span><span class="hl-code">><</span><span class="hl-identifier">select</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">t2</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">option</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">data/data.xml</span><span class="hl-quotes">"</span><span class="hl-code">></span><span class="hl-identifier">data</span><span class="hl-code">/</span><span class="hl-identifier">data</span><span class="hl-code">.</span><span class="hl-identifier">xml</span><span class="hl-code"></</span><span class="hl-identifier">option</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">option</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">data/data2.xml</span><span class="hl-quotes">"</span><span class="hl-code">></span><span class="hl-identifier">data</span><span class="hl-code">/</span><span class="hl-identifier">data2</span><span class="hl-code">.</span><span class="hl-identifier">xml</span><span class="hl-code"></</span><span class="hl-identifier">option</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">option</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">data/data3.xml</span><span class="hl-quotes">"</span><span class="hl-code">></span><span class="hl-identifier">data</span><span class="hl-code">/</span><span class="hl-identifier">data3</span><span class="hl-code">.</span><span class="hl-identifier">xml</span><span class="hl-code"></</span><span class="hl-identifier">option</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">option</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">data/sample1.xml</span><span class="hl-quotes">"</span><span class="hl-code">></span><span class="hl-identifier">data</span><span class="hl-code">/</span><span class="hl-identifier">sample1</span><span class="hl-code">.</span><span class="hl-identifier">xml</span><span class="hl-code"></</span><span class="hl-identifier">option</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">option</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">data/sample2.xml</span><span class="hl-quotes">"</span><span class="hl-code">></span><span class="hl-identifier">data</span><span class="hl-code">/</span><span class="hl-identifier">sample2</span><span class="hl-code">.</span><span class="hl-identifier">xml</span><span class="hl-code"></</span><span class="hl-identifier">option</span><span class="hl-code">>
|
||||
</</span><span class="hl-identifier">select</span><span class="hl-code">></</span><span class="hl-identifier">td</span><span class="hl-code">>
|
||||
</</span><span class="hl-identifier">tr</span><span class="hl-code">>
|
||||
</</span><span class="hl-identifier">table</span><span class="hl-code">></span></pre></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,25 +0,0 @@
|
||||
#!C:/Perl/bin/perl.exe -w
|
||||
use CGI;
|
||||
use IO::File;
|
||||
use Fcntl qw(:DEFAULT :flock);
|
||||
use File::Temp qw/ tempfile tempdir /;
|
||||
|
||||
#DATA
|
||||
@qstring = split(/&/,$ENV{'QUERY_STRING'});
|
||||
@filename = split(/=/,$qstring[0]);
|
||||
|
||||
$docroot = "$ENV{'DOCUMENT_ROOT'}";
|
||||
$dataDir = "$docroot/data/";
|
||||
$tmp = "";
|
||||
|
||||
open(FH,$dataDir.@filename[1]);
|
||||
while($line = <FH>)
|
||||
{
|
||||
$tmp = $tmp.$line;
|
||||
}
|
||||
close(FH);
|
||||
|
||||
print "Content-type: text/xml\n\n";
|
||||
print $tmp;
|
||||
|
||||
exit;
|
@ -1,69 +0,0 @@
|
||||
#!C:/Perl/bin/perl.exe -w
|
||||
use CGI;
|
||||
use IO::File;
|
||||
use Fcntl qw(:DEFAULT :flock);
|
||||
use File::Temp qw/ tempfile tempdir /;
|
||||
|
||||
#sub URLDecode {
|
||||
# my $s = shift;
|
||||
# $s =~tr /+/ /;
|
||||
# $s =~s /%([0-9A-Fa-f]{2})/chr(hex($1))/esg;
|
||||
# return $s
|
||||
#}
|
||||
#DATA
|
||||
#@qstring = split(/&/,$ENV{'QUERY_STRING'});
|
||||
#@p1 = split(/=/,$qstring[0]);
|
||||
#@p2 = split(/=/,$qstring[1]);
|
||||
|
||||
$docroot = "$ENV{'DOCUMENT_ROOT'}";
|
||||
$dataDir = "$docroot/data";
|
||||
|
||||
if(!(-e $dataDir))
|
||||
{
|
||||
createDataDir();
|
||||
}
|
||||
|
||||
sub createDataDir
|
||||
{
|
||||
mkdir $dataDir,0777;
|
||||
}
|
||||
|
||||
sub GetFormInput {
|
||||
(*fval) = @_ if @_ ;
|
||||
local ($buf);
|
||||
if ($ENV{'REQUEST_METHOD'} eq 'POST'){
|
||||
read(STDIN,$buf,$ENV{'CONTENT_LENGTH'});
|
||||
}else{
|
||||
$buf=$ENV{'QUERY_STRING'};
|
||||
}
|
||||
|
||||
if ($buf eq ""){
|
||||
return 0 ;
|
||||
}else{
|
||||
@fval=split(/&/,$buf);
|
||||
foreach $i (0 .. $#fval){
|
||||
($name,$val)=split (/=/,$fval[$i],2);
|
||||
$val=~tr/+/ /;
|
||||
$val=~ s/%(..)/pack("c",hex($1))/ge;
|
||||
$name=~tr/+/ /;
|
||||
$name=~ s/%(..)/pack("c",hex($1))/ge;
|
||||
if (!defined($field{$name})){
|
||||
$field{$name}=$val;
|
||||
}else{
|
||||
$field{$name} .= ",$val";
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
&GetFormInput;
|
||||
$value = $field{'data'};
|
||||
$fileName = $field{'filename'};
|
||||
|
||||
open(FH,">","$dataDir/$fileName");
|
||||
print FH "<?xml version='1.0' encoding='UTF-8'?>".$value;
|
||||
close(FH);
|
||||
|
||||
print "Content-type: text/html\n\n";
|
||||
exit;
|
@ -1,36 +0,0 @@
|
||||
XML structure definition:
|
||||
|
||||
root tag - <projects>
|
||||
it has a number of nested <project> tags.
|
||||
|
||||
tag <project> has 3 mandatory attributes: id (string), name (string), startdate(formatted string YYYY,MM,DD as in 2006,12,14)
|
||||
|
||||
<project id = "1" name = "project1" startdate = "2006,12,14">
|
||||
|
||||
it has a number of nested <task> tags.
|
||||
|
||||
tag <task> has one mandatory attribute id (string)
|
||||
|
||||
<task id="1">
|
||||
|
||||
and a number of nested tag-properties:
|
||||
|
||||
<name>task1</name> - task name, string
|
||||
|
||||
<est>2006,12,14</est> - task start date, formatted string YYYY,MM,DD
|
||||
|
||||
<duration>120</duration> - task duration in hours
|
||||
|
||||
<percentcompleted>60</percentcompleted> - percent complete of this task, integer range 0..100
|
||||
|
||||
<predecessortasks>2</predecessortasks> - id of the predecessor task (the one linked to this task with an arrow), so this task runs always after its predecessor. Could be empty tag.
|
||||
|
||||
<childtasks>
|
||||
|
||||
... nested <task> tags
|
||||
|
||||
</childtasks> - defines nested sub-tasks, could be empty tag.
|
||||
|
||||
End of XML definition.
|
||||
|
||||
Sample XML structure - see "data/data.xml" file.
|
@ -1,143 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projects>
|
||||
<project id = "1" name = "project1" startdate = "2010,12,14">
|
||||
|
||||
<task id="1">
|
||||
<name>project1 task1</name>
|
||||
<est>2010,12,14</est>
|
||||
<duration>120</duration>
|
||||
<percentcompleted>60</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks>
|
||||
|
||||
<task id="2">
|
||||
<name>project1 task2</name>
|
||||
<est>2010,12,14</est>
|
||||
<duration>100</duration>
|
||||
<percentcompleted>20</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
<task id="6">
|
||||
<name>project1 task6</name>
|
||||
<est>2010,12,15</est>
|
||||
<duration>90</duration>
|
||||
<percentcompleted>10</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
<task id="7">
|
||||
<name>project1 task7</name>
|
||||
<est>2010,12,14</est>
|
||||
<duration>65</duration>
|
||||
<percentcompleted>30</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
</childtasks>
|
||||
</task>
|
||||
|
||||
<task id="8">
|
||||
<name>project1 task8</name>
|
||||
<est>2011,1,7</est>
|
||||
<duration>130</duration>
|
||||
<percentcompleted>30</percentcompleted>
|
||||
<predecessortasks>1</predecessortasks>
|
||||
<childtasks>
|
||||
|
||||
<task id="9">
|
||||
<name>project1 task9</name>
|
||||
<est>2011,1,7</est>
|
||||
<duration>70</duration>
|
||||
<percentcompleted>35</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
<task id="10">
|
||||
<name>project1 task10</name>
|
||||
<est>2011,1,7</est>
|
||||
<duration>72</duration>
|
||||
<percentcompleted>40</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
<task id="3">
|
||||
<name>project1 task3</name>
|
||||
<est>2011,1,7</est>
|
||||
<duration>70</duration>
|
||||
<percentcompleted>88</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
<task id="4">
|
||||
<name>project1 task4</name>
|
||||
<est>2011,1,8</est>
|
||||
<duration>50</duration>
|
||||
<percentcompleted>40</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
<task id="5">
|
||||
<name>project1 task5</name>
|
||||
<est>2011,1,8</est>
|
||||
<duration>40</duration>
|
||||
<percentcompleted>70</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
</childtasks>
|
||||
</task>
|
||||
|
||||
</project>
|
||||
|
||||
<project id = "2" name = "project2" startdate = "2010,12,20">
|
||||
|
||||
<task id="12">
|
||||
<name>project2 task12</name>
|
||||
<est>2010,12,20</est>
|
||||
<duration>140</duration>
|
||||
<percentcompleted>60</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks>
|
||||
|
||||
<task id="14">
|
||||
<name>project2 task14</name>
|
||||
<est>2010,12,20</est>
|
||||
<duration>100</duration>
|
||||
<percentcompleted>20</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
<task id="15">
|
||||
<name>project2 task15</name>
|
||||
<est>2010,12,21</est>
|
||||
<duration>100</duration>
|
||||
<percentcompleted>20</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
<task id="16">
|
||||
<name>project2 task16</name>
|
||||
<est>2010,12,22</est>
|
||||
<duration>100</duration>
|
||||
<percentcompleted>20</percentcompleted>
|
||||
<predecessortasks></predecessortasks>
|
||||
<childtasks></childtasks>
|
||||
</task>
|
||||
|
||||
</childtasks>
|
||||
</task>
|
||||
|
||||
</project>
|
||||
|
||||
</projects>
|
@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projects><project id ='1' name= 'Project 1' startdate = '2006,6,11'><task id ='1'><name>Project1 task1</name><est>2006,6,11</est><duration>100</duration><percentcompleted>50</percentcompleted><predecessortasks></predecessortasks><childtasks><task id='13'><name>Project1 task13</name><est>2006,6,11</est><duration>90</duration><percentcompleted>90</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='4'><name>Project1 task4</name><est>2006,6,11</est><duration>80</duration><percentcompleted>46</percentcompleted><predecessortasks></predecessortasks><childtasks><task id='21'><name>Project2 task2_1</name><est>2006,6,11</est><duration>70</duration><percentcompleted>30</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='22'><name>Project2 task2_2</name><est>2006,6,11</est><duration>70</duration><percentcompleted>30</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='23'><name>Project2 task2_3</name><est>2006,6,11</est><duration>70</duration><percentcompleted>30</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='24'><name>Project2 task2_4</name><est>2006,6,11</est><duration>70</duration><percentcompleted>30</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task></childtasks></task><task id='2'><name>Project1 task2</name><est>2006,6,12</est><duration>78</duration><percentcompleted>40</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task></childtasks></task><task id ='3'><name>Project1 task3</name><est>2006,6,24</est><duration>160</duration><percentcompleted>80</percentcompleted><predecessortasks>1</predecessortasks><childtasks><task id='5'><name>Project1 task5</name><est>2006,6,24</est><duration>60</duration><percentcompleted>70</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='6'><name>Project1 task6</name><est>2006,6,24</est><duration>130</duration><percentcompleted>80</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='11'><name>Project1 task11</name><est>2006,6,24</est><duration>60</duration><percentcompleted>100</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='12'><name>Project1 task12</name><est>2006,6,24</est><duration>110</duration><percentcompleted>90</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='14'><name>Project1 task14</name><est>2006,6,24</est><duration>60</duration><percentcompleted>90</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='15'><name>Project1 task 15</name><est>2006,6,24</est><duration>110</duration><percentcompleted>90</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='7'><name>Project1 task7</name><est>2006,6,25</est><duration>130</duration><percentcompleted>80</percentcompleted><predecessortasks></predecessortasks><childtasks><task id='8'><name>Project1 task8</name><est>2006,6,25</est><duration>100</duration><percentcompleted>10</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='9'><name>Project1 task9</name><est>2006,6,25</est><duration>80</duration><percentcompleted>50</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='10'><name>Project1 task10</name><est>2006,6,25</est><duration>110</duration><percentcompleted>90</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task></childtasks></task></childtasks></task><task id ='35'><name>Project1 task 35</name><est>2006,7,15</est><duration>130</duration><percentcompleted>80</percentcompleted><predecessortasks>3</predecessortasks><childtasks><task id='36'><name>Project1 task 36</name><est>2006,7,15</est><duration>110</duration><percentcompleted>90</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='37'><name>Project1 task 37</name><est>2006,7,15</est><duration>110</duration><percentcompleted>90</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task></childtasks></task></project><project id ='2' name= 'Project 2' startdate = '2006,6,21'><task id ='62'><name>Project1 task 62</name><est>2006,6,21</est><duration>100</duration><percentcompleted>50</percentcompleted><predecessortasks></predecessortasks><childtasks><task id='64'><name>Project1 task 64</name><est>2006,6,21</est><duration>90</duration><percentcompleted>90</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task><task id='63'><name>Project1 task 63</name><est>2006,6,22</est><duration>78</duration><percentcompleted>40</percentcompleted><predecessortasks></predecessortasks><childtasks></childtasks></task></childtasks></task></project></projects>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Data loading/saving</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" border=0 >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img src="../common/icons/gantt.gif" alt="" border=0 >dhtmlxGantt</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Data loading/saving</h3>
|
||||
</div>
|
||||
<ul class="topics samples">
|
||||
<li><a href='./3_loadxml.html'>Load from XML</a></li><li><a href='./4_save.html'>Save and load XML data</a></li>
|
||||
<!--<li><a href="#">Calendar eXcell</a></li>-->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
$file = realpath('..') . '\\' . $_GET['path'];
|
||||
|
||||
if (file_exists($file)) {
|
||||
header('Content-type: text/xml');
|
||||
readfile($file);
|
||||
}
|
||||
|
||||
?>
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
|
||||
$filename = $_POST['filename'];
|
||||
$data = $_POST['data'];
|
||||
|
||||
$file = realpath('..') . '\\save\\' . $filename;
|
||||
|
||||
$f = fopen($file, 'w');
|
||||
fwrite($f, $data);
|
||||
fclose($f);
|
||||
|
||||
?>
|
@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>QuickInfo extension</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../codebase/ext/dhtmlxgantt_quick_info.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Tooltip</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../codebase/ext/dhtmlxgantt_tooltip.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,87 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../common/docs.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<title>Gantt : Samples</title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class='abstop_header'>
|
||||
<div class='content_area'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="page_header">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='top_webix_logo'></div></a>
|
||||
Samples
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_space">
|
||||
<div class="webixdoc_page webixdoc_start">
|
||||
<div id="webixContent" class='webixdoc_content'>
|
||||
<div class="webixdoc_content_inner">
|
||||
<div class="webixdoc_breadcrumb nav_breadcrumb">
|
||||
<a href="http://docs.dhtmlx.com/gantt/" class="webixdoc_back">Documentation</a>
|
||||
<a href="../index.html" class="webixdoc_back">Samples</a>
|
||||
<a href='../index.html' class='webixdoc_back'>02 Extensions</a>
|
||||
</div>
|
||||
<table class='nav_table'>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='../index.html'><div class='nav_back_img'> </div></a>
|
||||
</td><td> <a href='../index.html'>Back</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='01_quickinfo.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='01_quickinfo.html'>QuickInfo extension</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='02_tooltip.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='02_tooltip.html'>Tooltip</a> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Side quick links -->
|
||||
<div class="side_links">
|
||||
<a class="reference_link" href="http://docs.dhtmlx.com/gantt/api__refs__gantt.html">
|
||||
<span>API Reference</span>
|
||||
</a>
|
||||
<a class="sample_link" href="../index.html">
|
||||
<span>Code Samples</span>
|
||||
</a>
|
||||
<a class="forum_link" href="http://forum.dhtmlx.com/viewforum.php?f=15">
|
||||
<span>Developer Forum </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_linea"> </div>
|
||||
<div class="footer_lineb">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='bottom_webix_block bottom_webix_logo' ></div></a>
|
||||
<div class='copyright bottom_webix_block'>© 2014 Dinamenta, UAB<br>
|
||||
All rights reserved</div>
|
||||
<div class='bottom_webix_also'>
|
||||
<h4>Check also:</h4>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml' target='_blank'>DHTMLX Scheduler</a></li>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxSuite/index.shtml' target='_blank'>Other DHTMLX components</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,197 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Printing of Gantt Chart</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="featured" content="yes"><meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body onload="createChartControl('GanttDiv')">
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/gantt.gif" alt="" >dhtmlxGantt</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Printing</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Printing of Gantt Chart</h3>
|
||||
</div>
|
||||
<div class="navigation-div">
|
||||
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
|
||||
</div>
|
||||
<link type="text/css" rel="stylesheet" href="../../codebase/dhtmlxgantt.css">
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxcommon.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxgantt.js"></script>
|
||||
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
/*<![CDATA[*/
|
||||
var ganttChartControl;
|
||||
function createChartControl(htmlDiv1)
|
||||
{
|
||||
// Initialize Gantt data structures
|
||||
|
||||
//project 1
|
||||
var project1 = new GanttProjectInfo(1, "Applet redesign", new Date(2010, 5, 11));
|
||||
|
||||
var parentTask1 = new GanttTaskInfo(1, "Old code review", new Date(2010, 5, 11), 208, 50, "");
|
||||
parentTask1.addChildTask(new GanttTaskInfo(2, "Convert to J#", new Date(2010, 5, 11), 100, 40, ""));
|
||||
parentTask1.addChildTask(new GanttTaskInfo(13, "Add new functions", new Date(2010, 5, 12), 80, 90, ""));
|
||||
|
||||
var parentTask2 = new GanttTaskInfo(3, "Hosted Control", new Date(2010, 6, 7), 190, 80, "1");
|
||||
var parentTask5 = new GanttTaskInfo(5, "J# interfaces", new Date(2010, 6, 14), 60, 70, "6");
|
||||
var parentTask123 = new GanttTaskInfo(123, "use GUIDs", new Date(2010, 6, 14), 60, 70, "");
|
||||
parentTask5.addChildTask(parentTask123);
|
||||
parentTask2.addChildTask(parentTask5);
|
||||
parentTask2.addChildTask(new GanttTaskInfo(6, "Task D", new Date(2010, 6, 10), 30, 80, "14"));
|
||||
|
||||
var parentTask4 = new GanttTaskInfo(7, "Unit testing", new Date(2010, 6, 15), 118, 80, "6");
|
||||
var parentTask8 = new GanttTaskInfo(8, "core (com)", new Date(2010, 6, 15), 100, 10, "");
|
||||
parentTask8.addChildTask(new GanttTaskInfo(55555, "validate uids", new Date(2010, 6, 20), 60, 10, ""));
|
||||
parentTask4.addChildTask(parentTask8);
|
||||
parentTask4.addChildTask(new GanttTaskInfo(9, "Stress test", new Date(2010, 6, 15), 80, 50, ""));
|
||||
parentTask4.addChildTask(new GanttTaskInfo(10, "User interfaces", new Date(2010, 6, 16), 80, 10, ""));
|
||||
parentTask2.addChildTask(parentTask4);
|
||||
|
||||
parentTask2.addChildTask(new GanttTaskInfo(11, "Testing, QA", new Date(2010, 6, 21), 60, 100, "6"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(12, "Task B (Jim)", new Date(2010, 6, 8), 110, 1, "14"));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(14, "Task A", new Date(2010, 6, 7), 8, 10, ""));
|
||||
parentTask2.addChildTask(new GanttTaskInfo(15, "Task C", new Date(2010, 6, 9), 110, 90, "14"));
|
||||
|
||||
project1.addTask(parentTask1);
|
||||
project1.addTask(parentTask2);
|
||||
|
||||
//project 2
|
||||
var project2 = new GanttProjectInfo(2, "Web Design", new Date(2010, 5, 17));
|
||||
|
||||
var parentTask22 = new GanttTaskInfo(62, "Fill HTML pages", new Date(2010, 5, 17), 157, 50, "");
|
||||
parentTask22.addChildTask(new GanttTaskInfo(63, "Cut images", new Date(2010, 5, 22), 78, 40, ""));
|
||||
parentTask22.addChildTask(new GanttTaskInfo(64, "Manage CSS", null, 90, 90, ""));
|
||||
project2.addTask(parentTask22);
|
||||
|
||||
var parentTask70 = new GanttTaskInfo(70, "PHP coding", new Date(2010, 5, 18), 120, 10, "");
|
||||
parentTask70.addChildTask(new GanttTaskInfo(71, "Purchase D control", new Date(2010, 5, 18), 50, 0, ""));
|
||||
project2.addTask(parentTask70);
|
||||
|
||||
// Create Gantt control
|
||||
ganttChartControl = new GanttChart();
|
||||
// Setup paths and behavior
|
||||
ganttChartControl.setImagePath("../../codebase/imgs/");
|
||||
ganttChartControl.setStylePath("../../codebase/dhtmlxgantt.css");
|
||||
ganttChartControl.setEditable(true);
|
||||
ganttChartControl.showTreePanel(true);
|
||||
ganttChartControl.showContextMenu(false);
|
||||
ganttChartControl.showDescTask(true,'s-f');
|
||||
ganttChartControl.showDescProject(true,'d');
|
||||
|
||||
// Load data structure
|
||||
ganttChartControl.addProject(project1);
|
||||
ganttChartControl.addProject(project2);
|
||||
|
||||
// Build control on the page
|
||||
ganttChartControl.create(htmlDiv1);
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="width:950px; height:500px; position:relative;" id="GanttDiv"></div>
|
||||
|
||||
<p>
|
||||
<input onclick="ganttChartControl.printToWindow()" type="button" value="Print Gantt Chart" style="margin-left:450px">
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="source">
|
||||
<div class="teg">Source</div>
|
||||
<div class="code" id="code">
|
||||
<div class="hl-main"><pre><span class="hl-code"><</span><span class="hl-identifier">link</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/css</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">rel</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">stylesheet</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">href</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.css</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment"><![CDATA[</span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">createChartControl</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Initialize Gantt data structures</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 1</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Applet redesign</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Old code review</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">208</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Convert to J#</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">13</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Add new functions</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">12</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Hosted Control</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">190</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask5</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">J# interfaces</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask123</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">123</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">use GUIDs</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask5</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask123</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask5</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task D</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">30</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask4</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">7</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Unit testing</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">118</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask8</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">core (com)</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask8</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">55555</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">validate uids</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">20</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask8</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">9</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Stress test</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">15</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask4</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">User interfaces</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">16</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask4</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">11</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Testing, QA</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">21</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">6</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">12</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task B (Jim)</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">14</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task A</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">8</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">15</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task C</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">9</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">110</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">14</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 2</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Web Design</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask22</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">62</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Fill HTML pages</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">17</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">157</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">63</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Cut images</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">22</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">78</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask22</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">64</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Manage CSS</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">null</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask22</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask70</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">PHP coding</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">120</span><span class="hl-code">, </span><span class="hl-number">10</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask70</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">71</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Purchase D control</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">18</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project2</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask70</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Create Gantt control</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttChart</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Setup paths and behavior</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setImagePath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/imgs/</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setStylePath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.css</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setEditable</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showTreePanel</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showContextMenu</span><span class="hl-brackets">(</span><span class="hl-reserved">false</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescTask</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">s-f</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescProject</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">d</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Load data structure </span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Build control on the page</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">create</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment">]]></span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
|
||||
|
||||
<</span><span class="hl-identifier">div</span><span class="hl-code"> </span><span class="hl-identifier">style</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">width:950px; height:500px; position:relative;</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">GanttDiv</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">div</span><span class="hl-code">></span></pre></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Printing</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" border=0 >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img src="../common/icons/gantt.gif" alt="" border=0 >dhtmlxGantt</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Printing</h3>
|
||||
</div>
|
||||
<ul class="topics samples">
|
||||
<li><a href='./5_print.html'>Printing of Gantt Chart</a></li>
|
||||
<!--<li><a href="#">Calendar eXcell</a></li>-->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,38 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Multiple scales</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.scale_unit = "month";
|
||||
gantt.config.step = 1;
|
||||
gantt.config.date_scale = "%F, %Y";
|
||||
gantt.config.min_column_width = 50;
|
||||
|
||||
gantt.config.scale_height = 90;
|
||||
|
||||
var weekScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%d %M");
|
||||
var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate);
|
||||
};
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"week", step:1, template:weekScaleTemplate},
|
||||
{unit:"day", step:1, date:"%D" }
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,29 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Month view</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.scale_unit = "month";
|
||||
gantt.config.date_scale = "%F, %Y";
|
||||
|
||||
gantt.config.scale_height = 50;
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"day", step:1, date:"%j, %D" }
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,38 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Year scale</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.scale_unit = "year";
|
||||
gantt.config.step = 1;
|
||||
gantt.config.date_scale = "%Y";
|
||||
gantt.config.min_column_width = 50;
|
||||
|
||||
gantt.config.scale_height = 90;
|
||||
|
||||
var monthScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%M");
|
||||
var endDate = gantt.date.add(date, 2, "month");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate);
|
||||
};
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"month", step:3, template:monthScaleTemplate},
|
||||
{unit:"month", step:1, date:"%M" }
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,30 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Day hours</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%F %d";
|
||||
gantt.config.min_column_width = 50;
|
||||
|
||||
gantt.config.scale_height = 54;
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"hour", step:3, date:"%H:%i"}
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,99 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Dynamic scales</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<input type="radio" id="scale1" name="scale" value="1" checked /><label for="scale1">Day scale</label><br>
|
||||
<input type="radio" id="scale2" name="scale" value="2" /><label for="scale2">Week scale</label><br>
|
||||
<input type="radio" id="scale3" name="scale" value="3" /><label for="scale3">Month scale</label><br>
|
||||
<input type="radio" id="scale4" name="scale" value="4" /><label for="scale4">Year scale</label><br>
|
||||
|
||||
<div id="gantt_here" style='width:100%; height:600px;'></div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function setScaleConfig(value){
|
||||
switch (value) {
|
||||
case "1":
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.step = 1;
|
||||
gantt.config.date_scale = "%d %M";
|
||||
gantt.config.subscales = [];
|
||||
gantt.config.scale_height = 27;
|
||||
gantt.templates.date_scale = null;
|
||||
break;
|
||||
case "2":
|
||||
var weekScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%d %M");
|
||||
var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate);
|
||||
};
|
||||
|
||||
gantt.config.scale_unit = "week";
|
||||
gantt.config.step = 1;
|
||||
gantt.templates.date_scale = weekScaleTemplate;
|
||||
gantt.config.subscales = [
|
||||
{unit:"day", step:1, date:"%D" }
|
||||
];
|
||||
gantt.config.scale_height = 50;
|
||||
break;
|
||||
case "3":
|
||||
gantt.config.scale_unit = "month";
|
||||
gantt.config.date_scale = "%F, %Y";
|
||||
gantt.config.subscales = [
|
||||
{unit:"day", step:1, date:"%j, %D" }
|
||||
];
|
||||
gantt.config.scale_height = 50;
|
||||
gantt.templates.date_scale = null;
|
||||
break;
|
||||
case "4":
|
||||
gantt.config.scale_unit = "year";
|
||||
gantt.config.step = 1;
|
||||
gantt.config.date_scale = "%Y";
|
||||
gantt.config.min_column_width = 50;
|
||||
|
||||
gantt.config.scale_height = 90;
|
||||
gantt.templates.date_scale = null;
|
||||
|
||||
var monthScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%M");
|
||||
var endDate = gantt.date.add(date, 2, "month");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate);
|
||||
};
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"month", step:3, template:monthScaleTemplate},
|
||||
{unit:"month", step:1, date:"%M" }
|
||||
];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setScaleConfig('1');
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
|
||||
var func = function(e) {
|
||||
e = e || window.event;
|
||||
var el = e.target || e.srcElement;
|
||||
var value = el.value;
|
||||
setScaleConfig(value);
|
||||
gantt.render();
|
||||
};
|
||||
|
||||
var els = document.getElementsByName("scale");
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
els[i].onclick = func;
|
||||
}
|
||||
</script>
|
||||
</body>
|
@ -1,33 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Custom scales</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
.gantt_container .gantt_grid_scale .gantt_grid_head_cell {
|
||||
line-height: 43px;
|
||||
}
|
||||
.gantt_container .gantt_scale_cell {
|
||||
padding-top: 4px;
|
||||
line-height: 17px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var scale_day = 0;
|
||||
gantt.templates.date_scale = function(date) {
|
||||
var d = gantt.date.date_to_str("%F %d");
|
||||
return "<strong>Day " + (scale_day++) + "</strong><br/>" + d(date);
|
||||
}
|
||||
gantt.config.scale_height = 44;
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,63 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Minutes timeline</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.xml_date="%d-%m-%Y %H:%i";
|
||||
gantt.config.scale_unit = "hour";
|
||||
gantt.config.step = 1;
|
||||
gantt.config.date_scale = "%g %a";
|
||||
gantt.config.min_column_width = 20;
|
||||
gantt.config.duration_unit = "minute";
|
||||
gantt.config.duration_step = 60;
|
||||
gantt.config.scale_height = 75;
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"day", step:1, date : "%j %F, %l"},
|
||||
{unit:"minute", step:15, date : "%i"}
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse({
|
||||
"data":[
|
||||
{"id":11, "text":"Project #1", "start_date":"01-04-2013 02:00", "duration":"24", "progress": 0.6, "open": true},
|
||||
|
||||
{"id":12, "text":"Task #1", "start_date":"01-04-2013 02:00", "duration":"5", "parent":"11", "progress": 1, "open": true},
|
||||
{"id":13, "text":"Task #2", "start_date":"01-04-2013 03:00", "duration":"7", "parent":"11", "progress": 0.5, "open": true},
|
||||
{"id":14, "text":"Task #3", "start_date":"01-04-2013 04:00", "duration":"6", "parent":"11", "progress": 0.8, "open": true},
|
||||
{"id":15, "text":"Task #4", "start_date":"01-04-2013 05:00", "duration":"5", "parent":"11", "progress": 0.2, "open": true},
|
||||
{"id":16, "text":"Task #5", "start_date":"01-04-2013 06:00", "duration":"7", "parent":"11", "progress": 0, "open": true},
|
||||
|
||||
{"id":17, "text":"Task #2.1", "start_date":"01-04-2013 07:00", "duration":"2", "parent":"13", "progress": 1, "open": true},
|
||||
{"id":18, "text":"Task #2.2", "start_date":"01-04-2013 08:00", "duration":"3", "parent":"13", "progress": 0.8, "open": true},
|
||||
{"id":19, "text":"Task #2.3", "start_date":"01-04-2013 09:00", "duration":"4", "parent":"13", "progress": 0.2, "open": true},
|
||||
{"id":20, "text":"Task #2.4", "start_date":"01-04-2013 11:00", "duration":"4", "parent":"13", "progress": 0, "open": true},
|
||||
{"id":21, "text":"Task #4.1", "start_date":"01-04-2013 12:00", "duration":"4", "parent":"15", "progress": 0.5, "open": true},
|
||||
{"id":22, "text":"Task #4.2", "start_date":"01-04-2013 06:00", "duration":"4", "parent":"15", "progress": 0.1, "open": true},
|
||||
{"id":23, "text":"Task #4.3", "start_date":"01-04-2013 10:00", "duration":"5", "parent":"15", "progress": 0, "open": true}
|
||||
],
|
||||
"links":[
|
||||
{"id":"10","source":"11","target":"12","type":"1"},
|
||||
{"id":"11","source":"11","target":"13","type":"1"},
|
||||
{"id":"12","source":"11","target":"14","type":"1"},
|
||||
{"id":"13","source":"11","target":"15","type":"1"},
|
||||
{"id":"14","source":"11","target":"16","type":"1"},
|
||||
{"id":"15","source":"13","target":"17","type":"1"},
|
||||
{"id":"16","source":"17","target":"18","type":"0"},
|
||||
{"id":"17","source":"18","target":"19","type":"0"},
|
||||
{"id":"18","source":"19","target":"20","type":"0"},
|
||||
{"id":"19","source":"15","target":"21","type":"2"},
|
||||
{"id":"20","source":"15","target":"22","type":"2"},
|
||||
{"id":"21","source":"15","target":"23","type":"2"}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
@ -1,47 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Auto resize scale</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.fit_tasks = true;
|
||||
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%F %d";
|
||||
gantt.config.min_column_width = 50;
|
||||
|
||||
gantt.config.scale_height = 54;
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"hour", step:3, date:"%H:%i"}
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
|
||||
function showScaleDesc(){
|
||||
var min = gantt.getState().min_date,
|
||||
max = gantt.getState().max_date,
|
||||
to_str = gantt.templates.task_date;
|
||||
|
||||
return dhtmlx.message("Scale shows days from " + to_str(min) + " to " + to_str(max));
|
||||
}
|
||||
|
||||
gantt.parse(demo_tasks);
|
||||
setTimeout(showScaleDesc, 500);
|
||||
setTimeout(function(){
|
||||
dhtmlx.message("Change date or duration of any task and scales will be adjusted");
|
||||
}, 4500);
|
||||
gantt.attachEvent("onScaleAdjusted", showScaleDesc);
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,47 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Not render weekends on the scale</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<body>
|
||||
<style type="text/css">
|
||||
html, body{ padding:0px; margin:0px; height:100%; }
|
||||
</style>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.xml_date = "%Y-%m-%d %H:%i:%s";
|
||||
|
||||
gantt.config.scale_unit = "month";
|
||||
gantt.config.step = 1;
|
||||
gantt.config.date_scale = "%F, %Y";
|
||||
gantt.config.min_column_width = 50;
|
||||
|
||||
gantt.config.scale_height = 90;
|
||||
|
||||
var weekScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%d %M");
|
||||
var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate);
|
||||
};
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"week", step:1, template:weekScaleTemplate},
|
||||
{unit:"day", step:1, date:"%D" }
|
||||
];
|
||||
|
||||
|
||||
gantt.ignore_time = function(date){
|
||||
if(date.getDay() == 0 || date.getDay() == 6)
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.load("../common/data.json", "json");
|
||||
</script>
|
||||
</body>
|
@ -1,62 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Show working hours</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
.gantt_task_cell.day_end{
|
||||
border-right-color: #C7DFFF;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%l, %F %d";
|
||||
gantt.config.min_column_width = 20;
|
||||
|
||||
gantt.config.scale_height = 20*3;
|
||||
|
||||
gantt.templates.task_cell_class = function(task, date){
|
||||
if(date.getHours() == 8){
|
||||
return "day_start";
|
||||
}
|
||||
if(date.getHours() == 18){
|
||||
return "day_end";
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
var weekScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%d %M");
|
||||
var weekNum = gantt.date.date_to_str("(week %W)");
|
||||
var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate) + " " + weekNum(date);
|
||||
};
|
||||
|
||||
gantt.config.subscales = [
|
||||
// {unit:"month", step:1, date:"%F, %Y"},
|
||||
{unit:"week", step:1, template:weekScaleTemplate},
|
||||
{unit:"hour", step:1, date:"%G"}
|
||||
|
||||
];
|
||||
|
||||
gantt.ignore_time = function(date){
|
||||
if(date.getDay() == 0 || date.getDay() == 6)
|
||||
return true;
|
||||
if(date.getHours() < 8 || date.getHours() > 18)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
};
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,127 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../common/docs.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<title>Gantt : Samples</title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class='abstop_header'>
|
||||
<div class='content_area'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="page_header">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='top_webix_logo'></div></a>
|
||||
Samples
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_space">
|
||||
<div class="webixdoc_page webixdoc_start">
|
||||
<div id="webixContent" class='webixdoc_content'>
|
||||
<div class="webixdoc_content_inner">
|
||||
<div class="webixdoc_breadcrumb nav_breadcrumb">
|
||||
<a href="http://docs.dhtmlx.com/gantt/" class="webixdoc_back">Documentation</a>
|
||||
<a href="../index.html" class="webixdoc_back">Samples</a>
|
||||
<a href='../index.html' class='webixdoc_back'>03 Scales</a>
|
||||
</div>
|
||||
<table class='nav_table'>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='../index.html'><div class='nav_back_img'> </div></a>
|
||||
</td><td> <a href='../index.html'>Back</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='01_multiple_scales.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='01_multiple_scales.html'>Multiple scales</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='02_month_days.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='02_month_days.html'>Month view</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='03_full_year.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='03_full_year.html'>Year scale</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='04_days.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='04_days.html'>Day hours</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='05_dynamic_scales.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='05_dynamic_scales.html'>Dynamic scales</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='06_custom_scales.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='06_custom_scales.html'>Custom scales</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='07_minutes_scale.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='07_minutes_scale.html'>Minutes timeline</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='08_scale_autoconfig.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='08_scale_autoconfig.html'>Auto resize scale</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='09_skip_weekends.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='09_skip_weekends.html'>Not render weekends on the scale</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='10_working_hours.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='10_working_hours.html'>Show working hours</a> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Side quick links -->
|
||||
<div class="side_links">
|
||||
<a class="reference_link" href="http://docs.dhtmlx.com/gantt/api__refs__gantt.html">
|
||||
<span>API Reference</span>
|
||||
</a>
|
||||
<a class="sample_link" href="../index.html">
|
||||
<span>Code Samples</span>
|
||||
</a>
|
||||
<a class="forum_link" href="http://forum.dhtmlx.com/viewforum.php?f=15">
|
||||
<span>Developer Forum </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_linea"> </div>
|
||||
<div class="footer_lineb">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='bottom_webix_block bottom_webix_logo' ></div></a>
|
||||
<div class='copyright bottom_webix_block'>© 2014 Dinamenta, UAB<br>
|
||||
All rights reserved</div>
|
||||
<div class='bottom_webix_also'>
|
||||
<h4>Check also:</h4>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml' target='_blank'>DHTMLX Scheduler</a></li>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxSuite/index.shtml' target='_blank'>Other DHTMLX components</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,28 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Define side content</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/skins/dhtmlxgantt_meadow.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
|
||||
<div id="gantt_here" style='width:100%; height:100%'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
|
||||
gantt.templates.rightside_text = function(start, end, task){
|
||||
return "ID: #" + task.id;
|
||||
};
|
||||
|
||||
gantt.templates.leftside_text = function(start, end, task){
|
||||
return task.duration + " days";
|
||||
};
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,61 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Custom tree formatting</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
height: 100%;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.red .gantt_cell, .odd.red .gantt_cell,
|
||||
.red .gantt_task_cell, .odd.red .gantt_task_cell{
|
||||
background-color: #FDE0E0;
|
||||
}
|
||||
.green .gantt_cell, .odd.green .gantt_cell,
|
||||
.green .gantt_task_cell, .odd.green .gantt_task_cell {
|
||||
background-color: #BEE4BE;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%'></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
gantt.config.grid_width = 380;
|
||||
gantt.config.add_column = false;
|
||||
gantt.templates.grid_row_class = function(item) {
|
||||
if (item.progress == 0) return "red";
|
||||
if (item.progress >= 1) return "green";
|
||||
};
|
||||
gantt.templates.task_row_class = function(start_date, end_date, item) {
|
||||
if (item.progress == 0) return "red";
|
||||
if (item.progress >= 1) return "green";
|
||||
};
|
||||
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:"assigned", label:"Assigned to", align: "center", width:100,
|
||||
template: function(item) {
|
||||
if (!item.users) return "Nobody";
|
||||
return item.users.join(", ");
|
||||
}
|
||||
}
|
||||
];
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
</script>
|
||||
</body>
|
@ -1,70 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Link styles</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
.gantt_task_link.start_to_start .gantt_line_wrapper div{
|
||||
background-color: #dd5640;
|
||||
}
|
||||
.gantt_task_link.start_to_start:hover .gantt_line_wrapper div{
|
||||
box-shadow: 0 0 5px 0px #dd5640;
|
||||
}
|
||||
.gantt_task_link.start_to_start .gantt_link_arrow_right{
|
||||
border-left-color: #dd5640;
|
||||
}
|
||||
|
||||
|
||||
.gantt_task_link.finish_to_start .gantt_line_wrapper div{
|
||||
background-color: #7576ba;
|
||||
}
|
||||
.gantt_task_link.finish_to_start:hover .gantt_line_wrapper div{
|
||||
box-shadow: 0 0 5px 0px #7576ba;
|
||||
}
|
||||
|
||||
.gantt_task_link.finish_to_start .gantt_link_arrow_right{
|
||||
border-left-color: #7576ba;
|
||||
}
|
||||
|
||||
|
||||
.gantt_task_link.finish_to_finish .gantt_line_wrapper div{
|
||||
background-color: #55d822;
|
||||
}
|
||||
.gantt_task_link.finish_to_finish:hover .gantt_line_wrapper div{
|
||||
box-shadow: 0 0 5px 0px #55d822;
|
||||
}
|
||||
.gantt_task_link.finish_to_finish .gantt_link_arrow_left{
|
||||
border-right-color: #55d822;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
|
||||
gantt.templates.link_class = function(link){
|
||||
var types = gantt.config.links;
|
||||
switch (link.type){
|
||||
case types.finish_to_start:
|
||||
return "finish_to_start";
|
||||
break;
|
||||
case types.start_to_start:
|
||||
return "start_to_start";
|
||||
break;
|
||||
case types.finish_to_finish:
|
||||
return "finish_to_finish";
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,69 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Task styles</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
.high{
|
||||
border:2px solid #d96c49;
|
||||
color: #d96c49;
|
||||
background: #d96c49;
|
||||
}
|
||||
.high .gantt_task_progress{
|
||||
background: #db2536;
|
||||
}
|
||||
|
||||
.medium{
|
||||
border:2px solid #34c461;
|
||||
color:#34c461;
|
||||
background: #34c461;
|
||||
}
|
||||
.medium .gantt_task_progress{
|
||||
background: #23964d;
|
||||
}
|
||||
|
||||
.low{
|
||||
border:2px solid #6ba8e3;
|
||||
color:#6ba8e3;
|
||||
background: #6ba8e3;
|
||||
}
|
||||
.low .gantt_task_progress{
|
||||
background: #547dab;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.config.columns=[
|
||||
{name:"text", label:"Task name", tree:true, width:"*" },
|
||||
{name:"start_date", label:"Start time", align: "center" },
|
||||
{name:"priority", label:"Priority", align: "center", template:function(obj){
|
||||
if (obj.priority == 1){ return "High"}
|
||||
if (obj.priority == 2){ return "Medium"}
|
||||
return "Low"
|
||||
} }
|
||||
];
|
||||
gantt.templates.task_class = function(start, end, task){
|
||||
switch (task.priority){
|
||||
case "1":
|
||||
return "high";
|
||||
break;
|
||||
case "2":
|
||||
return "medium";
|
||||
break;
|
||||
case "3":
|
||||
return "low";
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
gantt.parse(users_data);
|
||||
</script>
|
||||
</body>
|
@ -1,34 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Template for tree nodes</title>
|
||||
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style>
|
||||
.important{
|
||||
color:red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="gantt_here" style='width:1000px; height:400px;'></div>
|
||||
<script>
|
||||
gantt.config.columns=[
|
||||
{name:"text", label:"Task name", tree:true, width:230, template:myFunc },
|
||||
{name:"start_date", label:"Start time", align: "center" },
|
||||
{name:"duration", label:"Duration", align: "center" }
|
||||
];
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
|
||||
function myFunc(task){
|
||||
if(task.priority ==1)
|
||||
return "<div class='important'>"+task.text+" ("+task.users+") </div>";
|
||||
return task.text+" ("+task.users+")";
|
||||
};
|
||||
</script>
|
||||
</body>
|
@ -1,40 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Highlighting weekends</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style>
|
||||
html, body{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
.weekend{
|
||||
background: #f4f7f4;
|
||||
}
|
||||
.gantt_selected .weekend{
|
||||
background: #f7eb91;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.templates.scale_cell_class = function(date){
|
||||
if(date.getDay()==0||date.getDay()==6){
|
||||
return "weekend";
|
||||
}
|
||||
};
|
||||
gantt.templates.task_cell_class = function(item,date){
|
||||
if(date.getDay()==0||date.getDay()==6){
|
||||
return "weekend"
|
||||
}
|
||||
};
|
||||
gantt.init("gantt_here");
|
||||
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,35 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Text in the Progress bar</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style>
|
||||
.gantt_task_progress{
|
||||
text-align:left;
|
||||
padding-left:10px;
|
||||
box-sizing: border-box;
|
||||
color:white;
|
||||
font-weight: bold;
|
||||
}
|
||||
html, body{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.templates.progress_text = function(start, end, task){
|
||||
return "<span style='text-align:left;'>"+Math.round(task.progress*100)+ "% </span>";
|
||||
};
|
||||
gantt.init("gantt_here");
|
||||
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,63 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Styling task bars with events</title>
|
||||
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style>
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
.important{
|
||||
border:2px solid red;
|
||||
color:red;
|
||||
background:red;
|
||||
}
|
||||
|
||||
.important .gantt_task_progress{
|
||||
background: #ff5956;
|
||||
}
|
||||
.normal{
|
||||
border:2px solid green;
|
||||
}
|
||||
.low{
|
||||
border:2px solid yellow;
|
||||
}
|
||||
|
||||
.custom_row{
|
||||
background:rgb(245, 248, 245);
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body onload="init();">
|
||||
<div id="gantt_here" style='width:1000px; height:400px;'></div>
|
||||
|
||||
|
||||
<script>
|
||||
function init() {
|
||||
|
||||
gantt.init("gantt_here");
|
||||
//defines the text inside the tak bars
|
||||
gantt.templates.task_text=function(start,end,task){
|
||||
return "<b>Text:</b> "+task.text+",<b> Holders:</b> "+task.users;
|
||||
};
|
||||
//defines the style of task bars
|
||||
gantt.templates.grid_row_class = gantt.templates.task_row_class = function(start, end, task){
|
||||
return "custom_row";
|
||||
};
|
||||
|
||||
gantt.templates.task_class=function(start,end,task){
|
||||
if(task.progress > 0.5){
|
||||
return "";
|
||||
}else{
|
||||
return "important";
|
||||
}
|
||||
};
|
||||
gantt.parse(users_data);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,83 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Custom html content</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
|
||||
.custom_progress{
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
height:100%;
|
||||
}
|
||||
.custom_progress.nearly_done{
|
||||
background-color: #4CC259;
|
||||
}
|
||||
.custom_progress.in_progress{
|
||||
background-color: #88BFF5;
|
||||
}
|
||||
.custom_progress.idle{
|
||||
background-color: #d96c49;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
var tasks = {
|
||||
data:[
|
||||
{id:1, text:"Project #2", start_date:"01-04-2013",
|
||||
progress1:0.3, progress2:0.5, progress3:0.8, duration:18,order:10,open: true},
|
||||
{id:2, text:"Task #1", start_date:"02-04-2013", duration:8, order:10,
|
||||
progress1:0.6, progress2:0.1, progress3:0.8, parent:1},
|
||||
{id:3, text:"Task #2", start_date:"11-04-2013", duration:8, order:20,
|
||||
progress1:0.9, progress2:0.4, progress3:0.2, parent:1}
|
||||
],
|
||||
links:[
|
||||
{ id:1, source:1, target:2, type:"1"},
|
||||
{ id:2, source:2, target:3, type:"0"},
|
||||
{ id:3, source:3, target:4, type:"0"},
|
||||
{ id:4, source:2, target:5, type:"2"}
|
||||
]
|
||||
};
|
||||
gantt.config.progress = false;
|
||||
|
||||
function percenToString(num){
|
||||
return Math.floor(num*100) + '%';
|
||||
}
|
||||
|
||||
function renderLabel(progress, sum){
|
||||
|
||||
var relWidth = progress/sum * 100;
|
||||
|
||||
var cssClass = "custom_progress ";
|
||||
if(progress > 0.6){
|
||||
cssClass += "nearly_done";
|
||||
}else if(progress > 0.3){
|
||||
cssClass += "in_progress";
|
||||
}else{
|
||||
cssClass += "idle";
|
||||
}
|
||||
return "<div class='"+cssClass+"' style='width:"+relWidth+"%'>" + percenToString(progress) + "</div>";
|
||||
|
||||
}
|
||||
|
||||
gantt.templates.task_text = function(start, end, task){
|
||||
var summ = task.progress1 + task.progress2 + task.progress3;
|
||||
return renderLabel(task.progress1, summ) + renderLabel(task.progress2, summ) + renderLabel(task.progress3, summ);
|
||||
|
||||
};
|
||||
|
||||
gantt.init("gantt_here");
|
||||
|
||||
|
||||
gantt.parse(tasks);
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,53 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Simple context menu</title>
|
||||
</head>
|
||||
|
||||
<script type="text/javascript" src="../common/dhtmlxMenu/dhtmlxcommon.js"></script>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/dhtmlxMenu/dhtmlxmenu.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../common/dhtmlxMenu/skins/dhtmlxmenu_dhx_terrace.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%'></div>
|
||||
<div id="context"></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
|
||||
var menu = new dhtmlXMenuObject();
|
||||
menu.setIconsPath("../common/dhtmlxMenu/sample_images/");
|
||||
menu.renderAsContextMenu();
|
||||
menu.setSkin("dhx_terrace");
|
||||
menu.loadXML("../common/dhxmenu.xml?e=" + new Date().getTime());
|
||||
|
||||
gantt.attachEvent("onContextMenu", function(taskId, linkId, event){
|
||||
var x = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft,
|
||||
y = event.clientY + document.body.scrollTop + document.documentElement.scrollTop;
|
||||
|
||||
if(taskId){
|
||||
menu.showContextMenu(x, y);
|
||||
}else if(linkId){
|
||||
menu.showContextMenu(x, y);
|
||||
}
|
||||
|
||||
if(taskId || linkId){
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,47 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Split task</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
.complex_gantt_bar{
|
||||
background: transparent;
|
||||
border:none;
|
||||
}
|
||||
.complex_gantt_bar .gantt_task_progress{
|
||||
display:none;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
|
||||
<div id="gantt_here" style='width:100%; height:100%'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.templates.task_class = function(start, end, task){
|
||||
if (task.splitStart)
|
||||
return "complex_gantt_bar";
|
||||
};
|
||||
gantt.templates.task_text = function(start, end, task){
|
||||
if (!task.splitStart) return task.text;
|
||||
|
||||
var lw = Math.round( task.splitStart * 100 / task.duration );
|
||||
var rw = Math.round( 100 - task.splitEnd * 100 / task.duration );
|
||||
var left = "<div class='gantt_task_line' style='left:0px; width:"+lw+"%;'>" + task.text + "</div>";
|
||||
var right = "<div class='gantt_task_line' style='right:0px; width:"+rw+"%'>" + task.text + "</div>";
|
||||
return right + left;
|
||||
};
|
||||
gantt.parse({
|
||||
"data":[
|
||||
{"id":11, "text":"Project #1", "start_date":"01-04-2013", "duration":"11", "progress": 0.6, "open": true},
|
||||
{"id":1, "text":"Task 1",
|
||||
start_date:"01-04-2013",
|
||||
splitStart:4, splitEnd:6,
|
||||
duration:"10",
|
||||
"progress": 0.4, "parent":"11"}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
@ -1,110 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Custom task type</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
|
||||
.meeting_task{
|
||||
border:2px solid #BFC518;
|
||||
color:#6ba8e3;
|
||||
background: #F2F67E;
|
||||
}
|
||||
.meeting_task .gantt_task_progress{
|
||||
background:#D9DF29;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
gantt.config.types["meeting"] = "type_id";
|
||||
gantt.locale.labels["type_meeting"] = "Meeting";
|
||||
|
||||
//sections for tasks with 'meeting' type
|
||||
|
||||
gantt.locale.labels.section_title = "Subject";
|
||||
gantt.locale.labels.section_details = "Details";
|
||||
gantt.config.lightbox["meeting_sections"] = [
|
||||
{name: "title", height: 20, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "details", height: 70, map_to: "details", type: "textarea", focus: true},
|
||||
{name: "type", type: "typeselect", map_to: "type"},
|
||||
{name: "time", height: 72, type: "time", map_to: "auto"}
|
||||
];
|
||||
|
||||
//sections for regular lightbox
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 70, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "type", type: "typeselect", map_to: "type"},
|
||||
{name: "time", height: 72, type: "duration", map_to: "auto"}
|
||||
];
|
||||
gantt.templates.task_class = function(start, end, task){
|
||||
if(task.type == gantt.config.types.meeting){
|
||||
return "meeting_task";
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
gantt.templates.task_text = function(start, end, task){
|
||||
if(task.type == gantt.config.types.meeting){
|
||||
return "Meeting: <b>" + task.text + "</b>";
|
||||
}
|
||||
return task.text;
|
||||
};
|
||||
|
||||
|
||||
|
||||
gantt.templates.rightside_text = function(start, end, task){
|
||||
if(task.type == gantt.config.types.milestone){
|
||||
return task.text;
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
gantt.init("gantt_here");
|
||||
|
||||
var demo_tasks = {
|
||||
"data":[
|
||||
{"id":11, "text":"Project #1", type:gantt.config.types.project, "progress": 0.6, "open": true},
|
||||
|
||||
{"id":12, "text":"Task #1", "start_date":"03-04-2013", "duration":"5", "parent":"11", "progress": 1, "open": true},
|
||||
{"id":13, "text":"Task #2", "start_date":"03-04-2013", type:gantt.config.types.project, "parent":"11", "progress": 0.5, "open": true},
|
||||
{"id":14, "text":"Task #3", "start_date":"02-04-2013", type:gantt.config.types.meeting, "duration":"6", "parent":"11", "progress": 0.8, "open": true},
|
||||
{"id":15, "text":"Task #4", type:gantt.config.types.project, "parent":"11", "progress": 0.2, "open": true},
|
||||
{"id":16, "text":"Final milestone", "start_date":"15-04-2013", type:gantt.config.types.milestone, "parent":"11", "progress": 0, "open": true},
|
||||
|
||||
{"id":17, "text":"Task #2.1", "start_date":"03-04-2013", "duration":"2", "parent":"13", "progress": 1, "open": true},
|
||||
{"id":18, "text":"Task #2.2", "start_date":"06-04-2013", "duration":"3", "parent":"13", "progress": 0.8, "open": true},
|
||||
{"id":19, "text":"Task #2.3", "start_date":"10-04-2013", "duration":"4", "parent":"13", "progress": 0.2, "open": true},
|
||||
{"id":20, "text":"Task #2.4", "start_date":"10-04-2013", "duration":"4", "parent":"13", "progress": 0, "open": true},
|
||||
{"id":21, "text":"Task #4.1", "start_date":"03-04-2013", "duration":"4", "parent":"15", "progress": 0.5, "open": true},
|
||||
{"id":22, "text":"Task #4.2", "start_date":"03-04-2013", "duration":"4", "parent":"15", "progress": 0.1, "open": true},
|
||||
{"id":23, "text":"Mediate milestone", "start_date":"14-04-2013", type:gantt.config.types.milestone, "parent":"15", "progress": 0, "open": true}
|
||||
],
|
||||
"links":[
|
||||
{"id":"10","source":"11","target":"12","type":"1"},
|
||||
{"id":"11","source":"11","target":"13","type":"1"},
|
||||
{"id":"12","source":"11","target":"14","type":"1"},
|
||||
{"id":"13","source":"11","target":"15","type":"1"},
|
||||
{"id":"14","source":"23","target":"16","type":"0"},
|
||||
{"id":"15","source":"13","target":"17","type":"1"},
|
||||
{"id":"16","source":"17","target":"18","type":"0"},
|
||||
{"id":"17","source":"18","target":"19","type":"0"},
|
||||
{"id":"18","source":"19","target":"20","type":"0"},
|
||||
{"id":"19","source":"15","target":"21","type":"2"},
|
||||
{"id":"20","source":"15","target":"22","type":"2"},
|
||||
{"id":"21","source":"15","target":"23","type":"0"}
|
||||
]
|
||||
};
|
||||
gantt.parse(demo_tasks);
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,26 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Expand container</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<body>
|
||||
<style type="text/css">
|
||||
html, body{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
</style>
|
||||
<div id="gantt_here"></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.xml_date = "%Y-%m-%d %H:%i:%s";
|
||||
gantt.config.autosize = true;
|
||||
gantt.init("gantt_here");
|
||||
gantt.load("../common/data.json", "json");
|
||||
|
||||
dhtmlx.message("Gantt container is adjusted to the size of the content");
|
||||
</script>
|
||||
</body>
|
@ -1,142 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../common/docs.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<title>Gantt : Samples</title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class='abstop_header'>
|
||||
<div class='content_area'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="page_header">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='top_webix_logo'></div></a>
|
||||
Samples
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_space">
|
||||
<div class="webixdoc_page webixdoc_start">
|
||||
<div id="webixContent" class='webixdoc_content'>
|
||||
<div class="webixdoc_content_inner">
|
||||
<div class="webixdoc_breadcrumb nav_breadcrumb">
|
||||
<a href="http://docs.dhtmlx.com/gantt/" class="webixdoc_back">Documentation</a>
|
||||
<a href="../index.html" class="webixdoc_back">Samples</a>
|
||||
<a href='../index.html' class='webixdoc_back'>04 Customization</a>
|
||||
</div>
|
||||
<table class='nav_table'>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='../index.html'><div class='nav_back_img'> </div></a>
|
||||
</td><td> <a href='../index.html'>Back</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='01_outer_content.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='01_outer_content.html'>Define side content</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='02_custom_tree.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='02_custom_tree.html'>Custom tree formatting</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='03_link_styles.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='03_link_styles.html'>Link styles</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='04_task_styles.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='04_task_styles.html'>Task styles</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='05_tree_template.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='05_tree_template.html'>Template for tree nodes</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='06_highlight_weekend.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='06_highlight_weekend.html'>Highlighting weekends</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='07_progress_text.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='07_progress_text.html'>Text in the Progress bar</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='08_templates.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='08_templates.html'>Styling task bars with events</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='09_html_content.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='09_html_content.html'>Custom html content</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='10_context_menu.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='10_context_menu.html'>Simple context menu</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='11_split_task.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='11_split_task.html'>Split task</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='12_custom_task_type.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='12_custom_task_type.html'>Custom task type</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='13_autosize_container.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='13_autosize_container.html'>Expand container</a> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Side quick links -->
|
||||
<div class="side_links">
|
||||
<a class="reference_link" href="http://docs.dhtmlx.com/gantt/api__refs__gantt.html">
|
||||
<span>API Reference</span>
|
||||
</a>
|
||||
<a class="sample_link" href="../index.html">
|
||||
<span>Code Samples</span>
|
||||
</a>
|
||||
<a class="forum_link" href="http://forum.dhtmlx.com/viewforum.php?f=15">
|
||||
<span>Developer Forum </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_linea"> </div>
|
||||
<div class="footer_lineb">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='bottom_webix_block bottom_webix_logo' ></div></a>
|
||||
<div class='copyright bottom_webix_block'>© 2014 Dinamenta, UAB<br>
|
||||
All rights reserved</div>
|
||||
<div class='bottom_webix_also'>
|
||||
<h4>Check also:</h4>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml' target='_blank'>DHTMLX Scheduler</a></li>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxSuite/index.shtml' target='_blank'>Other DHTMLX components</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,234 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Custom menu in Gantt Chart</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="featured" content="yes"><meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body onload="createChartControl('GanttDiv')">
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img height="22" src="../common/icons/gantt.gif" alt="" >dhtmlxGantt</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="./index.html" class="navigation"><img src="../common/icons/none.gif" alt="" >Custom menu</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Custom menu in Gantt Chart</h3>
|
||||
</div>
|
||||
<div class="navigation-div">
|
||||
<a href="#code" class="navigation view-source"><img src="../common/icons/source.gif" alt="" >View page source</a>
|
||||
</div>
|
||||
<link type="text/css" rel="stylesheet" href="../../codebase/dhtmlxgantt.css">
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxcommon.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="../../codebase/dhtmlxgantt.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../../dhtmlxMenu/codebase/skins/dhtmlxmenu_dhx_skyblue.css">
|
||||
<script type="text/javascript" language="JavaScript" src="../../../dhtmlxMenu/codebase/dhtmlxmenu.js"></script>
|
||||
<script type="text/javascript" language="JavaScript" src="../../../dhtmlxMenu/codebase/ext/dhtmlxmenu_ext.js"></script>
|
||||
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
/*<![CDATA[*/
|
||||
var ganttChartControl;
|
||||
function createChartControl(htmlDiv1)
|
||||
{
|
||||
// Initialize Gantt data structures
|
||||
|
||||
//project 1
|
||||
var project1 = new GanttProjectInfo(1, "Applet redesign", new Date(2010, 5, 11));
|
||||
|
||||
var parentTask1 = new GanttTaskInfo(1, "Old code review", new Date(2010, 5, 11), 208, 50, "");
|
||||
parentTask1.addChildTask(new GanttTaskInfo(2, "Convert to J#", new Date(2010, 5, 11), 100, 40, ""));
|
||||
parentTask1.addChildTask(new GanttTaskInfo(13, "Add new functions", new Date(2010, 5, 12), 80, 90, ""));
|
||||
|
||||
var parentTask2 = new GanttTaskInfo(3, "Hosted Control", new Date(2010, 6, 7), 190, 80, "1");
|
||||
var parentTask5 = new GanttTaskInfo(5, "J# interfaces", new Date(2010, 6, 14), 60, 70, "");
|
||||
var parentTask123 = new GanttTaskInfo(123, "use GUIDs", new Date(2010, 6, 14), 60, 70, "");
|
||||
parentTask5.addChildTask(parentTask123);
|
||||
parentTask2.addChildTask(parentTask5);
|
||||
|
||||
project1.addTask(parentTask1);
|
||||
project1.addTask(parentTask2);
|
||||
|
||||
// Create Gantt control
|
||||
ganttChartControl = new GanttChart();
|
||||
// Setup paths and behavior
|
||||
ganttChartControl.setImagePath("../../codebase/imgs/");
|
||||
ganttChartControl.setEditable(true);
|
||||
ganttChartControl.showTreePanel(true);
|
||||
ganttChartControl.showDescTask(true,'s-f');
|
||||
|
||||
|
||||
|
||||
// Sample custom menu
|
||||
var menu = new dhtmlXMenuObject();
|
||||
menu.setIconsPath("../../../dhtmlxMenu/codebase/imgs/dhtmlxmenu_dhx_skyblue");
|
||||
menu.renderAsContextMenu();
|
||||
menu.loadXMLString('<menu><item id="m1" text="Item name placeholder"/><item id="m2" text="Get info"/><item id="m3" text="Delete Task"/></menu>');
|
||||
menu.attachEvent("onClick", function(id){
|
||||
var obj = menu.getUserData("","obj");
|
||||
if (obj) {
|
||||
var o = obj.o;
|
||||
if (obj.type == "p") {
|
||||
alert("Project, id=" + o.getId() + ", name=" + o.getName() + ", start date=" + o.getStartDate() +
|
||||
", duration=" + o.getDuration() + "hours, percent complete=" + o.getPercentCompleted() + "%");
|
||||
} else
|
||||
if (obj.type == "t") {
|
||||
if(id=="m3") {
|
||||
// Handle "Delete Task" menu
|
||||
if (confirm("Delete task \""+o.getName()+"\"?")) ganttChartControl.getProjectById(1).deleteTask(o.getId());
|
||||
} else
|
||||
alert("Task, id=" + obj.o.getId() + ", name=" + obj.o.getName() + ", EST=" + obj.o.getEST() +
|
||||
", duration=" + o.getDuration() + "hours, percent complete=" + o.getPercentCompleted() + "%" +
|
||||
", parentTaskId=" + o.getParentTaskId() + ", pred.taskId=" + o.getPredecessorTaskId());
|
||||
}
|
||||
}
|
||||
});
|
||||
ganttChartControl.setContextMenu(menu);
|
||||
ganttChartControl.attachEvent("onBeforeContextMenu", function(menu,obj) {
|
||||
// Sample of disabling menu for a particular item with Id = 13
|
||||
if (obj.getId()==13) {alert("This task has no menu."); return false;}
|
||||
if (obj.isProject) {
|
||||
// Project menu
|
||||
menu.setItemText("m1", "Project: " + obj.getName());
|
||||
menu.setUserData("","obj",{type:"p",o:obj});
|
||||
menu.setItemDisabled("m3");
|
||||
} else if (obj.isTask) {
|
||||
// Task menu
|
||||
menu.setItemText("m1", "Task: " + obj.getName());
|
||||
menu.setUserData("","obj",{type:"t",o:obj});
|
||||
menu.setItemEnabled("m3");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// Load data structure
|
||||
ganttChartControl.addProject(project1);
|
||||
|
||||
// Build control on the page
|
||||
ganttChartControl.create(htmlDiv1);
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="width:950px; height:500px; position:relative;" id="GanttDiv"></div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="source">
|
||||
<div class="teg">Source</div>
|
||||
<div class="code" id="code">
|
||||
<div class="hl-main"><pre><span class="hl-code"><</span><span class="hl-identifier">link</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/css</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">rel</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">stylesheet</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">href</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.css</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxcommon.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/dhtmlxgantt.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">link</span><span class="hl-code"> </span><span class="hl-identifier">rel</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">stylesheet</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/css</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">href</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../../dhtmlxMenu/codebase/skins/dhtmlxmenu_dhx_skyblue.css</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../../dhtmlxMenu/codebase/dhtmlxmenu.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">src</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">../../../dhtmlxMenu/codebase/ext/dhtmlxmenu_ext.js</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
<</span><span class="hl-identifier">script</span><span class="hl-code"> </span><span class="hl-identifier">type</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">text/javascript</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">language</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">JavaScript</span><span class="hl-quotes">"</span><span class="hl-code">>
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment"><![CDATA[</span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">createChartControl</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Initialize Gantt data structures</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment">project 1</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">project1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttProjectInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Applet redesign</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask1</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Old code review</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">208</span><span class="hl-code">, </span><span class="hl-number">50</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Convert to J#</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">11</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">100</span><span class="hl-code">, </span><span class="hl-number">40</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask1</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">13</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Add new functions</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-number">12</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">90</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask2</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Hosted Control</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">7</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">190</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask5</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">5</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">J# interfaces</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">parentTask123</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttTaskInfo</span><span class="hl-brackets">(</span><span class="hl-number">123</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">use GUIDs</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-builtin">Date</span><span class="hl-brackets">(</span><span class="hl-number">2010</span><span class="hl-code">, </span><span class="hl-number">6</span><span class="hl-code">, </span><span class="hl-number">14</span><span class="hl-brackets">)</span><span class="hl-code">, </span><span class="hl-number">60</span><span class="hl-code">, </span><span class="hl-number">70</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask5</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask123</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">parentTask2</span><span class="hl-code">.</span><span class="hl-identifier">addChildTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask5</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">project1</span><span class="hl-code">.</span><span class="hl-identifier">addTask</span><span class="hl-brackets">(</span><span class="hl-identifier">parentTask2</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Create Gantt control</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">GanttChart</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Setup paths and behavior</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setImagePath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">../../codebase/imgs/</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setEditable</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showTreePanel</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">showDescTask</span><span class="hl-brackets">(</span><span class="hl-reserved">true</span><span class="hl-code">,</span><span class="hl-quotes">'</span><span class="hl-string">s-f</span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Sample custom menu</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">menu</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">dhtmlXMenuObject</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setIconsPath</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">../../../dhtmlxMenu/codebase/imgs/dhtmlxmenu_dhx_skyblue</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">renderAsContextMenu</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">loadXMLString</span><span class="hl-brackets">(</span><span class="hl-quotes">'</span><span class="hl-string"><menu><item id="m1" text="Item name placeholder"/><item id="m2" text="Get info"/><item id="m3" text="Delete Task"/></menu></span><span class="hl-quotes">'</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">onClick</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-brackets">)</span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">obj</span><span class="hl-code"> = </span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">getUserData</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">obj</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">obj</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">var</span><span class="hl-code"> </span><span class="hl-identifier">o</span><span class="hl-code"> = </span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">o</span><span class="hl-code">;
|
||||
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">type</span><span class="hl-code"> == </span><span class="hl-quotes">"</span><span class="hl-string">p</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-identifier">alert</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">Project, id=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">, name=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getName</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">, start date=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getStartDate</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> +
|
||||
</span><span class="hl-quotes">"</span><span class="hl-string">, duration=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getDuration</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">hours, percent complete=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getPercentCompleted</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">%</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">type</span><span class="hl-code"> == </span><span class="hl-quotes">"</span><span class="hl-string">t</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">if</span><span class="hl-brackets">(</span><span class="hl-identifier">id</span><span class="hl-code">==</span><span class="hl-quotes">"</span><span class="hl-string">m3</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Handle "Delete Task" menu</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">confirm</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">Delete task </span><span class="hl-special">\"</span><span class="hl-quotes">"</span><span class="hl-code">+</span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getName</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">+</span><span class="hl-quotes">"</span><span class="hl-special">\"</span><span class="hl-string">?</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">getProjectById</span><span class="hl-brackets">(</span><span class="hl-number">1</span><span class="hl-brackets">)</span><span class="hl-code">.</span><span class="hl-identifier">deleteTask</span><span class="hl-brackets">(</span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code">
|
||||
</span><span class="hl-identifier">alert</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">Task, id=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">, name=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getName</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">, EST=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getEST</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> +
|
||||
</span><span class="hl-quotes">"</span><span class="hl-string">, duration=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getDuration</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">hours, percent complete=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getPercentCompleted</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">%</span><span class="hl-quotes">"</span><span class="hl-code"> +
|
||||
</span><span class="hl-quotes">"</span><span class="hl-string">, parentTaskId=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getParentTaskId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">, pred.taskId=</span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">o</span><span class="hl-code">.</span><span class="hl-identifier">getPredecessorTaskId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">setContextMenu</span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">attachEvent</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">onBeforeContextMenu</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-reserved">function</span><span class="hl-brackets">(</span><span class="hl-identifier">menu</span><span class="hl-code">,</span><span class="hl-identifier">obj</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Sample of disabling menu for a particular item with Id = 13</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">getId</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-code">==</span><span class="hl-number">13</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-identifier">alert</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">This task has no menu.</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-reserved">false</span><span class="hl-code">;</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">isProject</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Project menu</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemText</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">m1</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Project: </span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">getName</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setUserData</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">obj</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-brackets">{</span><span class="hl-identifier">type</span><span class="hl-code">:</span><span class="hl-quotes">"</span><span class="hl-string">p</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-identifier">o</span><span class="hl-code">:</span><span class="hl-identifier">obj</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemDisabled</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">m3</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">else</span><span class="hl-code"> </span><span class="hl-reserved">if</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">isTask</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Task menu</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemText</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">m1</span><span class="hl-quotes">"</span><span class="hl-code">, </span><span class="hl-quotes">"</span><span class="hl-string">Task: </span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">obj</span><span class="hl-code">.</span><span class="hl-identifier">getName</span><span class="hl-brackets">(</span><span class="hl-brackets">)</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setUserData</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-quotes">"</span><span class="hl-string">obj</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-brackets">{</span><span class="hl-identifier">type</span><span class="hl-code">:</span><span class="hl-quotes">"</span><span class="hl-string">t</span><span class="hl-quotes">"</span><span class="hl-code">,</span><span class="hl-identifier">o</span><span class="hl-code">:</span><span class="hl-identifier">obj</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-identifier">menu</span><span class="hl-code">.</span><span class="hl-identifier">setItemEnabled</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">m3</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-brackets">}</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
|
||||
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Load data structure </span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">addProject</span><span class="hl-brackets">(</span><span class="hl-identifier">project1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-comment">//</span><span class="hl-comment"> Build control on the page</span><span class="hl-comment"></span><span class="hl-code">
|
||||
</span><span class="hl-identifier">ganttChartControl</span><span class="hl-code">.</span><span class="hl-identifier">create</span><span class="hl-brackets">(</span><span class="hl-identifier">htmlDiv1</span><span class="hl-brackets">)</span><span class="hl-code">;
|
||||
</span><span class="hl-brackets">}</span><span class="hl-code">
|
||||
</span><span class="hl-comment">/*</span><span class="hl-comment">]]></span><span class="hl-comment">*/</span><span class="hl-code">
|
||||
</</span><span class="hl-identifier">script</span><span class="hl-code">>
|
||||
|
||||
|
||||
<</span><span class="hl-identifier">div</span><span class="hl-code"> </span><span class="hl-identifier">style</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">width:950px; height:500px; position:relative;</span><span class="hl-quotes">"</span><span class="hl-code"> </span><span class="hl-identifier">id</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">GanttDiv</span><span class="hl-quotes">"</span><span class="hl-code">></</span><span class="hl-identifier">div</span><span class="hl-code">></span></pre></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Custom menu</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="title" content="Samples" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="../common/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="../common/css/style.css" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a class="logo" href="http://www.dhtmlx.com" title="DHTMLX homepage"></a>
|
||||
<div class="tittle-dhtmlx">DHTMLX Docs & Samples Explorer</div>
|
||||
<div class="search-field">
|
||||
<form action="http://docs.dhtmlx.com/doku.php" accept-charset="utf-8" id="dw__search"><div class="no"><input type="hidden" name="do" value="search" /><input type="text" id="qsearch__in" accesskey="f" name="id" title="Search" /><button type="submit">Search</button><div id="qsearch__out" class="ajax_qsearch JSpopup"></div></div></form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<a class="doc_inact" href="../../../docsExplorer/index.html" title="DHTMLX Documentation homepage"></a>
|
||||
<a class="sample"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="navigation-div">
|
||||
<a href="../../../docsExplorer/samples.html" class="navigation"><img src="../common/icons/file.gif" alt="" border=0 >All components</a>
|
||||
<div class="arrow"></div>
|
||||
<a href="../index.html" class="navigation"><img src="../common/icons/gantt.gif" alt="" border=0 >dhtmlxGantt</a>
|
||||
</div>
|
||||
<div style="display:block;">
|
||||
<h3>Custom menu</h3>
|
||||
</div>
|
||||
<ul class="topics samples">
|
||||
<li><a href='./6_menu.html'>Custom menu in Gantt Chart</a></li>
|
||||
<!--<li><a href="#">Calendar eXcell</a></li>-->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer-logo"></div>
|
||||
<div class="copyright">Copyright © 1998-2009 DHTMLX LTD.<br />All rights reserved.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,43 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Lightbox customization</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%'></div>
|
||||
|
||||
<style type="text/css">
|
||||
.red .gantt_cell, .odd.red .gantt_cell,
|
||||
.red .gantt_task_cell, .odd.red .gantt_task_cell{
|
||||
background-color: #FDE0E0;
|
||||
}
|
||||
.green .gantt_cell, .odd.green .gantt_cell,
|
||||
.green .gantt_task_cell, .odd.green .gantt_task_cell {
|
||||
background-color: #BEE4BE;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
gantt.locale.labels["section_priority"] = "Priority";
|
||||
|
||||
gantt.config.columns = [
|
||||
{name:"text", label:"Task name", tree:true, width:'*' },
|
||||
{name:"priority", label:"Priority", width:90, align: "center", template: function(item) { return item.priority ? item.priority : "Low" } }
|
||||
];
|
||||
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 38, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "priority", height: 22, map_to: "priority", type: "select", options: [{key:"Hight", label: "Hight"}, {key:"Normal", label: "Normal"}, {key:"Low", label: "Low"}]},
|
||||
{name: "time", height: 72, type: "time", map_to: "auto", time_format:["%d", "%m", "%Y", "%H:%i"]}
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
</script>
|
||||
</body>
|
@ -1,60 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Progress lightbox</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
gantt.config.grid_width = 380;
|
||||
gantt.config.add_column = false;
|
||||
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:"assigned", label:"Assigned to", align: "center", width:100,
|
||||
template: function(item) {
|
||||
if (!item.users) return "Nobody";
|
||||
return item.users.join(", ");
|
||||
}
|
||||
}
|
||||
];
|
||||
gantt.locale.labels["section_progress"] = "Progress";
|
||||
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 38, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "progress", height: 22, map_to: "progress", type: "select", options: [
|
||||
{key:"0", label: "Not started"},
|
||||
{key:"0.1", label: "10%"},
|
||||
{key:"0.2", label: "20%"},
|
||||
{key:"0.3", label: "30%"},
|
||||
{key:"0.4", label: "40%"},
|
||||
{key:"0.5", label: "50%"},
|
||||
{key:"0.6", label: "60%"},
|
||||
{key:"0.7", label: "70%"},
|
||||
{key:"0.8", label: "80%"},
|
||||
{key:"0.9", label: "90%"},
|
||||
{key:"1", label: "Complete"}
|
||||
]},
|
||||
{name: "time", height: 72, type: "duration", map_to: "auto", time_format:["%d", "%m", "%Y", "%H:%i"]}
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
gantt.showLightbox(2);
|
||||
</script>
|
||||
</body>
|
@ -1,44 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Select control</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:1000px; height:400px;'></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
gantt.config.grid_width = 380;
|
||||
gantt.config.add_column = false;
|
||||
gantt.config.columns = [
|
||||
{name:"text", label:"Task name", tree:true, width:'*' },
|
||||
{name:"start_date", label:"Start time", align: "center" },
|
||||
{name:"duration", label:"Duration", align: "center" },
|
||||
{name:"priority", label:"Priority", width:80, align: "center",
|
||||
template: function(item){
|
||||
if (item.priority == 1)
|
||||
return "High";
|
||||
if (item.priority == 2)
|
||||
return "Normal";
|
||||
return "Low";
|
||||
}}
|
||||
];
|
||||
gantt.locale.labels.section_priority = "Priority";
|
||||
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 38, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "priority", height: 22, map_to: "priority", type: "select", options: [
|
||||
{key:1, label: "High"},
|
||||
{key:2, label: "Normal"},
|
||||
{key:3, label: "Low"}
|
||||
]},
|
||||
{name: "time", height: 72, type: "duration", map_to: "auto"}
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
gantt.showLightbox(1);
|
||||
</script>
|
||||
</body>
|
@ -1,78 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Validate lightbox values</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var users_data = {
|
||||
"data":[
|
||||
{"id":1, "text":"Project #1", "start_date":"01-04-2013", "duration":"11", "progress": 0.6, "open": true, "user":"", "priority": "2"},
|
||||
{"id":2, "text":"Task #1", "start_date":"03-04-2013", "duration":"5", "parent":"1", "progress": 1, "open": true, "user": "John", "priority": "1"},
|
||||
{"id":3, "text":"Task #2", "start_date":"02-04-2013", "duration":"7", "parent":"1", "progress": 0.5, "open": true, "user": "Anna", "priority": "1"},
|
||||
{"id":4, "text":"Task #3", "start_date":"02-04-2013", "duration":"6", "parent":"1", "progress": 0.8, "open": true, "user": "Mike", "priority": "2"},
|
||||
{"id":5, "text":"Task #4", "start_date":"02-04-2013", "duration":"5", "parent":"1", "progress": 0.2, "open": true, "user": "John", "priority": "3"},
|
||||
{"id":6, "text":"Task #5", "start_date":"02-04-2013", "duration":"7", "parent":"1", "progress": 0, "open": true, "user": "John", "priority": "2"},
|
||||
{"id":7, "text":"Task #2.1", "start_date":"03-04-2013", "duration":"2", "parent":"3", "progress": 1, "open": true, "user": "Mike", "priority": "2"},
|
||||
{"id":8, "text":"Task #2.2", "start_date":"06-04-2013", "duration":"3", "parent":"3", "progress": 0.8, "open": true, "user": "Anna", "priority": "3"},
|
||||
{"id":9, "text":"Task #2.3", "start_date":"10-04-2013", "duration":"4", "parent":"3", "progress": 0.2, "open": true, "user": "Mike", "priority": "1"},
|
||||
{"id":10, "text":"Task #2.4", "start_date":"10-04-2013", "duration":"4", "parent":"3", "progress": 0, "open": true, "user": "John", "priority": "1"},
|
||||
{"id":11, "text":"Task #4.1", "start_date":"03-04-2013", "duration":"4", "parent":"5", "progress": 0.5, "open": true, "user": "John", "priority": "3"},
|
||||
{"id":12, "text":"Task #4.2", "start_date":"03-04-2013", "duration":"4", "parent":"5", "progress": 0.1, "open": true, "user":"John", "priority": "3"},
|
||||
{"id":13, "text":"Task #4.3", "start_date":"03-04-2013", "duration":"5", "parent":"5", "progress": 0, "open": true, "user": "Anna", "priority": "3"}
|
||||
],
|
||||
"links":[
|
||||
{"id":"10","source":"11","target":"12","type":"1"},
|
||||
{"id":"11","source":"11","target":"13","type":"1"},
|
||||
{"id":"12","source":"11","target":"14","type":"1"},
|
||||
{"id":"13","source":"11","target":"15","type":"1"},
|
||||
{"id":"14","source":"11","target":"16","type":"1"},
|
||||
|
||||
{"id":"15","source":"13","target":"17","type":"1"},
|
||||
{"id":"16","source":"17","target":"18","type":"0"},
|
||||
{"id":"17","source":"18","target":"19","type":"0"},
|
||||
{"id":"18","source":"19","target":"20","type":"0"},
|
||||
{"id":"19","source":"15","target":"21","type":"2"},
|
||||
{"id":"20","source":"15","target":"22","type":"2"},
|
||||
{"id":"21","source":"15","target":"23","type":"2"}
|
||||
]
|
||||
};
|
||||
|
||||
gantt.config.details_on_create = true;
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 38, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "user", height: 22, map_to: "user", type: "select", options: [
|
||||
{key:"", label: "Select a worker..."},
|
||||
{key:"John", label: "John"},
|
||||
{key:"Mike", label: "Mike"},
|
||||
{key:"Anna", label: "Anna"}]},
|
||||
{name: "time", height: 72, type: "duration", map_to: "auto"}
|
||||
];
|
||||
|
||||
gantt.locale.labels["section_user"] = "Worker";
|
||||
|
||||
gantt.attachEvent("onLightboxSave", function(id, item){
|
||||
if(!item.text){
|
||||
dhtmlx.message({type:"error", text:"Enter task description!"});
|
||||
return false;
|
||||
}
|
||||
if(!item.user){
|
||||
dhtmlx.message({type:"error", text:"Pick a worker for this task!"});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
</script>
|
||||
</body>
|
@ -1,42 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Custom control in the lightbox</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<body>
|
||||
<div id="gantt_here" style='width:1000px; height:400px;'></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.form_blocks["my_editor"] = {
|
||||
render:function(sns) {
|
||||
return "<div class='dhx_cal_ltext' style='height:60px;'>Text <input type='text'><br/>Holders <input type='text'></div>";
|
||||
},
|
||||
set_value:function(node, value, task) {
|
||||
node.childNodes[1].value = value || "";
|
||||
node.childNodes[4].value = task.users || "";
|
||||
},
|
||||
get_value:function(node, task) {
|
||||
task.users = node.childNodes[4].value;
|
||||
return node.childNodes[1].value;
|
||||
},
|
||||
focus:function(node) {
|
||||
var a = node.childNodes[1];
|
||||
a.select();
|
||||
a.focus();
|
||||
}
|
||||
};
|
||||
gantt.config.lightbox.sections = [
|
||||
{ name:"description", height:200, map_to:"text", type:"my_editor" , focus:true},
|
||||
{ name:"time", height:72, type:"duration", map_to:"auto"}
|
||||
];
|
||||
|
||||
gantt.parse(users_data);
|
||||
gantt.showLightbox(1);
|
||||
</script>
|
||||
</body>
|
@ -1,42 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Template control</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<style>
|
||||
#title1{
|
||||
padding-left:35px;
|
||||
color:black;
|
||||
font-weight:bold;
|
||||
}
|
||||
#title2{
|
||||
padding-left:15px;
|
||||
color:black;
|
||||
font-weight:bold;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:1000px; height:400px;'></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
gantt.locale.labels.section_template = "Details";
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 38, map_to: "text", type: "textarea", focus: true},
|
||||
{name:"template", height:16, type:"template", map_to:"my_template"},
|
||||
{name: "time", height: 72, type: "duration", map_to: "auto"}
|
||||
];
|
||||
|
||||
gantt.attachEvent("onBeforeLightbox", function(id) {
|
||||
var task = gantt.getTask(id);
|
||||
task.my_template = "<span id='title1'>Holders: </span>"+ task.users+"<span id='title2'>Progress: </span>"+ task.progress*100 +" %";
|
||||
return true;
|
||||
});
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
gantt.showLightbox(1);
|
||||
</script>
|
||||
</body>
|
@ -1,73 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Custom button in the lightbox</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%'></div>
|
||||
|
||||
<style type="text/css">
|
||||
.complete_button{
|
||||
margin-top: 1px;
|
||||
background-image:url("common/v_complete.png");
|
||||
width: 20px;
|
||||
}
|
||||
.dhx_btn_set.complete_button_set{
|
||||
background: #ACCAAC;
|
||||
color: #454545;
|
||||
border: 1px solid #94AD94;
|
||||
}
|
||||
.completed_task{
|
||||
border:1px solid #94AD94;
|
||||
}
|
||||
.completed_task .gantt_task_progress{
|
||||
background: #ACCAAC;
|
||||
}
|
||||
|
||||
.dhtmlx-completed{
|
||||
border-color: #669e60;
|
||||
}
|
||||
.dhtmlx-completed div {
|
||||
background: #81c97a;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
gantt.locale.labels["complete_button"] = "Complete";
|
||||
gantt.config.buttons_left=["dhx_save_btn","dhx_cancel_btn","complete_button"];
|
||||
|
||||
gantt.templates.task_class=function(start,end,task){
|
||||
if (task.progress == 1)
|
||||
return "completed_task";
|
||||
return "";
|
||||
};
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
|
||||
gantt.attachEvent("onLightboxButton", function(button_id, node, e){
|
||||
if(button_id == "complete_button"){
|
||||
var id = gantt.getState().lightbox;
|
||||
gantt.getTask(id).progress = 1;
|
||||
gantt.updateTask(id)
|
||||
gantt.hideLightbox();
|
||||
}
|
||||
});
|
||||
gantt.attachEvent("onBeforeLightbox", function(id) {
|
||||
var task = gantt.getTask(id);
|
||||
if (task.progress == 1){
|
||||
dhtmlx.message({text:"The task is already completed!", type:"completed"});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,23 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Time control</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:1000px; height:400px;'></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
gantt.locale.labels.section_period = "Time period";
|
||||
gantt.config.lightbox.sections = [
|
||||
{name:"description", height:38, map_to:"text", type:"textarea", focus:true},
|
||||
{name:"period", height:72, type:"time", map_to:"auto"}
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
gantt.showLightbox(1);
|
||||
</script>
|
||||
</body>
|
@ -1,34 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Parent selector</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.locale.labels["section_parent"] = "Parent task";
|
||||
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 38, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "parent", type:"parent", allow_root:"true", root_label:"No parent", filter: function(id, task){
|
||||
/* if(task.$level > 1){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}*/
|
||||
return true;
|
||||
}},
|
||||
|
||||
{name: "time", height: 72, type: "time", map_to: "auto", time_format:["%d", "%m", "%Y", "%H:%i"]}
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
</script>
|
||||
</body>
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
@ -1,122 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../common/docs.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<title>Gantt : Samples</title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class='abstop_header'>
|
||||
<div class='content_area'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="page_header">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='top_webix_logo'></div></a>
|
||||
Samples
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_space">
|
||||
<div class="webixdoc_page webixdoc_start">
|
||||
<div id="webixContent" class='webixdoc_content'>
|
||||
<div class="webixdoc_content_inner">
|
||||
<div class="webixdoc_breadcrumb nav_breadcrumb">
|
||||
<a href="http://docs.dhtmlx.com/gantt/" class="webixdoc_back">Documentation</a>
|
||||
<a href="../index.html" class="webixdoc_back">Samples</a>
|
||||
<a href='../index.html' class='webixdoc_back'>05 Lightbox</a>
|
||||
</div>
|
||||
<table class='nav_table'>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='../index.html'><div class='nav_back_img'> </div></a>
|
||||
</td><td> <a href='../index.html'>Back</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='01_lightbox_customization.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='01_lightbox_customization.html'>Lightbox customization</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='02_progress_lightbox.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='02_progress_lightbox.html'>Progress lightbox</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='02_select.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='02_select.html'>Select control</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='03_validation.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='03_validation.html'>Validate lightbox values</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='04_custom_editor.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='04_custom_editor.html'>Custom control in the lightbox</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='05_template.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='05_template.html'>Template control</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='06_custom_button.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='06_custom_button.html'>Custom button in the lightbox</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='07_time.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='07_time.html'>Time control</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='08_parent_selector.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='08_parent_selector.html'>Parent selector</a> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Side quick links -->
|
||||
<div class="side_links">
|
||||
<a class="reference_link" href="http://docs.dhtmlx.com/gantt/api__refs__gantt.html">
|
||||
<span>API Reference</span>
|
||||
</a>
|
||||
<a class="sample_link" href="../index.html">
|
||||
<span>Code Samples</span>
|
||||
</a>
|
||||
<a class="forum_link" href="http://forum.dhtmlx.com/viewforum.php?f=15">
|
||||
<span>Developer Forum </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_linea"> </div>
|
||||
<div class="footer_lineb">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='bottom_webix_block bottom_webix_logo' ></div></a>
|
||||
<div class='copyright bottom_webix_block'>© 2014 Dinamenta, UAB<br>
|
||||
All rights reserved</div>
|
||||
<div class='bottom_webix_also'>
|
||||
<h4>Check also:</h4>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml' target='_blank'>DHTMLX Scheduler</a></li>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxSuite/index.shtml' target='_blank'>Other DHTMLX components</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Default skin</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,25 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Task edit form</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.wide_form = 1;
|
||||
|
||||
gantt.templates.task_class = function(st,end,item){
|
||||
return item.$level==0?"gantt_project":""
|
||||
};
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
gantt.showLightbox(1);
|
||||
</script>
|
||||
</body>
|
@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>'Skyblue' skin</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/skins/dhtmlxgantt_skyblue.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,28 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>'Meadow' skin</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/skins/dhtmlxgantt_meadow.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.templates.grid_row_class = function(start, end, item){
|
||||
return item.$level==0?"gantt_project":""
|
||||
}
|
||||
gantt.templates.task_row_class = function(start, end, item){
|
||||
return item.$level==0?"gantt_project":""
|
||||
}
|
||||
gantt.templates.task_class = function(start, end, item){
|
||||
return item.$level==0?"gantt_project":""
|
||||
}
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,30 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>'Broadway' skin</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/skins/dhtmlxgantt_broadway.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
/*gantt.templates.grid_row_class = function(item){
|
||||
return item.$level==0?"gantt_project":""
|
||||
}
|
||||
gantt.templates.task_row_class = function(st,end,item){
|
||||
return item.$level==0?"gantt_project":""
|
||||
}*/
|
||||
gantt.templates.task_class = function(st,end,item){
|
||||
return item.$level==0?"gantt_project":""
|
||||
};
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,102 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../common/docs.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<title>Gantt : Samples</title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class='abstop_header'>
|
||||
<div class='content_area'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="page_header">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='top_webix_logo'></div></a>
|
||||
Samples
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_space">
|
||||
<div class="webixdoc_page webixdoc_start">
|
||||
<div id="webixContent" class='webixdoc_content'>
|
||||
<div class="webixdoc_content_inner">
|
||||
<div class="webixdoc_breadcrumb nav_breadcrumb">
|
||||
<a href="http://docs.dhtmlx.com/gantt/" class="webixdoc_back">Documentation</a>
|
||||
<a href="../index.html" class="webixdoc_back">Samples</a>
|
||||
<a href='../index.html' class='webixdoc_back'>06 Skins</a>
|
||||
</div>
|
||||
<table class='nav_table'>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='../index.html'><div class='nav_back_img'> </div></a>
|
||||
</td><td> <a href='../index.html'>Back</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='01_default.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='01_default.html'>Default skin</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='02_default_lightbox.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='02_default_lightbox.html'>Task edit form</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='03_skyblue.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='03_skyblue.html'>'Skyblue' skin</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='04_meadow.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='04_meadow.html'>'Meadow' skin</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='05_broadway.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='05_broadway.html'>'Broadway' skin</a> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Side quick links -->
|
||||
<div class="side_links">
|
||||
<a class="reference_link" href="http://docs.dhtmlx.com/gantt/api__refs__gantt.html">
|
||||
<span>API Reference</span>
|
||||
</a>
|
||||
<a class="sample_link" href="../index.html">
|
||||
<span>Code Samples</span>
|
||||
</a>
|
||||
<a class="forum_link" href="http://forum.dhtmlx.com/viewforum.php?f=15">
|
||||
<span>Developer Forum </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_linea"> </div>
|
||||
<div class="footer_lineb">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='bottom_webix_block bottom_webix_logo' ></div></a>
|
||||
<div class='copyright bottom_webix_block'>© 2014 Dinamenta, UAB<br>
|
||||
All rights reserved</div>
|
||||
<div class='bottom_webix_also'>
|
||||
<h4>Check also:</h4>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml' target='_blank'>DHTMLX Scheduler</a></li>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxSuite/index.shtml' target='_blank'>Other DHTMLX components</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,35 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Built-in sorting</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:1000px; height:420px;'></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var tasks = {
|
||||
data:[
|
||||
{id:1, text:"Project #1", start_date:"01-04-2013", duration:8, order:5, progress: 0.6, open: true},
|
||||
{id:2, text:"Task #1", start_date:"03-04-2013", duration:5, order:3, parent:1, progress: 1, open: true},
|
||||
{id:3, text:"Task #2", start_date:"02-04-2013", duration:7, order:3, parent:1, progress: 0.5, open: true},
|
||||
{id:4, text:"Task #2.1", start_date:"03-04-2013", duration:2, order:3, parent:3, progress: 1, open: true},
|
||||
{id:5, text:"Task #2.2", start_date:"04-04-2013", duration:3, order:3, parent:3, progress: 0.8, open: true},
|
||||
{id:6, text:"Task #2.3", start_date:"05-04-2013", duration:4, order:3, parent:3, progress: 0.2, open: true}
|
||||
],
|
||||
links:[
|
||||
{id:1,source:1,target:2,type:"1"},
|
||||
{id:2,source:1,target:3,type:"1"},
|
||||
{id:3,source:3,target:4,type:"1"},
|
||||
{id:4,source:4,target:5,type:"0"},
|
||||
{id:5,source:5,target:6,type:"0"}
|
||||
]
|
||||
};
|
||||
gantt.config.sort = true;
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Branch ordering</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// ordering tasks only inside a branch
|
||||
gantt.config.order_branch = true;
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,96 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Filtering</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<style>
|
||||
.filters_wrapper {
|
||||
line-height: 12px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.filters_wrapper span {
|
||||
font-weight: bold;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.filters_wrapper label {
|
||||
padding-right: 3px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div style='height:20px; padding:5px;'>
|
||||
<div class="filters_wrapper" id="filters_wrapper">
|
||||
<span>Display tasks with priority:</span>
|
||||
<label>
|
||||
<input type="checkbox" name="1" checked />
|
||||
High
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" name="2" />
|
||||
Normal
|
||||
</label>
|
||||
<label>
|
||||
<input type="checkbox" name="3" />
|
||||
Low
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="gantt_here" style='width:1000px; height:420px;'></div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var filter_inputs = document.getElementById("filters_wrapper").getElementsByTagName("input");
|
||||
for (var i=0; i<filter_inputs.length; i++) {
|
||||
var filter_input = filter_inputs[i];
|
||||
|
||||
// attach event handler to update filters object and refresh data (so filters will be applied)
|
||||
filter_input.onchange = function() {
|
||||
gantt.refreshData();
|
||||
}
|
||||
}
|
||||
|
||||
function hasPriority(parent, priority){
|
||||
if(gantt.getTask(parent).priority == priority)
|
||||
return true;
|
||||
|
||||
var child = gantt.getChildren(parent);
|
||||
for(var i = 0; i < child.length; i++){
|
||||
if(hasPriority(child[i], priority))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
gantt.attachEvent("onBeforeTaskDisplay", function(id, task){
|
||||
for (var i=0; i<filter_inputs.length; i++) {
|
||||
var filter_input = filter_inputs[i];
|
||||
|
||||
|
||||
if (filter_input.checked){
|
||||
if (hasPriority(id, filter_input.name)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
});
|
||||
gantt.config.columns = [
|
||||
{name:"text", label:"Task name", tree:true, align:"center", width:160},
|
||||
{name:"start_date", label:"Start time", align: "center"},
|
||||
{name:"priority", label:"Priority", align: "center", template:function(obj){
|
||||
if (obj.priority== 1) return "High";
|
||||
if (obj.priority== 2) return "Normal";
|
||||
return "Low";
|
||||
}}
|
||||
];
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
</script>
|
||||
</body>
|
@ -1,39 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Custom sorting function</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<body>
|
||||
<input type='button' value='Sort by the number of holders' onclick='sortByHolders(direction)'>
|
||||
|
||||
<div id="gantt_here" style='width:1000px; height:420px;'></div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var direction = false;
|
||||
|
||||
function sortByHolders(direction1){
|
||||
direction = !direction;
|
||||
gantt.sort(sortHolders);
|
||||
|
||||
};
|
||||
function sortHolders(a,b){
|
||||
a = a.users.length;
|
||||
b = b.users.length;
|
||||
|
||||
if (direction){
|
||||
return a>b?1:(a<b?-1:0);
|
||||
} else {
|
||||
return a>b?-1:(a<b?1:0);
|
||||
}
|
||||
};
|
||||
gantt.config.columns = [
|
||||
{name:"text", label:"Task name", tree:true, width:160}
|
||||
];
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
</script>
|
||||
</body>
|
@ -1,48 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Using sorting methods</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||||
<body>
|
||||
<input type='button' value='Sort by priority' onclick='sortByPriority()'>
|
||||
<input type='button' value='Sort by task name' onclick='sortByName()'>
|
||||
|
||||
<div id="gantt_here" style='width:1000px; height:420px;'></div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var p_direction = false;
|
||||
var n_direction = false;
|
||||
function sortByPriority(){
|
||||
if (p_direction){
|
||||
gantt.sort("priority",false);
|
||||
} else {
|
||||
gantt.sort("priority",true);
|
||||
}
|
||||
p_direction = !p_direction;
|
||||
};
|
||||
function sortByName(){
|
||||
if (n_direction){
|
||||
gantt.sort("text",false);
|
||||
} else {
|
||||
gantt.sort("text",true);
|
||||
}
|
||||
n_direction = !n_direction;
|
||||
};
|
||||
|
||||
gantt.config.columns = [
|
||||
{name:"text", label:"Task name", tree:true, align:"center", width:160},
|
||||
{name:"start_date", label:"Start time", align: "center"},
|
||||
{name:"priority", label:"Priority", align: "center", template:function(obj){
|
||||
if (obj.priority== 1) return "High";
|
||||
if (obj.priority== 2) return "Normal";
|
||||
return "Low";
|
||||
}}
|
||||
];
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
</script>
|
||||
</body>
|
@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Render Gantt chart without grid</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<body>
|
||||
<style type="text/css">
|
||||
html, body{ padding:0px; margin:0px; height:100%; }
|
||||
</style>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.config.xml_date = "%Y-%m-%d %H:%i:%s";
|
||||
gantt.config.grid_width = 0;
|
||||
gantt.init("gantt_here");
|
||||
gantt.load("../common/data.json", "json");
|
||||
</script>
|
||||
</body>
|
@ -1,107 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../common/docs.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<title>Gantt : Samples</title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class='abstop_header'>
|
||||
<div class='content_area'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="page_header">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='top_webix_logo'></div></a>
|
||||
Samples
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_space">
|
||||
<div class="webixdoc_page webixdoc_start">
|
||||
<div id="webixContent" class='webixdoc_content'>
|
||||
<div class="webixdoc_content_inner">
|
||||
<div class="webixdoc_breadcrumb nav_breadcrumb">
|
||||
<a href="http://docs.dhtmlx.com/gantt/" class="webixdoc_back">Documentation</a>
|
||||
<a href="../index.html" class="webixdoc_back">Samples</a>
|
||||
<a href='../index.html' class='webixdoc_back'>07 Grid</a>
|
||||
</div>
|
||||
<table class='nav_table'>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='../index.html'><div class='nav_back_img'> </div></a>
|
||||
</td><td> <a href='../index.html'>Back</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='01_builtin_sorting.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='01_builtin_sorting.html'>Built-in sorting</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='02_branch_ordering.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='02_branch_ordering.html'>Branch ordering</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='03_filtering.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='03_filtering.html'>Filtering</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='04_custom_sorting.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='04_custom_sorting.html'>Custom sorting function</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='05_sort_api.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='05_sort_api.html'>Using sorting methods</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='06_without_grid.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='06_without_grid.html'>Render Gantt chart without grid</a> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Side quick links -->
|
||||
<div class="side_links">
|
||||
<a class="reference_link" href="http://docs.dhtmlx.com/gantt/api__refs__gantt.html">
|
||||
<span>API Reference</span>
|
||||
</a>
|
||||
<a class="sample_link" href="../index.html">
|
||||
<span>Code Samples</span>
|
||||
</a>
|
||||
<a class="forum_link" href="http://forum.dhtmlx.com/viewforum.php?f=15">
|
||||
<span>Developer Forum </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_linea"> </div>
|
||||
<div class="footer_lineb">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='bottom_webix_block bottom_webix_logo' ></div></a>
|
||||
<div class='copyright bottom_webix_block'>© 2014 Dinamenta, UAB<br>
|
||||
All rights reserved</div>
|
||||
<div class='bottom_webix_also'>
|
||||
<h4>Check also:</h4>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml' target='_blank'>DHTMLX Scheduler</a></li>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxSuite/index.shtml' target='_blank'>Other DHTMLX components</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,60 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>D'n'D Events</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.attachEvent("onAfterTaskDrag", function(id, mode){
|
||||
var task = gantt.getTask(id);
|
||||
if(mode == gantt.config.drag_mode.progress){
|
||||
var pr = Math.floor(task.progress * 100 * 10)/10;
|
||||
dhtmlx.message(task.text + " is now " + pr + "% completed!");
|
||||
}else{
|
||||
var convert = gantt.date.date_to_str("%H:%i, %F %j");
|
||||
var s = convert(task.start_date);
|
||||
var e = convert(task.end_date);
|
||||
dhtmlx.message(task.text + " starts at " + s + " and ends at " + e);
|
||||
}
|
||||
});
|
||||
gantt.attachEvent("onBeforeTaskChanged", function(id, mode, old_event){
|
||||
var task = gantt.getTask(id);
|
||||
if(mode == gantt.config.drag_mode.progress){
|
||||
if(task.progress < old_event.progress){
|
||||
dhtmlx.message(task.text + " progress can't be undone!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
gantt.attachEvent("onBeforeTaskDrag", function(id, mode){
|
||||
var task = gantt.getTask(id);
|
||||
var message = task.text + " ";
|
||||
|
||||
if(mode == gantt.config.drag_mode.progress){
|
||||
message += "progress is being updated";
|
||||
}else{
|
||||
message += "is being ";
|
||||
if(mode == gantt.config.drag_mode.move)
|
||||
message += "moved";
|
||||
else if(mode == gantt.config.drag_mode.resize)
|
||||
message += "resized";
|
||||
}
|
||||
|
||||
dhtmlx.message(message);
|
||||
return true;
|
||||
});
|
||||
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,96 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Constraints</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
gantt.templates.task_class = function(st,end,item){
|
||||
return gantt.getChildren(item.id).length ? "gantt_project" : "";
|
||||
};
|
||||
gantt.init("gantt_here");
|
||||
|
||||
function limitMoveLeft(task, limit){
|
||||
var dur = task.end_date - task.start_date;
|
||||
task.end_date = new Date(limit.end_date);
|
||||
task.start_date = new Date(+task.end_date - dur);
|
||||
}
|
||||
function limitMoveRight(task, limit){
|
||||
var dur = task.end_date - task.start_date;
|
||||
task.start_date = new Date(limit.start_date);
|
||||
task.end_date = new Date(+task.start_date + dur);
|
||||
}
|
||||
|
||||
function limitResizeLeft(task, limit){
|
||||
task.end_date = new Date(limit.end_date);
|
||||
}
|
||||
function limitResizeRight(task, limit){
|
||||
task.start_date = new Date(limit.start_date)
|
||||
}
|
||||
|
||||
gantt.attachEvent("onTaskDrag", function(id, mode, task, original, e){
|
||||
var parent = task.parent ? gantt.getTask(task.parent) : null,
|
||||
children = gantt.getChildren(id),
|
||||
modes = gantt.config.drag_mode;
|
||||
|
||||
var limitLeft = null,
|
||||
limitRight = null;
|
||||
|
||||
if(!(mode == modes.move || mode == modes.resize)) return;
|
||||
|
||||
if(mode == modes.move){
|
||||
limitLeft = limitMoveLeft;
|
||||
limitRight = limitMoveRight;
|
||||
}else if(mode == modes.resize){
|
||||
limitLeft = limitResizeLeft;
|
||||
limitRight = limitResizeRight;
|
||||
}
|
||||
|
||||
//check parents constraints
|
||||
if(parent && +parent.end_date < +task.end_date){
|
||||
limitLeft(task, parent);
|
||||
}
|
||||
if(parent && +parent.start_date > +task.start_date){
|
||||
limitRight(task, parent);
|
||||
}
|
||||
|
||||
//check children constraints
|
||||
for(var i=0; i < children.length; i++){
|
||||
var child = gantt.getTask(children[i]);
|
||||
if(+task.end_date < +child.end_date){
|
||||
limitLeft(task, child);
|
||||
}else if(+task.start_date > +child.start_date){
|
||||
limitRight(task, child)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
gantt.parse({
|
||||
"data":[
|
||||
{"id":11, "text":"Project #1", "start_date":"01-04-2013", "duration":"11", "progress": 0.6, "open": true},
|
||||
{"id":12, "text":"Task #1", "start_date":"03-04-2013", "duration":"5", "parent":"11", "progress": 1, "open": true},
|
||||
{"id":13, "text":"Task #2", "start_date":"02-04-2013", "duration":"7", "parent":"11", "progress": 0.5, "open": true},
|
||||
{"id":14, "text":"Task #3", "start_date":"02-04-2013", "duration":"6", "parent":"11", "progress": 0.8, "open": true},
|
||||
{"id":15, "text":"Task #4", "start_date":"02-04-2013", "duration":"6", "parent":"11", "progress": 0.2, "open": true},
|
||||
{"id":16, "text":"Task #5", "start_date":"02-04-2013", "duration":"7", "parent":"11", "progress": 0, "open": true},
|
||||
|
||||
{"id":17, "text":"Task #2.1", "start_date":"03-04-2013", "duration":"2", "parent":"13", "progress": 1, "open": true},
|
||||
{"id":18, "text":"Task #2.2", "start_date":"06-04-2013", "duration":"3", "parent":"13", "progress": 0.8, "open": true},
|
||||
{"id":21, "text":"Task #4.1", "start_date":"03-04-2013", "duration":"4", "parent":"15", "progress": 0.5, "open": true},
|
||||
{"id":22, "text":"Task #4.2", "start_date":"03-04-2013", "duration":"4", "parent":"15", "progress": 0.1, "open": true},
|
||||
{"id":23, "text":"Task #4.3", "start_date":"03-04-2013", "duration":"5", "parent":"15", "progress": 0, "open": true}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
@ -1,40 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Validation</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
.busy{
|
||||
background: #ff5956 !important;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(users_data);
|
||||
|
||||
gantt.attachEvent("onBeforeAdd", function(id, item){
|
||||
|
||||
var tasks = gantt.getTaskByTime(date1, date2);
|
||||
for(var i=0;i<tasks.length; i++){
|
||||
if (item.users == tasks[i].users){
|
||||
gantt.templates.task_cell_class = function(item1,date){
|
||||
if (date == date1){
|
||||
return "busy";
|
||||
}
|
||||
};
|
||||
gantt.refreshData();
|
||||
alert("One of days is already occupied");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
</script>
|
||||
</body>
|
@ -1,131 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Fixed project dates</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
.gantt_task_line.gantt_dependent_task {
|
||||
background-color: #65c16f;
|
||||
border: 1px solid #3c9445;
|
||||
|
||||
}
|
||||
.gantt_task_line.gantt_dependent_task .gantt_task_progress {
|
||||
background-color: #46ad51;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
var tasks = {
|
||||
data:[
|
||||
{id:4, text:"Project #1", start_date:"02-04-2013", duration:0,order:10,
|
||||
progress:0.4, open: true},
|
||||
{id:5, text:"Task #2.1", start_date:"02-04-2013", duration:8, order:10,
|
||||
progress:0.6, parent:4},
|
||||
{id:6, text:"Task #2.2", start_date:"11-04-2013", duration:8, order:20,
|
||||
progress:0.6, parent:4},
|
||||
{id:7, text:"Project #2", end_date:"19-04-2013", duration:0,order:10,
|
||||
progress:0.4, open: true},
|
||||
{id:8, text:"Task #3.1", start_date:"02-04-2013", duration:8, order:10,
|
||||
progress:0.6, parent:7},
|
||||
{id:9, text:"Task #3.2", start_date:"11-04-2013", duration:8, order:20,
|
||||
progress:0.6, parent:7}
|
||||
|
||||
],
|
||||
links:[
|
||||
{ id:1, source:1, target:2, type:"1"},
|
||||
{ id:2, source:2, target:3, type:"0"},
|
||||
{ id:3, source:3, target:4, type:"0"},
|
||||
{ id:4, source:2, target:5, type:"2"}
|
||||
]
|
||||
};
|
||||
|
||||
gantt.templates.task_text = function(start, end, task){
|
||||
var text = [task.text];
|
||||
|
||||
if(task.$no_end && !task.$no_start){
|
||||
text.push("Must start on " + gantt.templates.task_date(start));
|
||||
}else if(task.$no_start && !task.$no_end){
|
||||
text.push("Must end by " + gantt.templates.task_date(end));
|
||||
}
|
||||
return text.join(", ");
|
||||
};
|
||||
|
||||
gantt.config.lightbox.sections = [
|
||||
{name: "description", height: 70, map_to: "text", type: "textarea", focus: true},
|
||||
{name: "time", height: 72, type: "duration", map_to: "auto"}
|
||||
];
|
||||
|
||||
gantt.init("gantt_here");
|
||||
|
||||
gantt.parse(tasks);
|
||||
|
||||
|
||||
function limitMoveLeft(task, limit){
|
||||
var dur = task.end_date - task.start_date;
|
||||
task.end_date = new Date(limit.end_date);
|
||||
task.start_date = new Date(+task.end_date - dur);
|
||||
}
|
||||
function limitMoveRight(task, limit){
|
||||
var dur = task.end_date - task.start_date;
|
||||
task.start_date = new Date(limit.start_date);
|
||||
task.end_date = new Date(+task.start_date + dur);
|
||||
}
|
||||
|
||||
function limitResizeLeft(task, limit){
|
||||
task.end_date = new Date(limit.end_date);
|
||||
}
|
||||
function limitResizeRight(task, limit){
|
||||
task.start_date = new Date(limit.start_date)
|
||||
}
|
||||
|
||||
gantt.attachEvent("onTaskDrag", function(id, mode, task, original, e){
|
||||
var parent = task.parent ? gantt.getTask(task.parent) : null,
|
||||
children = gantt.getChildren(id),
|
||||
modes = gantt.config.drag_mode;
|
||||
|
||||
var limitLeft = null,
|
||||
limitRight = null;
|
||||
|
||||
if(!(mode == modes.move || mode == modes.resize)) return;
|
||||
|
||||
if(mode == modes.move){
|
||||
limitLeft = limitMoveLeft;
|
||||
limitRight = limitMoveRight;
|
||||
}else if(mode == modes.resize){
|
||||
limitLeft = limitResizeLeft;
|
||||
limitRight = limitResizeRight;
|
||||
}
|
||||
|
||||
//check parents constraints
|
||||
if(parent && +parent.end_date < +task.end_date){
|
||||
limitLeft(task, parent);
|
||||
}
|
||||
if(parent && +parent.start_date > +task.start_date){
|
||||
limitRight(task, parent);
|
||||
}
|
||||
|
||||
//check children constraints
|
||||
for(var i=0; i < children.length; i++){
|
||||
var child = gantt.getTask(children[i]);
|
||||
if(+task.end_date < +child.end_date){
|
||||
limitLeft(task, child);
|
||||
}else if(+task.start_date > +child.start_date){
|
||||
limitRight(task, child)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,77 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Denying dragging tasks out of specific dates</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
|
||||
.left_limit{
|
||||
border-right:2px solid #ff2424;
|
||||
}
|
||||
.right_limit{
|
||||
border-left:2px solid #ff2424;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
var tasks = {
|
||||
data:[
|
||||
{id:1, text:"Project #2", start_date:"01-04-2013", duration:10,order:10,
|
||||
progress:0.4, open: true},
|
||||
{id:2, text:"Task #1", start_date:"02-04-2013", duration:4, order:10,
|
||||
progress:0.6, parent:1},
|
||||
{id:3, text:"Task #2", start_date:"07-04-2013", duration:4, order:20,
|
||||
progress:0.6, parent:1}
|
||||
],
|
||||
links:[
|
||||
{ id:1, source:1, target:2, type:"1"},
|
||||
{ id:2, source:2, target:3, type:"0"},
|
||||
{ id:3, source:3, target:4, type:"0"},
|
||||
{ id:4, source:2, target:5, type:"2"}
|
||||
]
|
||||
};
|
||||
|
||||
var leftLimit = new Date(2013, 2 ,31),
|
||||
rightLimit = new Date(2013, 3 ,12);
|
||||
|
||||
gantt.templates.task_cell_class = function(item, date){
|
||||
if(+date == +(gantt.date.add(leftLimit, -1, "day")) )
|
||||
return "left_limit";
|
||||
if(+date == +rightLimit)
|
||||
return "right_limit";
|
||||
return "";
|
||||
};
|
||||
|
||||
gantt.init("gantt_here", new Date(2013, 2 ,30), new Date(2013, 3 ,15));
|
||||
|
||||
gantt.attachEvent("onTaskDrag", function(id, mode, task, original, e){
|
||||
var modes = gantt.config.drag_mode;
|
||||
if(mode == modes.move || mode == modes.resize){
|
||||
|
||||
|
||||
if(+task.end_date > +rightLimit){
|
||||
task.end_date = new Date(rightLimit);
|
||||
if(mode == modes.move)
|
||||
task.start_date = new Date(task.end_date - original.duration*(1000*60*60*24));
|
||||
}
|
||||
|
||||
if(+task.start_date < +leftLimit){
|
||||
task.start_date = new Date(leftLimit);
|
||||
if(mode == modes.move)
|
||||
task.end_date = new Date(+task.start_date + original.duration*(1000*60*60*24));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
gantt.parse(tasks);
|
||||
|
||||
</script>
|
||||
</body>
|
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Export data from Gantt</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="http://export.webix.io/gantt" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
|
||||
</style>
|
||||
<body>
|
||||
<input value="Export to PDF" type="button" onclick='gantt.exportToPDF()' style='margin:20px;'>
|
||||
<input value="Export to PNG" type="button" onclick='gantt.exportToPNG()'>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,107 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="../common/docs.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<title>Gantt : Samples</title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class='abstop_header'>
|
||||
<div class='content_area'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="page_header">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='top_webix_logo'></div></a>
|
||||
Samples
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page_space">
|
||||
<div class="webixdoc_page webixdoc_start">
|
||||
<div id="webixContent" class='webixdoc_content'>
|
||||
<div class="webixdoc_content_inner">
|
||||
<div class="webixdoc_breadcrumb nav_breadcrumb">
|
||||
<a href="http://docs.dhtmlx.com/gantt/" class="webixdoc_back">Documentation</a>
|
||||
<a href="../index.html" class="webixdoc_back">Samples</a>
|
||||
<a href='../index.html' class='webixdoc_back'>08 Api</a>
|
||||
</div>
|
||||
<table class='nav_table'>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='../index.html'><div class='nav_back_img'> </div></a>
|
||||
</td><td> <a href='../index.html'>Back</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='01_dnd_events.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='01_dnd_events.html'>D'n'D Events</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='02_constraints.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='02_constraints.html'>Constraints</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='03_validation.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='03_validation.html'>Validation</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='04_limit_project.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='04_limit_project.html'>Fixed project dates</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='05_limit_drag_dates.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='05_limit_drag_dates.html'>Denying dragging tasks out of specific dates</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='width:30px;'>
|
||||
<a href='06_export.html'><div class='nav_page_img'> </div></a>
|
||||
</td><td> <a href='06_export.html'>Export data from Gantt</a> </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Side quick links -->
|
||||
<div class="side_links">
|
||||
<a class="reference_link" href="http://docs.dhtmlx.com/gantt/api__refs__gantt.html">
|
||||
<span>API Reference</span>
|
||||
</a>
|
||||
<a class="sample_link" href="../index.html">
|
||||
<span>Code Samples</span>
|
||||
</a>
|
||||
<a class="forum_link" href="http://forum.dhtmlx.com/viewforum.php?f=15">
|
||||
<span>Developer Forum </span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer_linea"> </div>
|
||||
<div class="footer_lineb">
|
||||
<div class='page_inner_header'>
|
||||
<a href='http://dhtmlx.com'><div class='bottom_webix_block bottom_webix_logo' ></div></a>
|
||||
<div class='copyright bottom_webix_block'>© 2014 Dinamenta, UAB<br>
|
||||
All rights reserved</div>
|
||||
<div class='bottom_webix_also'>
|
||||
<h4>Check also:</h4>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml' target='_blank'>DHTMLX Scheduler</a></li>
|
||||
<li><a href='http://dhtmlx.com/docs/products/dhtmlxSuite/index.shtml' target='_blank'>Other DHTMLX components</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,98 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Calculate working hours</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
.gantt_task_cell.day_end, .gantt_task_cell.no_work_hour.day_start{
|
||||
border-right-color: #C7DFFF;
|
||||
}
|
||||
.gantt_task_cell.week_end.day_end, .gantt_task_cell.week_end.day_start{
|
||||
border-right-color: #E2E1E1;
|
||||
}
|
||||
|
||||
.gantt_task_cell.week_end, .gantt_task_cell.no_work_hour{
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.gantt_task_row.gantt_selected .gantt_task_cell.week_end{
|
||||
background-color: #F8EC9C;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div>
|
||||
<input type="button" value="Show All Scale" onclick='showAll()'/>
|
||||
<input type="button" value="Show work days only" onclick='hideWeekEnds()'/>
|
||||
<input type="button" value="Show office hours" onclick='hideNotWorkingTime()'/>
|
||||
</div>
|
||||
<div id="gantt_here" style='width:100%; height:500px;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.work_time = true;
|
||||
gantt.setWorkTime({hours : [8, 12, 13, 17]});//global working hours. 8:00-12:00, 13:00-17:00
|
||||
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%l, %F %d";
|
||||
gantt.config.min_column_width = 20;
|
||||
gantt.config.duration_unit = "hour";
|
||||
gantt.config.scale_height = 20*3;
|
||||
|
||||
gantt.templates.task_cell_class = function(task, date){
|
||||
var css = [];
|
||||
|
||||
if(date.getHours() == 7){
|
||||
css.push("day_start");
|
||||
}
|
||||
if(date.getHours() == 16){
|
||||
css.push("day_end");
|
||||
}
|
||||
if(!gantt.isWorkTime(date, 'day')){
|
||||
css.push("week_end");
|
||||
}else if(!gantt.isWorkTime(date, 'hour')){
|
||||
css.push("no_work_hour");
|
||||
}
|
||||
|
||||
return css.join(" ");
|
||||
};
|
||||
|
||||
|
||||
|
||||
var weekScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%d %M");
|
||||
var weekNum = gantt.date.date_to_str("(week %W)");
|
||||
var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate) + " " + weekNum(date);
|
||||
};
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"week", step:1, template:weekScaleTemplate},
|
||||
{unit:"hour", step:1, date:"%G"}
|
||||
|
||||
];
|
||||
|
||||
|
||||
function showAll(){
|
||||
gantt.ignore_time = null;
|
||||
gantt.render();
|
||||
}
|
||||
function hideWeekEnds(){
|
||||
gantt.ignore_time = function(date){
|
||||
return !gantt.isWorkTime(date, "day");
|
||||
};
|
||||
gantt.render();
|
||||
}
|
||||
function hideNotWorkingTime(){
|
||||
gantt.ignore_time = function(date){
|
||||
return !gantt.isWorkTime(date);
|
||||
};
|
||||
gantt.render();
|
||||
}
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,59 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Working days as duration</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
|
||||
.gantt_task_cell.week_end{
|
||||
background-color: #EFF5FD;
|
||||
}
|
||||
.gantt_task_row.gantt_selected .gantt_task_cell.week_end{
|
||||
background-color: #F8EC9C;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.work_time = true;
|
||||
|
||||
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%D, %d";
|
||||
gantt.config.min_column_width = 60;
|
||||
gantt.config.duration_unit = "day";
|
||||
gantt.config.scale_height = 20*3;
|
||||
gantt.config.row_height = 30;
|
||||
|
||||
|
||||
|
||||
var weekScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%d %M");
|
||||
var weekNum = gantt.date.date_to_str("(week %W)");
|
||||
var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate) + " " + weekNum(date);
|
||||
};
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"month", step:1, date:"%F, %Y"},
|
||||
{unit:"week", step:1, template:weekScaleTemplate}
|
||||
|
||||
];
|
||||
|
||||
gantt.templates.task_cell_class = function(task, date){
|
||||
if(!gantt.isWorkTime(date))
|
||||
return "week_end";
|
||||
return "";
|
||||
};
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
@ -1,150 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Exclude holidays</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
|
||||
.gantt_task_cell.week_end{
|
||||
background-color: #EFF5FD;
|
||||
}
|
||||
.gantt_task_row.gantt_selected .gantt_task_cell.week_end{
|
||||
background-color: #F8EC9C;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
var holidays = [//USA, DC holidays
|
||||
new Date(2014, 0, 1),
|
||||
new Date(2014, 0, 20),
|
||||
new Date(2014, 1, 17),
|
||||
new Date(2014, 3, 16),
|
||||
new Date(2014, 4, 26),
|
||||
new Date(2014, 6, 4),
|
||||
new Date(2014, 8, 1),
|
||||
new Date(2014, 9, 13),
|
||||
new Date(2014, 10, 11),
|
||||
new Date(2014, 10, 27),
|
||||
new Date(2014, 11, 25)
|
||||
];
|
||||
|
||||
for(var i=0; i < holidays.length; i++){
|
||||
gantt.setWorkTime({
|
||||
date:holidays[i],
|
||||
hours:false
|
||||
});
|
||||
}
|
||||
|
||||
var dateToStr = gantt.date.date_to_str("%d %F");
|
||||
dhtmlx.message("Following holidays are excluded from working time:");
|
||||
for(var i =0; i < holidays.length; i++){
|
||||
setTimeout(
|
||||
(function(i){
|
||||
return function(){
|
||||
dhtmlx.message(dateToStr(holidays[i]))
|
||||
} })(i)
|
||||
,
|
||||
(i+1)*600
|
||||
);
|
||||
}
|
||||
|
||||
gantt.config.work_time = true;
|
||||
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%D, %d";
|
||||
gantt.config.min_column_width = 60;
|
||||
gantt.config.duration_unit = "day";
|
||||
gantt.config.scale_height = 20*3;
|
||||
gantt.config.row_height = 30;
|
||||
|
||||
|
||||
|
||||
gantt.config.start_date = new Date(2014, 0, 1);
|
||||
gantt.config.end_date = new Date(2015, 0, 1);
|
||||
|
||||
|
||||
var weekScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%d %M");
|
||||
var weekNum = gantt.date.date_to_str("(week %W)");
|
||||
var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate) + " " + weekNum(date);
|
||||
};
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"month", step:1, date:"%F, %Y"},
|
||||
{unit:"week", step:1, template:weekScaleTemplate}
|
||||
|
||||
];
|
||||
|
||||
gantt.templates.task_cell_class = function(task, date){
|
||||
if(!gantt.isWorkTime(date))
|
||||
return "week_end";
|
||||
return "";
|
||||
};
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse({
|
||||
"data":[
|
||||
{"id":11, "text":"Project #1", "start_date":"28-03-2014", "duration":"11", "progress": 0.6, "open": true},
|
||||
{"id":1, "text":"Project #2", "start_date":"01-04-2014", "duration":"18", "progress": 0.4, "open": true},
|
||||
|
||||
{"id":2, "text":"Task #1", "start_date":"02-04-2014", "duration":"8", "parent":"1", "progress":0.5, "open": true},
|
||||
{"id":3, "text":"Task #2", "start_date":"11-04-2014", "duration":"8", "parent":"1", "progress": 0.6, "open": true},
|
||||
{"id":4, "text":"Task #3", "start_date":"13-04-2014", "duration":"6", "parent":"1", "progress": 0.5, "open": true},
|
||||
{"id":5, "text":"Task #1.1", "start_date":"02-04-2014", "duration":"7", "parent":"2", "progress": 0.6, "open": true},
|
||||
{"id":6, "text":"Task #1.2", "start_date":"03-04-2014", "duration":"7", "parent":"2", "progress": 0.6, "open": true},
|
||||
{"id":7, "text":"Task #2.1", "start_date":"11-04-2014", "duration":"8", "parent":"3", "progress": 0.6, "open": true},
|
||||
{"id":8, "text":"Task #3.1", "start_date":"14-04-2014", "duration":"5", "parent":"4", "progress": 0.5, "open": true},
|
||||
{"id":9, "text":"Task #3.2", "start_date":"14-04-2014", "duration":"4", "parent":"4", "progress": 0.5, "open": true},
|
||||
{"id":10, "text":"Task #3.3", "start_date":"14-04-2014", "duration":"3", "parent":"4", "progress": 0.5, "open": true},
|
||||
|
||||
{"id":12, "text":"Task #1", "start_date":"03-04-2014", "duration":"5", "parent":"11", "progress": 1, "open": true},
|
||||
{"id":13, "text":"Task #2", "start_date":"02-04-2014", "duration":"7", "parent":"11", "progress": 0.5, "open": true},
|
||||
{"id":14, "text":"Task #3", "start_date":"02-04-2014", "duration":"6", "parent":"11", "progress": 0.8, "open": true},
|
||||
{"id":15, "text":"Task #4", "start_date":"02-04-2014", "duration":"5", "parent":"11", "progress": 0.2, "open": true},
|
||||
{"id":16, "text":"Task #5", "start_date":"02-04-2014", "duration":"7", "parent":"11", "progress": 0, "open": true},
|
||||
|
||||
{"id":17, "text":"Task #2.1", "start_date":"03-04-2014", "duration":"2", "parent":"13", "progress": 1, "open": true},
|
||||
{"id":18, "text":"Task #2.2", "start_date":"06-04-2014", "duration":"3", "parent":"13", "progress": 0.8, "open": true},
|
||||
{"id":19, "text":"Task #2.3", "start_date":"10-04-2014", "duration":"4", "parent":"13", "progress": 0.2, "open": true},
|
||||
{"id":20, "text":"Task #2.4", "start_date":"10-04-2014", "duration":"4", "parent":"13", "progress": 0, "open": true},
|
||||
{"id":21, "text":"Task #4.1", "start_date":"03-04-2014", "duration":"4", "parent":"15", "progress": 0.5, "open": true},
|
||||
{"id":22, "text":"Task #4.2", "start_date":"03-04-2014", "duration":"4", "parent":"15", "progress": 0.1, "open": true},
|
||||
{"id":23, "text":"Task #4.3", "start_date":"03-04-2014", "duration":"5", "parent":"15", "progress": 0, "open": true}
|
||||
],
|
||||
"links":[
|
||||
{"id":"1","source":"1","target":"2","type":"1"},
|
||||
{"id":"2","source":"2","target":"3","type":"0"},
|
||||
{"id":"3","source":"3","target":"4","type":"0"},
|
||||
{"id":"4","source":"2","target":"5","type":"2"},
|
||||
{"id":"5","source":"2","target":"6","type":"2"},
|
||||
{"id":"6","source":"3","target":"7","type":"2"},
|
||||
{"id":"7","source":"4","target":"8","type":"2"},
|
||||
{"id":"8","source":"4","target":"9","type":"2"},
|
||||
{"id":"9","source":"4","target":"10","type":"2"},
|
||||
{"id":"10","source":"11","target":"12","type":"1"},
|
||||
{"id":"11","source":"11","target":"13","type":"1"},
|
||||
{"id":"12","source":"11","target":"14","type":"1"},
|
||||
{"id":"13","source":"11","target":"15","type":"1"},
|
||||
{"id":"14","source":"11","target":"16","type":"1"},
|
||||
{"id":"15","source":"13","target":"17","type":"1"},
|
||||
{"id":"16","source":"17","target":"18","type":"0"},
|
||||
{"id":"17","source":"18","target":"19","type":"0"},
|
||||
{"id":"18","source":"19","target":"20","type":"0"},
|
||||
{"id":"19","source":"15","target":"21","type":"2"},
|
||||
{"id":"20","source":"15","target":"22","type":"2"},
|
||||
{"id":"21","source":"15","target":"23","type":"2"}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
@ -1,95 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Custom working days and time</title>
|
||||
</head>
|
||||
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="../common/testdata.js"></script>
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; padding:0px; margin:0px; overflow: hidden; }
|
||||
|
||||
.gantt_task_cell.no_work_hour{
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.gantt_task_row.gantt_selected .gantt_task_cell.no_work_hour{
|
||||
background-color: #F8EC9C;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
|
||||
<div id="gantt_here" style='width:100%; height:100%;'></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
gantt.config.work_time = true;
|
||||
|
||||
gantt.config.scale_unit = "day";
|
||||
gantt.config.date_scale = "%l, %F %d";
|
||||
gantt.config.min_column_width = 20;
|
||||
gantt.config.duration_unit = "hour";
|
||||
gantt.config.scale_height = 20*3;
|
||||
|
||||
gantt.templates.task_cell_class = function(task, date){
|
||||
if(!gantt.isWorkTime(date, 'hour')){
|
||||
return ("no_work_hour");
|
||||
}
|
||||
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
|
||||
var weekScaleTemplate = function(date){
|
||||
var dateToStr = gantt.date.date_to_str("%d %M");
|
||||
var weekNum = gantt.date.date_to_str("(week %W)");
|
||||
var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
|
||||
return dateToStr(date) + " - " + dateToStr(endDate) + " " + weekNum(date);
|
||||
};
|
||||
|
||||
gantt.config.subscales = [
|
||||
{unit:"week", step:1, template:weekScaleTemplate},
|
||||
{unit:"hour", step:1, date:"%G"}
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
gantt.setWorkTime({hours : [8,17]});//global working hours
|
||||
gantt.setWorkTime({day : 2, hours : false});// make Tuesdays day-off
|
||||
gantt.setWorkTime({day : 5, hours : [8,12]});//Fridays and Saturdays are short days
|
||||
gantt.setWorkTime({day : 6, hours : [8,12]});//Saturdays are also work days
|
||||
gantt.setWorkTime({date : new Date(2013, 2, 31)});//specific working day
|
||||
|
||||
var hints = [
|
||||
"Global working time is: <b>8:00-17:00</b>",
|
||||
"<b>Tuesdays</b> are not working days",
|
||||
"<b>Saturdays</b> are working days",
|
||||
"<b>Saturdays</b> and <b>Fridays</b> are short days",
|
||||
"<b>Sunday, 31th March</b> is working day"
|
||||
];
|
||||
for(var i=0; i < hints.length; i++){
|
||||
setTimeout(
|
||||
(function(i){
|
||||
return function(){
|
||||
dhtmlx.message(hints[i]);
|
||||
} })(i)
|
||||
, (i+1)*600);
|
||||
}
|
||||
|
||||
|
||||
|
||||
gantt.ignore_time = function(date){
|
||||
if(date.getHours() < 8 || date.getHours() > 16){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
gantt.init("gantt_here");
|
||||
gantt.parse(demo_tasks);
|
||||
</script>
|
||||
</body>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user