Add dhtmlxGantt for gantt charts
933
phpgwapi/js/dhtmlxGantt/codebase/dhtmlxcommon.js
Normal file
@ -0,0 +1,933 @@
|
||||
dhtmlx=function(obj){
|
||||
for (var a in obj) dhtmlx[a]=obj[a];
|
||||
return dhtmlx; //simple singleton
|
||||
};
|
||||
dhtmlx.extend_api=function(name,map,ext){
|
||||
var t = window[name];
|
||||
if (!t) return; //component not defined
|
||||
window[name]=function(obj){
|
||||
if (obj && typeof obj == "object" && !obj.tagName){
|
||||
var that = t.apply(this,(map._init?map._init(obj):arguments));
|
||||
//global settings
|
||||
for (var a in dhtmlx)
|
||||
if (map[a]) this[map[a]](dhtmlx[a]);
|
||||
//local settings
|
||||
for (var a in obj){
|
||||
if (map[a]) this[map[a]](obj[a]);
|
||||
else if (a.indexOf("on")==0){
|
||||
this.attachEvent(a,obj[a]);
|
||||
}
|
||||
}
|
||||
} else
|
||||
var that = t.apply(this,arguments);
|
||||
if (map._patch) map._patch(this);
|
||||
return that||this;
|
||||
};
|
||||
window[name].prototype=t.prototype;
|
||||
if (ext)
|
||||
dhtmlXHeir(window[name].prototype,ext);
|
||||
};
|
||||
|
||||
dhtmlxAjax={
|
||||
get:function(url,callback){
|
||||
var t=new dtmlXMLLoaderObject(true);
|
||||
t.async=(arguments.length<3);
|
||||
t.waitCall=callback;
|
||||
t.loadXML(url)
|
||||
return t;
|
||||
},
|
||||
post:function(url,post,callback){
|
||||
var t=new dtmlXMLLoaderObject(true);
|
||||
t.async=(arguments.length<4);
|
||||
t.waitCall=callback;
|
||||
t.loadXML(url,true,post)
|
||||
return t;
|
||||
},
|
||||
getSync:function(url){
|
||||
return this.get(url,null,true)
|
||||
},
|
||||
postSync:function(url,post){
|
||||
return this.post(url,post,null,true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc: xmlLoader object
|
||||
* @type: private
|
||||
* @param: funcObject - xml parser function
|
||||
* @param: object - jsControl object
|
||||
* @param: async - sync/async mode (async by default)
|
||||
* @param: rSeed - enable/disable random seed ( prevent IE caching)
|
||||
* @topic: 0
|
||||
*/
|
||||
function dtmlXMLLoaderObject(funcObject, dhtmlObject, async, rSeed){
|
||||
this.xmlDoc="";
|
||||
|
||||
if (typeof (async) != "undefined")
|
||||
this.async=async;
|
||||
else
|
||||
this.async=true;
|
||||
|
||||
this.onloadAction=funcObject||null;
|
||||
this.mainObject=dhtmlObject||null;
|
||||
this.waitCall=null;
|
||||
this.rSeed=rSeed||false;
|
||||
return this;
|
||||
};
|
||||
/**
|
||||
* @desc: xml loading handler
|
||||
* @type: private
|
||||
* @param: dtmlObject - xmlLoader object
|
||||
* @topic: 0
|
||||
*/
|
||||
dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject){
|
||||
var once = true;
|
||||
this.check=function (){
|
||||
if ((dhtmlObject)&&(dhtmlObject.onloadAction != null)){
|
||||
if ((!dhtmlObject.xmlDoc.readyState)||(dhtmlObject.xmlDoc.readyState == 4)){
|
||||
if (!once)
|
||||
return;
|
||||
|
||||
once=false; //IE 5 fix
|
||||
if (typeof dhtmlObject.onloadAction == "function")
|
||||
dhtmlObject.onloadAction(dhtmlObject.mainObject, null, null, null, dhtmlObject);
|
||||
|
||||
if (dhtmlObject.waitCall){
|
||||
dhtmlObject.waitCall.call(this,dhtmlObject);
|
||||
dhtmlObject.waitCall=null;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return this.check;
|
||||
};
|
||||
|
||||
/**
|
||||
* @desc: return XML top node
|
||||
* @param: tagName - top XML node tag name (not used in IE, required for Safari and Mozilla)
|
||||
* @type: private
|
||||
* @returns: top XML node
|
||||
* @topic: 0
|
||||
*/
|
||||
dtmlXMLLoaderObject.prototype.getXMLTopNode=function(tagName, oldObj){
|
||||
if (this.xmlDoc.responseXML){
|
||||
var temp = this.xmlDoc.responseXML.getElementsByTagName(tagName);
|
||||
if(temp.length==0 && tagName.indexOf(":")!=-1)
|
||||
var temp = this.xmlDoc.responseXML.getElementsByTagName((tagName.split(":"))[1]);
|
||||
var z = temp[0];
|
||||
} else
|
||||
var z = this.xmlDoc.documentElement;
|
||||
|
||||
if (z){
|
||||
this._retry=false;
|
||||
return z;
|
||||
}
|
||||
|
||||
if ((_isIE)&&(!this._retry)){
|
||||
//fall back to MS.XMLDOM
|
||||
var xmlString = this.xmlDoc.responseText;
|
||||
var oldObj = this.xmlDoc;
|
||||
this._retry=true;
|
||||
this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
|
||||
this.xmlDoc.async=false;
|
||||
this.xmlDoc["loadXM"+"L"](xmlString);
|
||||
|
||||
return this.getXMLTopNode(tagName, oldObj);
|
||||
}
|
||||
dhtmlxError.throwError("LoadXML", "Incorrect XML", [
|
||||
(oldObj||this.xmlDoc),
|
||||
this.mainObject
|
||||
]);
|
||||
|
||||
return document.createElement("DIV");
|
||||
};
|
||||
|
||||
/**
|
||||
* @desc: load XML from string
|
||||
* @type: private
|
||||
* @param: xmlString - xml string
|
||||
* @topic: 0
|
||||
*/
|
||||
dtmlXMLLoaderObject.prototype.loadXMLString=function(xmlString){
|
||||
{
|
||||
try{
|
||||
var parser = new DOMParser();
|
||||
this.xmlDoc=parser.parseFromString(xmlString, "text/xml");
|
||||
}
|
||||
catch (e){
|
||||
this.xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
|
||||
this.xmlDoc.async=this.async;
|
||||
this.xmlDoc["loadXM"+"L"](xmlString);
|
||||
}
|
||||
}
|
||||
|
||||
this.onloadAction(this.mainObject, null, null, null, this);
|
||||
|
||||
if (this.waitCall){
|
||||
this.waitCall();
|
||||
this.waitCall=null;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @desc: load XML
|
||||
* @type: private
|
||||
* @param: filePath - xml file path
|
||||
* @param: postMode - send POST request
|
||||
* @param: postVars - list of vars for post request
|
||||
* @topic: 0
|
||||
*/
|
||||
dtmlXMLLoaderObject.prototype.loadXML=function(filePath, postMode, postVars, rpc){
|
||||
if (this.rSeed)
|
||||
filePath+=((filePath.indexOf("?") != -1) ? "&" : "?")+"a_dhx_rSeed="+(new Date()).valueOf();
|
||||
this.filePath=filePath;
|
||||
|
||||
if ((!_isIE)&&(window.XMLHttpRequest))
|
||||
this.xmlDoc=new XMLHttpRequest();
|
||||
else {
|
||||
if (document.implementation&&document.implementation.createDocument){
|
||||
this.xmlDoc=document.implementation.createDocument("", "", null);
|
||||
this.xmlDoc.onload=new this.waitLoadFunction(this);
|
||||
this.xmlDoc.load(filePath);
|
||||
return;
|
||||
} else
|
||||
this.xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
|
||||
if (this.async)
|
||||
this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);
|
||||
this.xmlDoc.open(postMode ? "POST" : "GET", filePath, this.async);
|
||||
|
||||
if (rpc){
|
||||
this.xmlDoc.setRequestHeader("User-Agent", "dhtmlxRPC v0.1 ("+navigator.userAgent+")");
|
||||
this.xmlDoc.setRequestHeader("Content-type", "text/xml");
|
||||
}
|
||||
|
||||
else if (postMode)
|
||||
this.xmlDoc.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
|
||||
this.xmlDoc.setRequestHeader("X-Requested-With","XMLHttpRequest");
|
||||
this.xmlDoc.send(null||postVars);
|
||||
|
||||
if (!this.async)
|
||||
(new this.waitLoadFunction(this))();
|
||||
};
|
||||
/**
|
||||
* @desc: destructor, cleans used memory
|
||||
* @type: private
|
||||
* @topic: 0
|
||||
*/
|
||||
dtmlXMLLoaderObject.prototype.destructor=function(){
|
||||
this._filterXPath = null;
|
||||
this._getAllNamedChilds = null;
|
||||
this._retry = null;
|
||||
this.async = null;
|
||||
this.rSeed = null;
|
||||
this.filePath = null;
|
||||
this.onloadAction = null;
|
||||
this.mainObject = null;
|
||||
this.xmlDoc = null;
|
||||
this.doXPath = null;
|
||||
this.doXPathOpera = null;
|
||||
this.doXSLTransToObject = null;
|
||||
this.doXSLTransToString = null;
|
||||
this.loadXML = null;
|
||||
this.loadXMLString = null;
|
||||
// this.waitLoadFunction = null;
|
||||
this.doSerialization = null;
|
||||
this.xmlNodeToJSON = null;
|
||||
this.getXMLTopNode = null;
|
||||
this.setXSLParamValue = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
dtmlXMLLoaderObject.prototype.xmlNodeToJSON = function(node){
|
||||
var t={};
|
||||
for (var i=0; i<node.attributes.length; i++)
|
||||
t[node.attributes[i].name]=node.attributes[i].value;
|
||||
t["_tagvalue"]=node.firstChild?node.firstChild.nodeValue:"";
|
||||
for (var i=0; i<node.childNodes.length; i++){
|
||||
var name=node.childNodes[i].tagName;
|
||||
if (name){
|
||||
if (!t[name]) t[name]=[];
|
||||
t[name].push(this.xmlNodeToJSON(node.childNodes[i]));
|
||||
}
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc: Call wrapper
|
||||
* @type: private
|
||||
* @param: funcObject - action handler
|
||||
* @param: dhtmlObject - user data
|
||||
* @returns: function handler
|
||||
* @topic: 0
|
||||
*/
|
||||
function callerFunction(funcObject, dhtmlObject){
|
||||
this.handler=function(e){
|
||||
if (!e)
|
||||
e=window.event;
|
||||
funcObject(e, dhtmlObject);
|
||||
return true;
|
||||
};
|
||||
return this.handler;
|
||||
};
|
||||
|
||||
/**
|
||||
* @desc: Calculate absolute position of html object
|
||||
* @type: private
|
||||
* @param: htmlObject - html object
|
||||
* @topic: 0
|
||||
*/
|
||||
function getAbsoluteLeft(htmlObject){
|
||||
return getOffset(htmlObject).left;
|
||||
}
|
||||
/**
|
||||
* @desc: Calculate absolute position of html object
|
||||
* @type: private
|
||||
* @param: htmlObject - html object
|
||||
* @topic: 0
|
||||
*/
|
||||
function getAbsoluteTop(htmlObject){
|
||||
return getOffset(htmlObject).top;
|
||||
}
|
||||
|
||||
function getOffsetSum(elem) {
|
||||
var top=0, left=0;
|
||||
while(elem) {
|
||||
top = top + parseInt(elem.offsetTop);
|
||||
left = left + parseInt(elem.offsetLeft);
|
||||
elem = elem.offsetParent;
|
||||
}
|
||||
return {top: top, left: left};
|
||||
}
|
||||
function getOffsetRect(elem) {
|
||||
var box = elem.getBoundingClientRect();
|
||||
var body = document.body;
|
||||
var docElem = document.documentElement;
|
||||
var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;
|
||||
var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;
|
||||
var clientTop = docElem.clientTop || body.clientTop || 0;
|
||||
var clientLeft = docElem.clientLeft || body.clientLeft || 0;
|
||||
var top = box.top + scrollTop - clientTop;
|
||||
var left = box.left + scrollLeft - clientLeft;
|
||||
return { top: Math.round(top), left: Math.round(left) };
|
||||
}
|
||||
function getOffset(elem) {
|
||||
if (elem.getBoundingClientRect) {
|
||||
return getOffsetRect(elem);
|
||||
} else {
|
||||
return getOffsetSum(elem);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc: Convert string to it boolean representation
|
||||
* @type: private
|
||||
* @param: inputString - string for covertion
|
||||
* @topic: 0
|
||||
*/
|
||||
function convertStringToBoolean(inputString){
|
||||
if (typeof (inputString) == "string")
|
||||
inputString=inputString.toLowerCase();
|
||||
|
||||
switch (inputString){
|
||||
case "1":
|
||||
case "true":
|
||||
case "yes":
|
||||
case "y":
|
||||
case 1:
|
||||
case true:
|
||||
return true;
|
||||
break;
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc: find out what symbol to use as url param delimiters in further params
|
||||
* @type: private
|
||||
* @param: str - current url string
|
||||
* @topic: 0
|
||||
*/
|
||||
function getUrlSymbol(str){
|
||||
if (str.indexOf("?") != -1)
|
||||
return "&"
|
||||
else
|
||||
return "?"
|
||||
}
|
||||
|
||||
function dhtmlDragAndDropObject(){
|
||||
if (window.dhtmlDragAndDrop)
|
||||
return window.dhtmlDragAndDrop;
|
||||
|
||||
this.lastLanding=0;
|
||||
this.dragNode=0;
|
||||
this.dragStartNode=0;
|
||||
this.dragStartObject=0;
|
||||
this.tempDOMU=null;
|
||||
this.tempDOMM=null;
|
||||
this.waitDrag=0;
|
||||
window.dhtmlDragAndDrop=this;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
dhtmlDragAndDropObject.prototype.removeDraggableItem=function(htmlNode){
|
||||
htmlNode.onmousedown=null;
|
||||
htmlNode.dragStarter=null;
|
||||
htmlNode.dragLanding=null;
|
||||
}
|
||||
dhtmlDragAndDropObject.prototype.addDraggableItem=function(htmlNode, dhtmlObject){
|
||||
htmlNode.onmousedown=this.preCreateDragCopy;
|
||||
htmlNode.dragStarter=dhtmlObject;
|
||||
this.addDragLanding(htmlNode, dhtmlObject);
|
||||
}
|
||||
dhtmlDragAndDropObject.prototype.addDragLanding=function(htmlNode, dhtmlObject){
|
||||
htmlNode.dragLanding=dhtmlObject;
|
||||
}
|
||||
dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e){
|
||||
if ((e||window.event) && (e||event).button == 2)
|
||||
return;
|
||||
|
||||
if (window.dhtmlDragAndDrop.waitDrag){
|
||||
window.dhtmlDragAndDrop.waitDrag=0;
|
||||
document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;
|
||||
document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;
|
||||
return false;
|
||||
}
|
||||
|
||||
window.dhtmlDragAndDrop.waitDrag=1;
|
||||
window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;
|
||||
window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;
|
||||
window.dhtmlDragAndDrop.dragStartNode=this;
|
||||
window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;
|
||||
document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;
|
||||
document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;
|
||||
window.dhtmlDragAndDrop.downtime = new Date().valueOf();
|
||||
|
||||
|
||||
if ((e)&&(e.preventDefault)){
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
dhtmlDragAndDropObject.prototype.callDrag=function(e){
|
||||
if (!e)
|
||||
e=window.event;
|
||||
dragger=window.dhtmlDragAndDrop;
|
||||
if ((new Date()).valueOf()-dragger.downtime<100) return;
|
||||
|
||||
if ((e.button == 0)&&(_isIE))
|
||||
return dragger.stopDrag();
|
||||
|
||||
if (!dragger.dragNode&&dragger.waitDrag){
|
||||
dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode, e);
|
||||
|
||||
if (!dragger.dragNode)
|
||||
return dragger.stopDrag();
|
||||
|
||||
dragger.dragNode.onselectstart=function(){return false;}
|
||||
dragger.gldragNode=dragger.dragNode;
|
||||
document.body.appendChild(dragger.dragNode);
|
||||
document.body.onmouseup=dragger.stopDrag;
|
||||
dragger.waitDrag=0;
|
||||
dragger.dragNode.pWindow=window;
|
||||
dragger.initFrameRoute();
|
||||
}
|
||||
|
||||
if (dragger.dragNode.parentNode != window.document.body){
|
||||
var grd = dragger.gldragNode;
|
||||
|
||||
if (dragger.gldragNode.old)
|
||||
grd=dragger.gldragNode.old;
|
||||
|
||||
//if (!document.all) dragger.calculateFramePosition();
|
||||
grd.parentNode.removeChild(grd);
|
||||
var oldBody = dragger.dragNode.pWindow;
|
||||
|
||||
if (grd.pWindow && grd.pWindow.dhtmlDragAndDrop.lastLanding)
|
||||
grd.pWindow.dhtmlDragAndDrop.lastLanding.dragLanding._dragOut(grd.pWindow.dhtmlDragAndDrop.lastLanding);
|
||||
|
||||
// var oldp=dragger.dragNode.parentObject;
|
||||
if (_isIE){
|
||||
var div = document.createElement("Div");
|
||||
div.innerHTML=dragger.dragNode.outerHTML;
|
||||
dragger.dragNode=div.childNodes[0];
|
||||
} else
|
||||
dragger.dragNode=dragger.dragNode.cloneNode(true);
|
||||
|
||||
dragger.dragNode.pWindow=window;
|
||||
// dragger.dragNode.parentObject=oldp;
|
||||
|
||||
dragger.gldragNode.old=dragger.dragNode;
|
||||
document.body.appendChild(dragger.dragNode);
|
||||
oldBody.dhtmlDragAndDrop.dragNode=dragger.dragNode;
|
||||
}
|
||||
|
||||
dragger.dragNode.style.left=e.clientX+15+(dragger.fx
|
||||
? dragger.fx*(-1)
|
||||
: 0)
|
||||
+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";
|
||||
dragger.dragNode.style.top=e.clientY+3+(dragger.fy
|
||||
? dragger.fy*(-1)
|
||||
: 0)
|
||||
+(document.body.scrollTop||document.documentElement.scrollTop)+"px";
|
||||
|
||||
if (!e.srcElement)
|
||||
var z = e.target;
|
||||
else
|
||||
z=e.srcElement;
|
||||
dragger.checkLanding(z, e);
|
||||
}
|
||||
|
||||
dhtmlDragAndDropObject.prototype.calculateFramePosition=function(n){
|
||||
//this.fx = 0, this.fy = 0;
|
||||
if (window.name){
|
||||
var el = parent.frames[window.name].frameElement.offsetParent;
|
||||
var fx = 0;
|
||||
var fy = 0;
|
||||
|
||||
while (el){
|
||||
fx+=el.offsetLeft;
|
||||
fy+=el.offsetTop;
|
||||
el=el.offsetParent;
|
||||
}
|
||||
|
||||
if ((parent.dhtmlDragAndDrop)){
|
||||
var ls = parent.dhtmlDragAndDrop.calculateFramePosition(1);
|
||||
fx+=ls.split('_')[0]*1;
|
||||
fy+=ls.split('_')[1]*1;
|
||||
}
|
||||
|
||||
if (n)
|
||||
return fx+"_"+fy;
|
||||
else
|
||||
this.fx=fx;
|
||||
this.fy=fy;
|
||||
}
|
||||
return "0_0";
|
||||
}
|
||||
dhtmlDragAndDropObject.prototype.checkLanding=function(htmlObject, e){
|
||||
if ((htmlObject)&&(htmlObject.dragLanding)){
|
||||
if (this.lastLanding)
|
||||
this.lastLanding.dragLanding._dragOut(this.lastLanding);
|
||||
this.lastLanding=htmlObject;
|
||||
this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding, this.dragStartNode, e.clientX,
|
||||
e.clientY, e);
|
||||
this.lastLanding_scr=(_isIE ? e.srcElement : e.target);
|
||||
} else {
|
||||
if ((htmlObject)&&(htmlObject.tagName != "BODY"))
|
||||
this.checkLanding(htmlObject.parentNode, e);
|
||||
else {
|
||||
if (this.lastLanding)
|
||||
this.lastLanding.dragLanding._dragOut(this.lastLanding, e.clientX, e.clientY, e);
|
||||
this.lastLanding=0;
|
||||
|
||||
if (this._onNotFound)
|
||||
this._onNotFound();
|
||||
}
|
||||
}
|
||||
}
|
||||
dhtmlDragAndDropObject.prototype.stopDrag=function(e, mode){
|
||||
dragger=window.dhtmlDragAndDrop;
|
||||
|
||||
if (!mode){
|
||||
dragger.stopFrameRoute();
|
||||
var temp = dragger.lastLanding;
|
||||
dragger.lastLanding=null;
|
||||
|
||||
if (temp)
|
||||
temp.dragLanding._drag(dragger.dragStartNode, dragger.dragStartObject, temp, (_isIE
|
||||
? event.srcElement
|
||||
: e.target));
|
||||
}
|
||||
dragger.lastLanding=null;
|
||||
|
||||
if ((dragger.dragNode)&&(dragger.dragNode.parentNode == document.body))
|
||||
dragger.dragNode.parentNode.removeChild(dragger.dragNode);
|
||||
dragger.dragNode=0;
|
||||
dragger.gldragNode=0;
|
||||
dragger.fx=0;
|
||||
dragger.fy=0;
|
||||
dragger.dragStartNode=0;
|
||||
dragger.dragStartObject=0;
|
||||
document.body.onmouseup=dragger.tempDOMU;
|
||||
document.body.onmousemove=dragger.tempDOMM;
|
||||
dragger.tempDOMU=null;
|
||||
dragger.tempDOMM=null;
|
||||
dragger.waitDrag=0;
|
||||
}
|
||||
|
||||
dhtmlDragAndDropObject.prototype.stopFrameRoute=function(win){
|
||||
if (win)
|
||||
window.dhtmlDragAndDrop.stopDrag(1, 1);
|
||||
|
||||
for (var i = 0; i < window.frames.length; i++){
|
||||
try{
|
||||
if ((window.frames[i] != win)&&(window.frames[i].dhtmlDragAndDrop))
|
||||
window.frames[i].dhtmlDragAndDrop.stopFrameRoute(window);
|
||||
} catch(e){}
|
||||
}
|
||||
|
||||
try{
|
||||
if ((parent.dhtmlDragAndDrop)&&(parent != window)&&(parent != win))
|
||||
parent.dhtmlDragAndDrop.stopFrameRoute(window);
|
||||
} catch(e){}
|
||||
}
|
||||
dhtmlDragAndDropObject.prototype.initFrameRoute=function(win, mode){
|
||||
if (win){
|
||||
window.dhtmlDragAndDrop.preCreateDragCopy();
|
||||
window.dhtmlDragAndDrop.dragStartNode=win.dhtmlDragAndDrop.dragStartNode;
|
||||
window.dhtmlDragAndDrop.dragStartObject=win.dhtmlDragAndDrop.dragStartObject;
|
||||
window.dhtmlDragAndDrop.dragNode=win.dhtmlDragAndDrop.dragNode;
|
||||
window.dhtmlDragAndDrop.gldragNode=win.dhtmlDragAndDrop.dragNode;
|
||||
window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;
|
||||
window.waitDrag=0;
|
||||
|
||||
if (((!_isIE)&&(mode))&&((!_isFF)||(_FFrv < 1.8)))
|
||||
window.dhtmlDragAndDrop.calculateFramePosition();
|
||||
}
|
||||
try{
|
||||
if ((parent.dhtmlDragAndDrop)&&(parent != window)&&(parent != win))
|
||||
parent.dhtmlDragAndDrop.initFrameRoute(window);
|
||||
}catch(e){}
|
||||
|
||||
for (var i = 0; i < window.frames.length; i++){
|
||||
try{
|
||||
if ((window.frames[i] != win)&&(window.frames[i].dhtmlDragAndDrop))
|
||||
window.frames[i].dhtmlDragAndDrop.initFrameRoute(window, ((!win||mode) ? 1 : 0));
|
||||
} catch(e){}
|
||||
}
|
||||
}
|
||||
|
||||
var _isFF = false;
|
||||
var _isIE = false;
|
||||
var _isOpera = false;
|
||||
var _isKHTML = false;
|
||||
var _isMacOS = false;
|
||||
var _isChrome = false;
|
||||
|
||||
if (navigator.userAgent.indexOf('Macintosh') != -1)
|
||||
_isMacOS=true;
|
||||
|
||||
|
||||
if (navigator.userAgent.toLowerCase().indexOf('chrome')>-1)
|
||||
_isChrome=true;
|
||||
|
||||
if ((navigator.userAgent.indexOf('Safari') != -1)||(navigator.userAgent.indexOf('Konqueror') != -1)){
|
||||
var _KHTMLrv = parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Safari')+7, 5));
|
||||
|
||||
if (_KHTMLrv > 525){ //mimic FF behavior for Safari 3.1+
|
||||
_isFF=true;
|
||||
var _FFrv = 1.9;
|
||||
} else
|
||||
_isKHTML=true;
|
||||
} else if (navigator.userAgent.indexOf('Opera') != -1){
|
||||
_isOpera=true;
|
||||
_OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Opera')+6, 3));
|
||||
}
|
||||
|
||||
|
||||
else if (navigator.appName.indexOf("Microsoft") != -1){
|
||||
_isIE=true;
|
||||
if (navigator.appVersion.indexOf("MSIE 8.0")!= -1 && document.compatMode != "BackCompat") _isIE=8;
|
||||
} else {
|
||||
_isFF=true;
|
||||
var _FFrv = parseFloat(navigator.userAgent.split("rv:")[1])
|
||||
}
|
||||
|
||||
|
||||
//multibrowser Xpath processor
|
||||
dtmlXMLLoaderObject.prototype.doXPath=function(xpathExp, docObj, namespace, result_type){
|
||||
if (_isKHTML || (!_isIE && !window.XPathResult))
|
||||
return this.doXPathOpera(xpathExp, docObj);
|
||||
|
||||
if (_isIE){ //IE
|
||||
if (!docObj)
|
||||
if (!this.xmlDoc.nodeName)
|
||||
docObj=this.xmlDoc.responseXML
|
||||
else
|
||||
docObj=this.xmlDoc;
|
||||
|
||||
if (!docObj)
|
||||
dhtmlxError.throwError("LoadXML", "Incorrect XML", [
|
||||
(docObj||this.xmlDoc),
|
||||
this.mainObject
|
||||
]);
|
||||
|
||||
if (namespace != null)
|
||||
docObj.setProperty("SelectionNamespaces", "xmlns:xsl='"+namespace+"'"); //
|
||||
|
||||
if (result_type == 'single'){
|
||||
return docObj.selectSingleNode(xpathExp);
|
||||
}
|
||||
else {
|
||||
return docObj.selectNodes(xpathExp)||new Array(0);
|
||||
}
|
||||
} else { //Mozilla
|
||||
var nodeObj = docObj;
|
||||
|
||||
if (!docObj){
|
||||
if (!this.xmlDoc.nodeName){
|
||||
docObj=this.xmlDoc.responseXML
|
||||
}
|
||||
else {
|
||||
docObj=this.xmlDoc;
|
||||
}
|
||||
}
|
||||
|
||||
if (!docObj)
|
||||
dhtmlxError.throwError("LoadXML", "Incorrect XML", [
|
||||
(docObj||this.xmlDoc),
|
||||
this.mainObject
|
||||
]);
|
||||
|
||||
if (docObj.nodeName.indexOf("document") != -1){
|
||||
nodeObj=docObj;
|
||||
}
|
||||
else {
|
||||
nodeObj=docObj;
|
||||
docObj=docObj.ownerDocument;
|
||||
}
|
||||
var retType = XPathResult.ANY_TYPE;
|
||||
|
||||
if (result_type == 'single')
|
||||
retType=XPathResult.FIRST_ORDERED_NODE_TYPE
|
||||
var rowsCol = new Array();
|
||||
var col = docObj.evaluate(xpathExp, nodeObj, function(pref){
|
||||
return namespace
|
||||
}, retType, null);
|
||||
|
||||
if (retType == XPathResult.FIRST_ORDERED_NODE_TYPE){
|
||||
return col.singleNodeValue;
|
||||
}
|
||||
var thisColMemb = col.iterateNext();
|
||||
|
||||
while (thisColMemb){
|
||||
rowsCol[rowsCol.length]=thisColMemb;
|
||||
thisColMemb=col.iterateNext();
|
||||
}
|
||||
return rowsCol;
|
||||
}
|
||||
}
|
||||
|
||||
function _dhtmlxError(type, name, params){
|
||||
if (!this.catches)
|
||||
this.catches=new Array();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
_dhtmlxError.prototype.catchError=function(type, func_name){
|
||||
this.catches[type]=func_name;
|
||||
}
|
||||
_dhtmlxError.prototype.throwError=function(type, name, params){
|
||||
if (this.catches[type])
|
||||
return this.catches[type](type, name, params);
|
||||
|
||||
if (this.catches["ALL"])
|
||||
return this.catches["ALL"](type, name, params);
|
||||
|
||||
alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);
|
||||
return null;
|
||||
}
|
||||
|
||||
window.dhtmlxError=new _dhtmlxError();
|
||||
|
||||
|
||||
//opera fake, while 9.0 not released
|
||||
//multibrowser Xpath processor
|
||||
dtmlXMLLoaderObject.prototype.doXPathOpera=function(xpathExp, docObj){
|
||||
//this is fake for Opera
|
||||
var z = xpathExp.replace(/[\/]+/gi, "/").split('/');
|
||||
var obj = null;
|
||||
var i = 1;
|
||||
|
||||
if (!z.length)
|
||||
return [];
|
||||
|
||||
if (z[0] == ".")
|
||||
obj=[docObj]; else if (z[0] == ""){
|
||||
obj=(this.xmlDoc.responseXML||this.xmlDoc).getElementsByTagName(z[i].replace(/\[[^\]]*\]/g, ""));
|
||||
i++;
|
||||
} else
|
||||
return [];
|
||||
|
||||
for (i; i < z.length; i++)obj=this._getAllNamedChilds(obj, z[i]);
|
||||
|
||||
if (z[i-1].indexOf("[") != -1)
|
||||
obj=this._filterXPath(obj, z[i-1]);
|
||||
return obj;
|
||||
}
|
||||
|
||||
dtmlXMLLoaderObject.prototype._filterXPath=function(a, b){
|
||||
var c = new Array();
|
||||
var b = b.replace(/[^\[]*\[\@/g, "").replace(/[\[\]\@]*/g, "");
|
||||
|
||||
for (var i = 0; i < a.length; i++)
|
||||
if (a[i].getAttribute(b))
|
||||
c[c.length]=a[i];
|
||||
|
||||
return c;
|
||||
}
|
||||
dtmlXMLLoaderObject.prototype._getAllNamedChilds=function(a, b){
|
||||
var c = new Array();
|
||||
|
||||
if (_isKHTML)
|
||||
b=b.toUpperCase();
|
||||
|
||||
for (var i = 0; i < a.length; i++)for (var j = 0; j < a[i].childNodes.length; j++){
|
||||
if (_isKHTML){
|
||||
if (a[i].childNodes[j].tagName&&a[i].childNodes[j].tagName.toUpperCase() == b)
|
||||
c[c.length]=a[i].childNodes[j];
|
||||
}
|
||||
|
||||
else if (a[i].childNodes[j].tagName == b)
|
||||
c[c.length]=a[i].childNodes[j];
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
function dhtmlXHeir(a, b){
|
||||
for (var c in b)
|
||||
if (typeof (b[c]) == "function")
|
||||
a[c]=b[c];
|
||||
return a;
|
||||
}
|
||||
|
||||
function dhtmlxEvent(el, event, handler){
|
||||
if (el.addEventListener)
|
||||
el.addEventListener(event, handler, false);
|
||||
|
||||
else if (el.attachEvent)
|
||||
el.attachEvent("on"+event, handler);
|
||||
}
|
||||
|
||||
//============= XSL Extension ===================================
|
||||
|
||||
dtmlXMLLoaderObject.prototype.xslDoc=null;
|
||||
dtmlXMLLoaderObject.prototype.setXSLParamValue=function(paramName, paramValue, xslDoc){
|
||||
if (!xslDoc)
|
||||
xslDoc=this.xslDoc
|
||||
|
||||
if (xslDoc.responseXML)
|
||||
xslDoc=xslDoc.responseXML;
|
||||
var item =
|
||||
this.doXPath("/xsl:stylesheet/xsl:variable[@name='"+paramName+"']", xslDoc,
|
||||
"http:/\/www.w3.org/1999/XSL/Transform", "single");
|
||||
|
||||
if (item != null)
|
||||
item.firstChild.nodeValue=paramValue
|
||||
}
|
||||
dtmlXMLLoaderObject.prototype.doXSLTransToObject=function(xslDoc, xmlDoc){
|
||||
if (!xslDoc)
|
||||
xslDoc=this.xslDoc;
|
||||
|
||||
if (xslDoc.responseXML)
|
||||
xslDoc=xslDoc.responseXML
|
||||
|
||||
if (!xmlDoc)
|
||||
xmlDoc=this.xmlDoc;
|
||||
|
||||
if (xmlDoc.responseXML)
|
||||
xmlDoc=xmlDoc.responseXML
|
||||
|
||||
//MOzilla
|
||||
if (!_isIE){
|
||||
if (!this.XSLProcessor){
|
||||
this.XSLProcessor=new XSLTProcessor();
|
||||
this.XSLProcessor.importStylesheet(xslDoc);
|
||||
}
|
||||
var result = this.XSLProcessor.transformToDocument(xmlDoc);
|
||||
} else {
|
||||
var result = new ActiveXObject("Msxml2.DOMDocument.3.0");
|
||||
try{
|
||||
xmlDoc.transformNodeToObject(xslDoc, result);
|
||||
}catch(e){
|
||||
result = xmlDoc.transformNode(xslDoc);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
dtmlXMLLoaderObject.prototype.doXSLTransToString=function(xslDoc, xmlDoc){
|
||||
var res = this.doXSLTransToObject(xslDoc, xmlDoc);
|
||||
if(typeof(res)=="string")
|
||||
return res;
|
||||
return this.doSerialization(res);
|
||||
}
|
||||
|
||||
dtmlXMLLoaderObject.prototype.doSerialization=function(xmlDoc){
|
||||
if (!xmlDoc)
|
||||
xmlDoc=this.xmlDoc;
|
||||
if (xmlDoc.responseXML)
|
||||
xmlDoc=xmlDoc.responseXML
|
||||
if (!_isIE){
|
||||
var xmlSerializer = new XMLSerializer();
|
||||
return xmlSerializer.serializeToString(xmlDoc);
|
||||
} else
|
||||
return xmlDoc.xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc:
|
||||
* @type: private
|
||||
*/
|
||||
dhtmlxEventable=function(obj){
|
||||
obj.attachEvent=function(name, catcher, callObj){
|
||||
name='ev_'+name.toLowerCase();
|
||||
if (!this[name])
|
||||
this[name]=new this.eventCatcher(callObj||this);
|
||||
|
||||
return(name+':'+this[name].addEvent(catcher)); //return ID (event name & event ID)
|
||||
}
|
||||
obj.callEvent=function(name, arg0){
|
||||
name='ev_'+name.toLowerCase();
|
||||
if (this[name])
|
||||
return this[name].apply(this, arg0);
|
||||
return true;
|
||||
}
|
||||
obj.checkEvent=function(name){
|
||||
return (!!this['ev_'+name.toLowerCase()])
|
||||
}
|
||||
obj.eventCatcher=function(obj){
|
||||
var dhx_catch = [];
|
||||
var z = function(){
|
||||
var res = true;
|
||||
for (var i = 0; i < dhx_catch.length; i++){
|
||||
if (dhx_catch[i] != null){
|
||||
var zr = dhx_catch[i].apply(obj, arguments);
|
||||
res=res&&zr;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
z.addEvent=function(ev){
|
||||
if (typeof (ev) != "function")
|
||||
ev=eval(ev);
|
||||
if (ev)
|
||||
return dhx_catch.push(ev)-1;
|
||||
return false;
|
||||
}
|
||||
z.removeEvent=function(id){
|
||||
dhx_catch[id]=null;
|
||||
}
|
||||
return z;
|
||||
}
|
||||
obj.detachEvent=function(id){
|
||||
if (id != false){
|
||||
var list = id.split(':'); //get EventName and ID
|
||||
this[list[0]].removeEvent(list[1]); //remove event
|
||||
}
|
||||
}
|
||||
obj.detachAllEvents = function(){
|
||||
for (var name in this){
|
||||
if (name.indexOf("ev_")==0)
|
||||
delete this[name];
|
||||
}
|
||||
}
|
||||
}
|
15
phpgwapi/js/dhtmlxGantt/codebase/dhtmlxgantt.css
Normal file
@ -0,0 +1,15 @@
|
||||
.taskPanelBorder{border-width: 2px 2px 2px 2px;border-style:solid;border-color: #737373;}
|
||||
.taskName{font-family: Tahoma, Arial; font-weight: bold;font-size: 11px;color: #FFFFFF;cursor: pointer;white-space: nowrap;}
|
||||
.moveInfo{font-family: Tahoma, Arial;font-size: 10px;color:#006600;white-space: nowrap;}
|
||||
.descTask{font-family: Tahoma, Arial;font-size: 10px;color:#276F9E;cursor: default;white-space: nowrap;}
|
||||
.descProject{font-family: Tahoma, Arial;font-size: 10px;color:#006600;cursor: default;white-space: nowrap;}
|
||||
.dayNumber, .monthName{font-family:Tahoma,Arial;font-weight:bold;font-size:9px;color:#858585;text-align:center;vertical-align:middle;}
|
||||
.monthName {border-top:1px solid #f1f3f1; border-bottom:1px solid #f1f3f1; border-left:1px solid #f1f3f1;text-align:left;padding-left:5px;}
|
||||
.poPupInfo{background: #FFFFFF;width : 170px;border: 1px dotted #279e00;padding: 4px 6px 4px 6px;float: left;}
|
||||
.poPupTime{background: #FFFFFF;border: 1px dotted #279e00;height : 25px;width : 70px;position: absolute;z-index:2;}
|
||||
.contextMenu{z-index:10;width:150px;cursor:pointer;font-family: Tahoma, Arial;font-size:12px;color:#7D7D7D;border: 1px solid #808080;}
|
||||
.taskNameItem{font-family: Tahoma, Arial;font-size: 11px;font-weight: normal;color: #7D7D7D;}
|
||||
.panelErrors{;padding: 4px 6px 4px 6px;font-family: Tahoma, Arial;font-size: 12px;color: red;white-space: nowrap;}
|
||||
.st {font-family: Arial, Helvetica, Sans-serif; font-size: 10px; font-weight: normal; color: #688060;}
|
||||
.ut {font-family: Arial, Helvetica, Sans-serif; font-size: 11px; font-weight: normal; color: #323232;}
|
||||
.lt {font-family: Arial, Helvetica, Sans-serif; font-size: 11px; font-weight: normal; color: #323232; padding: 0px 0px 0px 14px; margin: 0px; display: block;}
|
384
phpgwapi/js/dhtmlxGantt/codebase/dhtmlxgantt.js
Normal file
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/arr.gif
Normal file
After Width: | Height: | Size: 162 B |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/bg.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/bg_week.png
Normal file
After Width: | Height: | Size: 275 B |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/menu/menu_bg.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/menu/menu_selection.png
Normal file
After Width: | Height: | Size: 600 B |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/menu/window_tr.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/minus.gif
Normal file
After Width: | Height: | Size: 121 B |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/parentnode_filled.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/plus.gif
Normal file
After Width: | Height: | Size: 124 B |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/progress_bg.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
phpgwapi/js/dhtmlxGantt/codebase/imgs/progress_filled.png
Normal file
After Width: | Height: | Size: 186 B |
107
phpgwapi/js/dhtmlxGantt/index.html
Normal file
@ -0,0 +1,107 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Gantt Chart</title>
|
||||
<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 language="JavaScript" type="text/javascript">
|
||||
/*<![CDATA[*/
|
||||
function createChartControl(htmlDiv1)
|
||||
{
|
||||
//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);
|
||||
|
||||
var ganttChartControl = new GanttChart();
|
||||
ganttChartControl.setImagePath("codebase/imgs/");
|
||||
ganttChartControl.setEditable(true);
|
||||
|
||||
ganttChartControl.addProject(project1);
|
||||
ganttChartControl.addProject(project2);
|
||||
|
||||
ganttChartControl.create(htmlDiv1);
|
||||
}
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body {font-size:12px}
|
||||
.{font-family:arial;font-size:12px}
|
||||
h1 {cursor:hand;font-size:16px;margin-left:10px;line-height:10px}
|
||||
xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
|
||||
.hdr{
|
||||
background-color:lightgrey;
|
||||
margin-bottom:10px;
|
||||
padding-left:10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body onload="createChartControl('GanttDiv');">
|
||||
|
||||
<div class="hdr">DHTML Gantt sample</div>
|
||||
|
||||
<h1>Initialize object on page</h1>
|
||||
<p>You can place this JavaScript Gantt Chart anywhere on your web page, attaching it
|
||||
to any div object.<br>
|
||||
</p>
|
||||
|
||||
|
||||
<XMP>
|
||||
<div style="width:950px;height:620px;position:absolute" id="GanttDiv"></div>
|
||||
<script>
|
||||
var gantt = new GanttChart();
|
||||
gantt.setImagePath("codebase/imgs/");
|
||||
gantt.setEditable(true);
|
||||
...
|
||||
gantt.addProject(project_1);
|
||||
...
|
||||
gantt.create("GanttDiv");
|
||||
</script>
|
||||
</XMP>
|
||||
|
||||
<br>
|
||||
<div style="width:950px;height:620px;position:absolute;" id="GanttDiv"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -0,0 +1,193 @@
|
||||
<!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>
|
@ -0,0 +1,189 @@
|
||||
<!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>
|
@ -0,0 +1,187 @@
|
||||
<!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>
|
45
phpgwapi/js/dhtmlxGantt/samples/01_initialization/index.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!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>Initialization</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>Initialization</h3>
|
||||
</div>
|
||||
<ul class="topics samples">
|
||||
<li><a href='./1_readonly.html'>Read-only Gantt</a></li><li><a href='./2_withtree.html'>Gantt with tree</a></li><li><a href='./3_hidden_descr.html'>Chart with hidden descriptions</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>
|
95
phpgwapi/js/dhtmlxGantt/samples/02_data_load/3_loadxml.html
Normal file
@ -0,0 +1,95 @@
|
||||
<!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>
|
296
phpgwapi/js/dhtmlxGantt/samples/02_data_load/4_save.html
Normal file
@ -0,0 +1,296 @@
|
||||
<!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>
|
@ -0,0 +1,25 @@
|
||||
#!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;
|
@ -0,0 +1,69 @@
|
||||
#!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;
|
@ -0,0 +1,36 @@
|
||||
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.
|
143
phpgwapi/js/dhtmlxGantt/samples/02_data_load/data/data.xml
Normal file
@ -0,0 +1,143 @@
|
||||
<?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>
|
@ -0,0 +1,2 @@
|
||||
<?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>
|
45
phpgwapi/js/dhtmlxGantt/samples/02_data_load/index.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!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>
|
10
phpgwapi/js/dhtmlxGantt/samples/02_data_load/php/loadXML.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$file = realpath('..') . '\\' . $_GET['path'];
|
||||
|
||||
if (file_exists($file)) {
|
||||
header('Content-type: text/xml');
|
||||
readfile($file);
|
||||
}
|
||||
|
||||
?>
|
12
phpgwapi/js/dhtmlxGantt/samples/02_data_load/php/saveXML.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
$filename = $_POST['filename'];
|
||||
$data = $_POST['data'];
|
||||
|
||||
$file = realpath('..') . '\\save\\' . $filename;
|
||||
|
||||
$f = fopen($file, 'w');
|
||||
fwrite($f, $data);
|
||||
fclose($f);
|
||||
|
||||
?>
|
197
phpgwapi/js/dhtmlxGantt/samples/03_printing/5_print.html
Normal file
@ -0,0 +1,197 @@
|
||||
<!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>
|
45
phpgwapi/js/dhtmlxGantt/samples/03_printing/index.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!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>
|
234
phpgwapi/js/dhtmlxGantt/samples/04_menu/6_menu.html
Normal file
@ -0,0 +1,234 @@
|
||||
<!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>
|
45
phpgwapi/js/dhtmlxGantt/samples/04_menu/index.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!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>
|
484
phpgwapi/js/dhtmlxGantt/samples/common/css/style.css
Normal file
@ -0,0 +1,484 @@
|
||||
/* MAIN STYLES */
|
||||
|
||||
html {
|
||||
overflow-x:hidden;
|
||||
border: none;
|
||||
}
|
||||
|
||||
body {
|
||||
margin:1px;
|
||||
color:#666;
|
||||
font-family: Tahoma, Arial, Helvetica, Tahoma, serif;
|
||||
font-size:12px;
|
||||
overflow-x:hidden;
|
||||
}
|
||||
|
||||
h5 {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
a {
|
||||
font-family: Tahoma, Arial, Helvetica, serif;
|
||||
font-size:12px;
|
||||
color: #058cb6;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
a.navigation img {
|
||||
margin-bottom:-5px;
|
||||
padding-right:5px;
|
||||
border:none;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-bottom:30px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color:#000;
|
||||
font-family: Tahoma, Arial, Helvetica, serif;
|
||||
font-size:21px;
|
||||
font-weight:normal;
|
||||
padding-bottom:37px;
|
||||
margin-top:35px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
display:inline-block;
|
||||
width:100%;
|
||||
color:#B5B5B5;
|
||||
font-family: Arial, Helvetica, Tahoma, serif;
|
||||
font-size:20px;
|
||||
font-weight:normal;
|
||||
padding-bottom:20px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
color:#666;
|
||||
font-family: Tahoma, Arial, Helvetica, Tahoma, serif;
|
||||
font-size:13px;
|
||||
padding:4px 0 10px 0;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.column {
|
||||
float:left;
|
||||
width:24%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* HEADER */
|
||||
|
||||
.header {
|
||||
width:100%;
|
||||
height: 100px;
|
||||
background:url("../img/head_bg.png");
|
||||
}
|
||||
|
||||
a.logo {
|
||||
display:block;
|
||||
margin-left:48px;
|
||||
height:100px;
|
||||
width:100px;
|
||||
background-image:url("../img/logo.png");
|
||||
float:left;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.tittle-dhtmlx {
|
||||
padding: 29px 0 0 121px;
|
||||
font-family:arial, serif;
|
||||
font-size:16px;
|
||||
color:white;
|
||||
float:left;
|
||||
cursor:default;
|
||||
}
|
||||
|
||||
/* Search */
|
||||
|
||||
.search-field {
|
||||
position:absolute;
|
||||
float:right;
|
||||
right:67px;
|
||||
top:30px;
|
||||
min-width: 430px;
|
||||
}
|
||||
|
||||
.search-field input {
|
||||
float:left;
|
||||
width:351px;
|
||||
height:20px;
|
||||
background: white url("../img/search-field.png");
|
||||
border: none;
|
||||
}
|
||||
|
||||
.search-field input:hover {
|
||||
background-position:0 -20px;
|
||||
}
|
||||
|
||||
input.button {
|
||||
cursor:pointer;
|
||||
margin-left:7px;
|
||||
float:left;
|
||||
width:70px;
|
||||
height:20px;
|
||||
background: white url("../img/search-button.png");
|
||||
border: 0;
|
||||
}
|
||||
|
||||
input.button:hover {
|
||||
background-position:0 -20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* BUTTONS */
|
||||
|
||||
.buttons {
|
||||
position:absolute;
|
||||
width: 154px;
|
||||
height: 24px;
|
||||
left: 55px;
|
||||
top:80px;
|
||||
}
|
||||
|
||||
.buttons a.doc {
|
||||
display:block;
|
||||
height:24px;
|
||||
width:93px;
|
||||
background-image:url("../img/doc-button.png");
|
||||
float:left;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.buttons a.doc_inact {
|
||||
display:block;
|
||||
height:24px;
|
||||
width:92px;
|
||||
background-image:url("../img/doc-button_inact.png");
|
||||
float:left;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.buttons a.doc_inact:hover {
|
||||
background-position:0 -24px;
|
||||
}
|
||||
|
||||
.buttons a.sample {
|
||||
display:block;
|
||||
height:24px;
|
||||
width:62px;
|
||||
background-image:url("../img/samples-but.png");
|
||||
float:left;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.buttons a.sample_inact {
|
||||
display:block;
|
||||
height:24px;
|
||||
width:55px;
|
||||
background-image:url("../img/samples-but_inact.png");
|
||||
float:left;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.buttons a.sample_inact:hover {
|
||||
background-position:0 -24px;
|
||||
}
|
||||
|
||||
|
||||
/* CONTENT */
|
||||
|
||||
.content {
|
||||
margin: 30px 63px 0 63px;
|
||||
}
|
||||
|
||||
.content li {
|
||||
list-style:none;
|
||||
height:22px;
|
||||
}
|
||||
|
||||
li img {
|
||||
margin-bottom:-5px;
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
.line {
|
||||
margin: 0;
|
||||
padding: 1px;
|
||||
background: url("../img/border-dotted.gif") repeat-x top;
|
||||
}
|
||||
|
||||
|
||||
/* NAVIGATION */
|
||||
|
||||
.navigation-div {
|
||||
display:block;
|
||||
height:35px;
|
||||
width:100%;
|
||||
margin-bottom:20px;
|
||||
}
|
||||
|
||||
a.navigation {
|
||||
outline:none;
|
||||
float:left;
|
||||
display:block;
|
||||
height:25px;
|
||||
padding: 2px 10px 0 5px;
|
||||
border: solid 1px #cccccc;
|
||||
}
|
||||
|
||||
a.navigation:hover {
|
||||
background-color: #eaeff4;
|
||||
border-color: #6699CC;
|
||||
text-decoration:none;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
a.navigation img {
|
||||
margin-bottom:-5px;
|
||||
padding-right:5px;
|
||||
border:none;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
float:left;
|
||||
height:23px;
|
||||
background:url("../img/arrow.gif");
|
||||
margin: 3px 3px;
|
||||
width:8px;
|
||||
}
|
||||
|
||||
a.view-source {
|
||||
border: dashed 1px #cccccc;
|
||||
}
|
||||
|
||||
|
||||
/* LOGOS */
|
||||
|
||||
.big_logo {
|
||||
display:block;
|
||||
width:200px;
|
||||
height:54px;
|
||||
overflow:hidden;
|
||||
line-height:1000px;
|
||||
margin: 40px 0 20px 0;
|
||||
}
|
||||
|
||||
.logo_grid{
|
||||
background:transparent url("../img/logo_grid.gif") no-repeat;
|
||||
}
|
||||
.logo_treegrid{
|
||||
background:transparent url("../img/logo_treegrid.gif") no-repeat;
|
||||
}
|
||||
.logo_tree{
|
||||
background:transparent url("../img/logo_tree.gif") no-repeat;
|
||||
}
|
||||
.logo_layout{
|
||||
background:transparent url("../img/logo_layout.gif") no-repeat;
|
||||
}
|
||||
.logo_menu{
|
||||
background:transparent url("../img/logo_menu.gif") no-repeat;
|
||||
}
|
||||
.logo_toolbar{
|
||||
background:transparent url("../img/logo_toolbar.gif") no-repeat;
|
||||
}
|
||||
.logo_windows{
|
||||
background:transparent url("../img/logo_windows.gif") no-repeat;
|
||||
}
|
||||
.logo_calendar{
|
||||
background:transparent url("../img/logo_calendar.gif") no-repeat;
|
||||
}
|
||||
.logo_slider{
|
||||
background:transparent url("../img/logo_slider.gif") no-repeat;
|
||||
}
|
||||
.logo_scheduler{
|
||||
background:transparent url("../img/logo_scheduler.gif") no-repeat;
|
||||
}
|
||||
.logo_colorpicker{
|
||||
background:transparent url("../img/logo_colorpicker.gif") no-repeat;
|
||||
}
|
||||
.logo_combo{
|
||||
background:transparent url("../img/logo_combo.gif") no-repeat;
|
||||
}
|
||||
.logo_tabbar{
|
||||
background:transparent url("../img/logo_tabbar.gif") no-repeat;
|
||||
}
|
||||
.logo_accordion{
|
||||
background:transparent url("../img/logo_accordion.gif") no-repeat;
|
||||
}
|
||||
.logo_folders{
|
||||
background:transparent url("../img/logo_folders.gif") no-repeat;
|
||||
}
|
||||
.logo_editor{
|
||||
background:transparent url("../img/logo_editor.gif") no-repeat;
|
||||
}
|
||||
.logo_ajax{
|
||||
background:transparent url("../img/logo_ajax.gif") no-repeat;
|
||||
}
|
||||
.logo_gantt{
|
||||
background:transparent url("../img/logo_gantt.gif") no-repeat;
|
||||
}
|
||||
.logo_chart{
|
||||
background:transparent url("../img/logo_chart.gif") no-repeat;
|
||||
}
|
||||
.logo_dataview{
|
||||
background:transparent url("../img/logo_dataview.gif") no-repeat;
|
||||
}
|
||||
.logo_form{
|
||||
background:transparent url("../img/logo_form.gif") no-repeat;
|
||||
}
|
||||
|
||||
/* Topics */
|
||||
|
||||
.topics li {
|
||||
background:url("../icons/old.gif") no-repeat;
|
||||
padding-left: 25px;
|
||||
line-height:22px;
|
||||
}
|
||||
|
||||
.samples li {
|
||||
background:url("../icons/file.gif") no-repeat;
|
||||
}
|
||||
|
||||
ul.list {
|
||||
margin-left:40px;
|
||||
}
|
||||
|
||||
.list li {
|
||||
list-style-image:url("../icons/bullet.gif");
|
||||
}
|
||||
|
||||
.component-demo-placeholder {
|
||||
width:602px;
|
||||
height:252px;
|
||||
background:url("../img/grid-placeholder.gif");
|
||||
}
|
||||
|
||||
|
||||
/* FOOTER */
|
||||
|
||||
.footer {
|
||||
display:block;
|
||||
float:left;
|
||||
width:100%;
|
||||
height:64px;
|
||||
background: white url("../img/border-dotted-ccc.gif") repeat-x;
|
||||
}
|
||||
|
||||
.footer-logo {
|
||||
float:left;
|
||||
width:55px;
|
||||
height:24px;
|
||||
background:url("../img/footer-logo.gif");
|
||||
margin: 20px 20px 20px 63px;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
float:left;
|
||||
margin-top:18px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
/* CODE */
|
||||
|
||||
.source {
|
||||
width:100%;
|
||||
background:url("../img/source-bg.gif");
|
||||
border-top: dashed 3px #ccc;
|
||||
border-bottom: dotted 1px #ccc;
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
.code {
|
||||
margin:20px 63px;
|
||||
}
|
||||
|
||||
.teg {
|
||||
height:40px;
|
||||
color:#ccc;
|
||||
font-size:30px;
|
||||
font-family: Tahoma, Arial, Helvetica, Tahoma, serif;
|
||||
background:url("../img/source.gif") no-repeat 0 22px;
|
||||
padding: 10px 0 0 63px;
|
||||
}
|
||||
|
||||
/*colorizer*/
|
||||
|
||||
|
||||
.hl-default {
|
||||
color: Black;
|
||||
}
|
||||
.hl-code {
|
||||
color: Gray;
|
||||
}
|
||||
.hl-brackets {
|
||||
color: Olive;
|
||||
}
|
||||
.hl-comment {
|
||||
color: Orange;
|
||||
}
|
||||
.hl-quotes {
|
||||
color: Darkred;
|
||||
}
|
||||
.hl-string {
|
||||
color: Red;
|
||||
}
|
||||
|
||||
.hl-identifier {
|
||||
color: Blue;
|
||||
}
|
||||
|
||||
.hl-identifier a{
|
||||
font-family: "Courier New";
|
||||
font-size: 11px;
|
||||
color: Blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hl-builtin {
|
||||
color: Teal;
|
||||
}
|
||||
.hl-reserved {
|
||||
color: Green;
|
||||
}
|
||||
.hl-inlinedoc {
|
||||
color: Blue;
|
||||
}
|
||||
.hl-var {
|
||||
color: Darkblue;
|
||||
}
|
||||
.hl-url {
|
||||
color: Blue;
|
||||
}
|
||||
.hl-special {
|
||||
color: Navy;
|
||||
}
|
||||
.hl-number {
|
||||
color: Maroon;
|
||||
}
|
||||
.hl-inlinetags {
|
||||
color: Blue;
|
||||
}
|
||||
.hl-main {
|
||||
background: transparent;
|
||||
}
|
||||
.hl-gutter {
|
||||
background-color: #999999;
|
||||
color: White
|
||||
}
|
||||
.hl-table {
|
||||
font-family: "Courier New";
|
||||
font-size: 12px;
|
||||
border: solid 1px lightgray;
|
||||
}
|
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/accordion.gif
Normal file
After Width: | Height: | Size: 394 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/ajax.gif
Normal file
After Width: | Height: | Size: 371 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/arrow.gif
Normal file
After Width: | Height: | Size: 185 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/bullet.gif
Normal file
After Width: | Height: | Size: 51 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/calendar.gif
Normal file
After Width: | Height: | Size: 207 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/chart.gif
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/chm.gif
Normal file
After Width: | Height: | Size: 671 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/colorpicker.gif
Normal file
After Width: | Height: | Size: 352 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/combo.gif
Normal file
After Width: | Height: | Size: 186 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/connector.gif
Normal file
After Width: | Height: | Size: 635 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/dataprocessor.gif
Normal file
After Width: | Height: | Size: 173 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/dataview.gif
Normal file
After Width: | Height: | Size: 222 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/editor.gif
Normal file
After Width: | Height: | Size: 280 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/file.gif
Normal file
After Width: | Height: | Size: 622 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/file_link.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/folders.gif
Normal file
After Width: | Height: | Size: 637 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/form.gif
Normal file
After Width: | Height: | Size: 153 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/gantt.gif
Normal file
After Width: | Height: | Size: 1010 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/grid.gif
Normal file
After Width: | Height: | Size: 191 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/layout.gif
Normal file
After Width: | Height: | Size: 635 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/menu.gif
Normal file
After Width: | Height: | Size: 270 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/none.gif
Normal file
After Width: | Height: | Size: 45 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/old.gif
Normal file
After Width: | Height: | Size: 388 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/pdf.gif
Normal file
After Width: | Height: | Size: 646 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/scheduler.gif
Normal file
After Width: | Height: | Size: 432 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/slider.gif
Normal file
After Width: | Height: | Size: 363 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/source.gif
Normal file
After Width: | Height: | Size: 333 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/tabbar.gif
Normal file
After Width: | Height: | Size: 258 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/toolbar.gif
Normal file
After Width: | Height: | Size: 243 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/tree.gif
Normal file
After Width: | Height: | Size: 261 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/treegrid.gif
Normal file
After Width: | Height: | Size: 322 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/vault.gif
Normal file
After Width: | Height: | Size: 262 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/icons/windows.gif
Normal file
After Width: | Height: | Size: 267 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/6_IE_inside2.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/Thumbs.db
Normal file
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/arrow.gif
Normal file
After Width: | Height: | Size: 59 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/bookmark.gif
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/border-dotted-ccc.gif
Normal file
After Width: | Height: | Size: 44 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/border-dotted.gif
Normal file
After Width: | Height: | Size: 44 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/bullet.gif
Normal file
After Width: | Height: | Size: 51 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/doc-button.png
Normal file
After Width: | Height: | Size: 607 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/doc-button_inact.png
Normal file
After Width: | Height: | Size: 916 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/footer-bg.gif
Normal file
After Width: | Height: | Size: 43 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/footer-logo.gif
Normal file
After Width: | Height: | Size: 501 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/grid-placeholder.gif
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/head_bg.png
Normal file
After Width: | Height: | Size: 250 B |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_accordion.gif
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_ajax.gif
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_calendar.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_chart.gif
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_colorpicker.gif
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_combo.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_connector.gif
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_dataview.gif
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_editor.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_folders.gif
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_form.gif
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_gantt.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_grid.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_layout.gif
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_menu.gif
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
phpgwapi/js/dhtmlxGantt/samples/common/img/logo_scheduler.gif
Normal file
After Width: | Height: | Size: 2.3 KiB |