mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-17 13:33:19 +01:00
193 lines
44 KiB
HTML
193 lines
44 KiB
HTML
|
<!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>
|