Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsgantt-improved

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsgantt-improved - npm Package Compare versions

Comparing version 1.8.7 to 1.8.8

demo/demo.png

692

demo/fixes/data.json

@@ -1,340 +0,352 @@

[{
"pID": 1,
"pName": "Define Chart API",
"pStart": "",
"pEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 0,
"pGroup": 1,
"pParent": 0,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": "Some Notes text"
},
{
"pID": 11,
"pName": "Chart Object",
"pStart": "2017-02-20",
"pEnd": "2017-02-20",
"pClass": "gmilestone",
"pLink": "",
"pMile": 1,
"pRes": "Shlomy",
"pComp": 100,
"pGroup": 0,
"pParent": 1,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 12,
"pName": "Task Objects",
"pStart": "",
"pEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Shlomy",
"pComp": 40,
"pGroup": 1,
"pParent": 1,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 121,
"pName": "Constructor Proc #1234 of February 2017",
"pStart": "2017-02-21",
"pEnd": "2017-03-09",
"pClass": "gtaskblue",
"pLink": "",
"pMile": 0,
"pRes": "Brian T.",
"pComp": 60,
"pGroup": 0,
"pParent": 12,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 122,
"pName": "Task Variables",
"pStart": "2017-03-06",
"pEnd": "2017-03-11",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 12,
"pOpen": 1,
"pDepend": 121,
"pCaption": "",
"pNotes": ""
},
{
"pID": 123,
"pName": "Task by Minute/Hour",
"pStart": "2017-03-09",
"pEnd": "2017-03-14 12: 00",
"pClass": "gtaskyellow",
"pLink": "",
"pMile": 0,
"pRes": "Ilan",
"pComp": 60,
"pGroup": 0,
"pParent": 12,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 124,
"pName": "Task Functions",
"pStart": "2017-03-09",
"pEnd": "2017-03-29",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes":"Anyone",
"pComp":60,
"pGroup": 0,
"pParent": 12,
"pOpen": 1,
"pDepend": "123SS",
"pCaption": "This is a caption",
"pNotes": null
},
{
"pID": 2,
"pName": "Create HTML Shell",
"pStart": "2017-03-24",
"pEnd": "2017-03-24",
"pClass": "gtaskyellow",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 20,
"pGroup": 0,
"pParent": 0,
"pOpen": 1,
"pDepend": 122,
"pCaption": "",
"pNotes": ""
},
{
"pID": 3,
"pName": "Code Javascript",
"pStart": "",
"pEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 0,
"pGroup": 1,
"pParent": 0,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 31,
"pName": "Define Variables",
"pStart": "2017-02-25",
"pEnd": "2017-03-17",
"pClass": "gtaskpurple",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 30,
"pGroup": 0,
"pParent": 3,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 32,
"pName": "Calculate Chart Size",
"pStart": "2017-03-15",
"pEnd": "2017-03-24",
"pClass": "gtaskgreen",
"pLink": "",
"pMile": 0,
"pRes": "Shlomy",
"pComp": 40,
"pGroup": 0,
"pParent": 3,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 33,
"pName": "Draw Task Items",
"pStart": "",
"pEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Someone",
"pComp": 40,
"pGroup": 2,
"pParent": 3,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 332,
"pName": "Task Label Table",
"pStart": "2017-03-06",
"pEnd": "2017-03-09",
"pClass": "gtaskblue",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 33,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 333,
"pName": "Task Scrolling Grid",
"pStart": "2017-03-11",
"pEnd": "2017-03-20",
"pClass": "gtaskblue",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 0,
"pGroup": 0,
"pParent": 33,
"pOpen": 1,
"pDepend": "332",
"pCaption": "",
"pNotes": ""
},
{
"pID": 34,
"pName": "Draw Task Bars",
"pStart": "",
"pEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Anybody",
"pComp": 60,
"pGroup": 1,
"pParent": 3,
"pOpen": 0,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 341,
"pName": "Loop each Task",
"pStart": "2017-03-26",
"pEnd": "2017-04-11",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 34,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 342,
"pName": "Calculate Start/Stop",
"pStart": "2017-04-12",
"pEnd": "2017-05-18",
"pClass": "gtaskpink",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 34,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 343,
"pName": "Draw Task Div",
"pStart": "2017-05-13",
"pEnd": "2017-05-17",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 34,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 344,
"pName": "Draw Completion Div",
"pStart": "2017-05-17",
"pEnd": "2017-06-04",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 34,
"pOpen": 1,
"pDepend": "342,343",
"pCaption": "",
"pNotes": ""
},
{
"pID": 35,
"pName": "Make Updates",
"pStart": "2017-07-17",
"pEnd": "2017-09-04",
"pClass": "gtaskpurple",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 30,
"pGroup": 0,
"pParent": 3,
"pOpen": 1,
"pDepend": "333",
"pCaption": "",
"pNotes": ""
}]
[
{
"pID": 1,
"pName": "Define Chart API",
"pStart": "",
"pEnd": "",
"pPlanStart": "",
"pPlanEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 0,
"pGroup": 1,
"pParent": 0,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": "Some Notes text"
},
{
"pID": 11,
"pName": "Chart Object",
"pStart": "2017-02-20",
"pEnd": "2017-02-20",
"pClass": "gmilestone",
"pLink": "",
"pMile": 1,
"pRes": "Shlomy",
"pComp": 100,
"pGroup": 0,
"pParent": 1,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 12,
"pName": "Task Objects",
"pStart": "",
"pEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Shlomy",
"pComp": 40,
"pGroup": 1,
"pParent": 1,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 121,
"pName": "Constructor Proc #1234 of February 2017",
"pStart": "2017-02-21",
"pEnd": "2017-03-09",
"pClass": "gtaskblue",
"pLink": "",
"pMile": 0,
"pRes": "Brian T.",
"pComp": 60,
"pGroup": 0,
"pParent": 12,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 122,
"pName": "Task Variables",
"pStart": "2017-03-06",
"pEnd": "2017-03-11",
"pPlanStart": "2017-03-03",
"pPlanEnd": "2017-03-09",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 12,
"pOpen": 1,
"pDepend": 121,
"pCaption": "",
"pNotes": ""
},
{
"pID": 123,
"pName": "Task by Minute/Hour",
"pStart": "2017-03-09",
"pEnd": "2017-03-14 12:00",
"pPlanStart": "2017-03-01",
"pPlanEnd": "2017-03-15 12:00",
"pClass": "gtaskyellow",
"pLink": "",
"pMile": 0,
"pRes": "Ilan",
"pComp": 60,
"pGroup": 0,
"pParent": 12,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": "",
"pCost": 1000
},
{
"pID": 124,
"pName": "Task Functions",
"pStart": "2017-03-09",
"pEnd": "2017-03-29",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes": "Anyone",
"pComp": 60,
"pGroup": 0,
"pParent": 12,
"pOpen": 1,
"pDepend": "123SS",
"pCaption": "This is a caption",
"pNotes": null,
"pCost": 34
},
{
"pID": 2,
"pName": "Create HTML Shell",
"pStart": "2017-03-24",
"pEnd": "2017-03-24",
"pClass": "gtaskyellow",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 20,
"pGroup": 0,
"pParent": 0,
"pOpen": 1,
"pDepend": 122,
"pCaption": "",
"pNotes": ""
},
{
"pID": 3,
"pName": "Code Javascript",
"pStart": "",
"pEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 0,
"pGroup": 1,
"pParent": 0,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 31,
"pName": "Define Variables",
"pStart": "2017-02-25",
"pEnd": "2017-03-17",
"pPlanStart": "2017-04-01",
"pPlanEnd": "2017-04-15 12:00",
"pClass": "gtaskpurple",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 30,
"pGroup": 0,
"pParent": 3,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 32,
"pName": "Calculate Chart Size",
"pStart": "2017-03-15",
"pEnd": "2017-03-24",
"pClass": "gtaskgreen",
"pLink": "",
"pMile": 0,
"pRes": "Shlomy",
"pComp": 40,
"pGroup": 0,
"pParent": 3,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 33,
"pName": "Draw Task Items",
"pStart": "",
"pEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Someone",
"pComp": 40,
"pGroup": 2,
"pParent": 3,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 332,
"pName": "Task Label Table",
"pStart": "2017-03-06",
"pEnd": "2017-03-09",
"pClass": "gtaskblue",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 33,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 333,
"pName": "Task Scrolling Grid",
"pStart": "2017-03-11",
"pEnd": "2017-03-20",
"pClass": "gtaskblue",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 0,
"pGroup": 0,
"pParent": 33,
"pOpen": 1,
"pDepend": "332",
"pCaption": "",
"pNotes": ""
},
{
"pID": 34,
"pName": "Draw Task Bars",
"pStart": "",
"pEnd": "",
"pClass": "ggroupblack",
"pLink": "",
"pMile": 0,
"pRes": "Anybody",
"pComp": 60,
"pGroup": 1,
"pParent": 3,
"pOpen": 0,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 341,
"pName": "Loop each Task",
"pStart": "2017-03-26",
"pEnd": "2017-04-11",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 34,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 342,
"pName": "Calculate Start/Stop",
"pStart": "2017-04-12",
"pEnd": "2017-05-18",
"pClass": "gtaskpink",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 34,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 343,
"pName": "Draw Task Div",
"pStart": "2017-05-13",
"pEnd": "2017-05-17",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 34,
"pOpen": 1,
"pDepend": "",
"pCaption": "",
"pNotes": ""
},
{
"pID": 344,
"pName": "Draw Completion Div",
"pStart": "2017-05-17",
"pEnd": "2017-06-04",
"pClass": "gtaskred",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 60,
"pGroup": 0,
"pParent": 34,
"pOpen": 1,
"pDepend": "342,343",
"pCaption": "",
"pNotes": ""
},
{
"pID": 35,
"pName": "Make Updates",
"pStart": "2017-07-17",
"pEnd": "2017-09-04",
"pClass": "gtaskpurple",
"pLink": "",
"pMile": 0,
"pRes": "Brian",
"pComp": 30,
"pGroup": 0,
"pParent": 3,
"pOpen": 1,
"pDepend": "333",
"pCaption": "",
"pNotes": ""
}
]

@@ -27,2 +27,5 @@ "use strict";

this.vShowEndDate = 1;
this.vShowPlanStartDate = 0;
this.vShowCost = 0;
this.vShowPlanEndDate = 0;
this.vShowEndWeekDate = 1;

@@ -262,2 +265,5 @@ this.vShowTaskInfoRes = 1;

var vTaskWidth = 1;
var vTaskPlanLeftPx = 0;
var vTaskPlanRightPx = 0;
var vTaskPlanWidth = 1;
var vNumCols = 0;

@@ -315,2 +321,8 @@ var vNumRows = 0;

this.newNode(vTmpRow, 'td', null, 'gspanning genddate', '\u00A0');
if (this.vShowPlanStartDate == 1)
this.newNode(vTmpRow, 'td', null, 'gspanning gstartdate', '\u00A0');
if (this.vShowPlanEndDate == 1)
this.newNode(vTmpRow, 'td', null, 'gspanning gplanenddate', '\u00A0');
if (this.vShowCost == 1)
this.newNode(vTmpRow, 'td', null, 'gspanning gcost', '\u00A0');
vTmpRow = this.newNode(vTmpTBody, 'tr');

@@ -329,2 +341,8 @@ this.newNode(vTmpRow, 'td', null, 'gtasklist', '\u00A0');

this.newNode(vTmpRow, 'td', null, 'gtaskheading genddate', this.vLangs[this.vLang]['enddate']);
if (this.vShowPlanStartDate == 1)
this.newNode(vTmpRow, 'td', null, 'gtaskheading gplanstartdate', this.vLangs[this.vLang]['planstartdate']);
if (this.vShowPlanEndDate == 1)
this.newNode(vTmpRow, 'td', null, 'gtaskheading gplanenddate', this.vLangs[this.vLang]['planenddate']);
if (this.vShowCost == 1)
this.newNode(vTmpRow, 'td', null, 'gtaskheading gcost', this.vLangs[this.vLang]['cost']);
var vLeftTable = document.createDocumentFragment();

@@ -384,2 +402,16 @@ var vTmpDiv2 = this.newNode(vLeftTable, 'div', this.vDivId + 'glistbody', 'glistgrid gcontainercol');

}
if (this.vShowPlanStartDate == 1) {
vTmpCell = this.newNode(vTmpRow, 'td', null, 'gplanstartdate');
var v = this.vTaskList[i].getPlanStart() ? utils_1.formatDateStr(this.vTaskList[i].getPlanStart(), this.vDateTaskTableDisplayFormat, this.vLangs[this.vLang]) : '';
vTmpDiv = this.newNode(vTmpCell, 'div', null, null, v);
}
if (this.vShowPlanEndDate == 1) {
vTmpCell = this.newNode(vTmpRow, 'td', null, 'gplanenddate');
var v = this.vTaskList[i].getPlanEnd() ? utils_1.formatDateStr(this.vTaskList[i].getPlanEnd(), this.vDateTaskTableDisplayFormat, this.vLangs[this.vLang]) : '';
vTmpDiv = this.newNode(vTmpCell, 'div', null, null, v);
}
if (this.vShowCost == 1) {
vTmpCell = this.newNode(vTmpRow, 'td', null, 'gcost');
vTmpDiv = this.newNode(vTmpCell, 'div', null, null, this.vTaskList[i].getCost());
}
vNumRows++;

@@ -403,2 +435,6 @@ }

this.newNode(vTmpRow, 'td', null, 'gspanning genddate', '\u00A0');
if (this.vShowPlanStartDate == 1)
this.newNode(vTmpRow, 'td', null, 'gspanning gplanstartdate', '\u00A0');
if (this.vShowPlanEndDate == 1)
this.newNode(vTmpRow, 'td', null, 'gspanning gplanenddate', '\u00A0');
// Add some white space so the vertical scroll distance should always be greater

@@ -535,2 +571,3 @@ // than for the right pane (keep to a minimum as it is seen in unconstrained height designs)

vTaskLeftPx = (vNumCols * (vColWidth + 1)) + 1;
vTaskPlanLeftPx = (vNumCols * (vColWidth + 1)) + 1;
if (this.vUseSingleCell != 0 && this.vUseSingleCell < (vNumCols * vNumRows))

@@ -557,2 +594,14 @@ vSingleCell = true;

vTaskRightPx = utils_1.getOffset(curTaskStart, curTaskEnd, vColWidth, this.vFormat);
var curTaskPlanStart = void 0, curTaskPlanEnd = void 0;
curTaskPlanStart = this.vTaskList[i].getPlanStart();
curTaskPlanEnd = this.vTaskList[i].getPlanEnd();
if (curTaskPlanStart && curTaskPlanEnd) {
if ((curTaskPlanEnd.getTime() - (curTaskPlanEnd.getTimezoneOffset() * 60000)) % (86400000) == 0)
curTaskPlanEnd = new Date(curTaskPlanEnd.getFullYear(), curTaskPlanEnd.getMonth(), curTaskPlanEnd.getDate() + 1, curTaskPlanEnd.getHours(), curTaskPlanEnd.getMinutes(), curTaskPlanEnd.getSeconds()); // add 1 day here to simplify calculations below
vTaskPlanLeftPx = utils_1.getOffset(vMinDate, curTaskPlanStart, vColWidth, this.vFormat);
vTaskPlanRightPx = utils_1.getOffset(curTaskPlanStart, curTaskPlanEnd, vColWidth, this.vFormat);
}
else {
vTaskPlanLeftPx = vTaskPlanRightPx = 0;
}
vID = this.vTaskList[i].getID();

@@ -629,6 +678,11 @@ var vComb = (this.vTaskList[i].getParItem() && this.vTaskList[i].getParItem().getGroup() == 2);

vTaskWidth = (vTaskWidth <= 0) ? 1 : vTaskWidth;
/**
* DRAW THE BOXES FOR GANTT
*/
var vTmpDivCell = void 0;
if (vComb) {
vTmpDiv = this.vTaskList[i].getParItem().getCellDiv();
vTmpDivCell = vTmpDiv = this.vTaskList[i].getParItem().getCellDiv();
}
else {
// Draw Task Bar which has colored bar div
vTmpRow = this.newNode(vTmpTBody, 'tr', this.vDivId + 'childrow_' + vID, 'glineitem gitem' + this.vFormat, null, null, null, ((this.vTaskList[i].getVisible() == 0) ? 'none' : null));

@@ -638,5 +692,5 @@ this.vTaskList[i].setChildRow(vTmpRow);

vTmpCell = this.newNode(vTmpRow, 'td', null, 'gtaskcell');
vTmpDiv = this.newNode(vTmpCell, 'div', null, 'gtaskcelldiv', '\u00A0\u00A0');
vTmpDivCell = vTmpDiv = this.newNode(vTmpCell, 'div', null, 'gtaskcelldiv', '\u00A0\u00A0');
}
// Draw Task Bar which has colored bar div, and opaque completion div
// draw the lines for dependecies
vTmpDiv = this.newNode(vTmpDiv, 'div', this.vDivId + 'bardiv_' + vID, 'gtaskbarcontainer', null, vTaskWidth, vTaskLeftPx);

@@ -646,3 +700,10 @@ this.vTaskList[i].setBarDiv(vTmpDiv);

this.vTaskList[i].setTaskDiv(vTmpDiv2);
// PLANNED
if (vTaskPlanLeftPx) { // vTaskPlanRightPx vTaskPlanLeftPx
var vTmpPlanDiv = this.newNode(vTmpDivCell, 'div', this.vDivId + 'bardiv_' + vID, 'gtaskbarcontainer gplan', null, vTaskPlanRightPx, vTaskPlanLeftPx);
var vTmpDiv3 = this.newNode(vTmpPlanDiv, 'div', this.vDivId + 'taskbar_' + vID, this.vTaskList[i].getClass() + ' gplan', null, vTaskPlanRightPx);
}
// and opaque completion div
this.newNode(vTmpDiv2, 'div', this.vDivId + 'complete_' + vID, this.vTaskList[i].getClass() + 'complete', null, this.vTaskList[i].getCompStr());
// caption
if (vComb)

@@ -652,2 +713,3 @@ vTmpItem = this.vTaskList[i].getParItem();

vCaptClass = 'gcaption';
// Background cells
if (!vSingleCell && !vComb) {

@@ -683,4 +745,4 @@ vCellFormat = '';

}
// Add Task Info div for tooltip
if (this.vTaskList[i].getTaskDiv() && vTmpDiv) {
// Add Task Info div for tooltip
vTmpDiv2 = this.newNode(vTmpDiv, 'div', this.vDivId + 'tt' + vID, null, null, null, null, 'none');

@@ -687,0 +749,0 @@ vTmpDiv2.appendChild(this.createTaskInfo(this.vTaskList[i]));

@@ -10,4 +10,5 @@ "use strict";

exports.parseJSON = function (pFile, pGanttVar) {
var xhttp;
if (window.XMLHttpRequest) {
var xhttp = new XMLHttpRequest();
xhttp = new XMLHttpRequest();
}

@@ -28,17 +29,20 @@ else { // IE 5/6

for (var index = 0; index < pJsonObj.length; index++) {
var id;
var name;
var start;
var end;
var itemClass;
var id = void 0;
var name_1 = void 0;
var start = void 0;
var end = void 0;
var planstart = void 0;
var planend = void 0;
var itemClass = void 0;
var link = '';
var milestone = 0;
var resourceName = '';
var completion;
var completion = void 0;
var group = 0;
var parent;
var open;
var parent_1 = void 0;
var open_1 = void 0;
var dependsOn = '';
var caption = '';
var notes = '';
var cost = void 0;
for (var prop in pJsonObj[index]) {

@@ -54,3 +58,3 @@ var property = prop;

case 'name':
name = value;
name_1 = value;
break;

@@ -65,2 +69,10 @@ case 'pstart':

break;
case 'pplanstart':
case 'planstart':
planstart = value;
break;
case 'pplanend':
case 'planend':
planend = value;
break;
case 'pclass':

@@ -92,7 +104,7 @@ case 'class':

case 'parent':
parent = value;
parent_1 = value;
break;
case 'popen':
case 'open':
open = value;
open_1 = value;
break;

@@ -111,6 +123,10 @@ case 'pdepend':

break;
case 'pcost':
case 'cost':
cost = value;
break;
}
}
//if (id != undefined && !isNaN(parseInt(id)) && isFinite(id) && name && start && end && itemClass && completion != undefined && !isNaN(parseFloat(completion)) && isFinite(completion) && !isNaN(parseInt(parent)) && isFinite(parent)) {
pGanttVar.AddTaskItem(new task_1.TaskItem(id, name, start, end, itemClass, link, milestone, resourceName, completion, group, parent, open, dependsOn, caption, notes, pGanttVar));
pGanttVar.AddTaskItem(new task_1.TaskItem(id, name_1, start, end, itemClass, link, milestone, resourceName, completion, group, parent_1, open_1, dependsOn, caption, notes, pGanttVar, cost, planstart, planend));
//}

@@ -117,0 +133,0 @@ }

@@ -47,4 +47,6 @@ "use strict";

'startdate': 'Inicio',
'planstartdate': 'Inicio Plan',
'cost': 'Custo',
'enddate': 'Fin',
'planenddate': 'Plan Fin',
'moreinfo': '+información',

@@ -102,3 +104,5 @@ 'notes': 'Notas',

'startdate': 'Start Date',
'planstartdate': 'Plan Start Date',
'enddate': 'End Date',
'planenddate': 'Plan End Date',
'cost': 'Cost',

@@ -147,5 +151,76 @@ 'moreinfo': 'More Information',

exports.en = en;
var de = { 'format': 'Ansicht', 'hour': 'Stunde', 'day': 'Tag', 'week': 'Woche', 'month': 'Monat', 'quarter': 'Quartal', 'hours': 'Stunden', 'days': 'Tage', 'weeks': 'Wochen', 'months': 'Monate', 'quarters': 'Quartale', 'hr': 'h', 'dy': 'T', 'wk': 'W', 'mth': 'M', 'qtr': 'Q', 'hrs': 'Std', 'dys': 'Tage', 'wks': 'Wochen', 'mths': 'Monate', 'qtrs': 'Quartal', 'resource': 'Resource', 'duration': 'Dauer', 'comp': '%Fertig', 'completion': 'Fertigstellung', 'startdate': 'Erste Buchu', 'enddate': 'Letzte Buchung', 'moreinfo': 'Weitere Infos', 'notes': 'Anmerkung', 'january': 'Jänner', 'february': 'Februar', 'march': 'März', 'april': 'April', 'maylong': 'Mai', 'june': 'Juni', 'july': 'Juli', 'august': 'August', 'september': 'September', 'october': 'Oktober', 'november': 'November', 'december': 'Dezember', 'jan': 'Jan', 'feb': 'Feb', 'mar': 'Mar', 'apr': 'Apr', 'may': 'Mai', 'jun': 'Jun', 'jul': 'Jul', 'aug': 'Aug', 'sep': 'Sep', 'oct': 'Okt', 'nov': 'Nov', 'dec': 'Dez', 'sunday': 'Sonntag', 'monday': 'Montag', 'tuesday': 'Dienstag', 'wednesday': 'Mittwoch', 'thursday': 'Donnerstag', 'friday': 'Freitag', 'saturday': 'Samstag', 'sun': 'So', 'mon': 'Mo', 'tue': 'Di', 'wed': 'Mi', 'thu': 'Do', 'fri': 'Fr', 'sat': 'Sa' };
var de = {
'format': 'Ansicht',
'hour': 'Stunde',
'day': 'Tag',
'week': 'Woche',
'month': 'Monat',
'quarter': 'Quartal',
'hours': 'Stunden',
'days': 'Tage',
'weeks': 'Wochen',
'months': 'Monate',
'quarters': 'Quartale',
'hr': 'h',
'dy': 'T',
'wk': 'W',
'mth': 'M',
'qtr': 'Q',
'hrs': 'Std',
'dys': 'Tage',
'wks': 'Wochen',
'mths': 'Monate',
'qtrs': 'Quartal',
'resource': 'Resource',
'duration': 'Dauer',
'comp': '%Fertig',
'completion': 'Fertigstellung',
'startdate': 'Erste Buchu',
'planstartdate': 'Erste Buchu Plan',
'enddate': 'Letzte Buchung',
'planenddate': 'Plan Letzte Buchung',
'cost': 'Cost',
'moreinfo': 'Weitere Infos',
'notes': 'Anmerkung',
'january': 'Jänner',
'february': 'Februar',
'march': 'März',
'april': 'April',
'maylong': 'Mai',
'june': 'Juni',
'july': 'Juli',
'august': 'August',
'september': 'September',
'october': 'Oktober',
'november': 'November',
'december': 'Dezember',
'jan': 'Jan',
'feb': 'Feb',
'mar': 'Mar',
'apr': 'Apr',
'may': 'Mai',
'jun': 'Jun',
'jul': 'Jul',
'aug': 'Aug',
'sep': 'Sep',
'oct': 'Okt',
'nov': 'Nov',
'dec': 'Dez',
'sunday': 'Sonntag',
'monday': 'Montag',
'tuesday': 'Dienstag',
'wednesday': 'Mittwoch',
'thursday': 'Donnerstag',
'friday': 'Freitag',
'saturday': 'Samstag',
'sun': 'So',
'mon': 'Mo', 'tue': 'Di', 'wed': 'Mi', 'thu': 'Do', 'fri': 'Fr', 'sat': 'Sa'
};
exports.de = de;
var pt = {
'hours': 'Horas',
'days': 'Dias',
'weeks': 'Weeks',
'months': 'Months',
'quarters': 'Quarters',
'format': 'Formato',

@@ -157,3 +232,14 @@ 'hour': 'Hora',

'quarter': 'Trimestre',
'completion': '% Completo',
'hr': 'hr',
'dy': 'dia',
'wk': 'sem.',
'mth': 'mês',
'qtr': 'qtr',
'hrs': 'hrs',
'dys': 'dias',
'wks': 'sem.',
'mths': 'meses',
'qtrs': 'qtrs',
'completion': 'Terminado',
'comp': '% Completado',
'moreinfo': 'Mais informações',

@@ -164,6 +250,6 @@ 'notes': 'Notas',

'startdate': 'Data inicial',
'planstartdate': 'Plan Data inicial',
'enddate': 'Data final',
'dys': 'dias',
'wks': 'sem.',
'mths': 'mes.',
'planenddate': 'Plan Data final',
'cost': 'Cost',
'jan': 'Jan',

@@ -192,3 +278,10 @@ 'feb': 'Fev',

'november': 'Novembro',
'december': 'Dezembro'
'december': 'Dezembro',
'sun': 'Dom',
'mon': 'Seg',
'tue': 'Ter',
'wed': 'Qua',
'thu': 'Qui',
'fri': 'Sex',
'sat': 'Sab'
};

@@ -239,3 +332,6 @@ exports.pt = pt;

'startdate': 'Нач. дата',
'planstartdate': 'Plan Нач. дата',
'enddate': 'Кон. дата',
'planenddate': 'Plan Кон. дата',
'cost': 'Cost',
'moreinfo': 'Детали',

@@ -269,22 +365,74 @@ 'notes': 'Заметки',

// Jours : http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=3617
'january': 'Janvier', 'february': 'Février', 'march': 'Mars',
'april': 'Avril', 'maylong': 'Mai', 'june': 'Juin', 'july': 'Juillet',
'august': 'Août', 'september': 'Septembre', 'october': 'Octobre',
'november': 'Novembre', 'december': 'Décembre', 'jan': 'Janv',
'feb': 'Févr', 'mar': 'Mars', 'apr': 'Avr', 'may': 'Mai', 'jun': 'Juin',
'jul': 'Juil', 'aug': 'Août', 'sep': 'Sept', 'oct': 'Oct', 'nov': 'Nov',
'dec': 'Déc', 'sunday': 'Dimanche', 'monday': 'Lundi', 'tuesday': 'Mardi',
'wednesday': 'Mercredi', 'thursday': 'Jeudi', 'friday': 'Vendredi',
'saturday': 'Samedi', 'sun': 'Dim', 'mon': 'Lun', 'tue': 'Mar',
'wed': 'Mer', 'thu': 'Jeu', 'fri': 'Ven', 'sat': 'Sam',
'resource': 'Ressource', 'duration': 'Durée', 'comp': '% Term.',
'completion': 'Terminé', 'startdate': 'Début', 'enddate': 'Fin',
'moreinfo': "Plus d'informations", 'notes': 'Notes', 'format': 'Format',
'hour': 'Heure', 'day': 'Jour', 'week': 'Semaine', 'month': 'Mois',
'quarter': 'Trimestre', 'hours': 'Heures', 'days': 'Jours',
'weeks': 'Semaines', 'months': 'Mois', 'quarters': 'Trimestres', 'hr': 'h',
'dy': 'j', 'wk': 'sem', 'mth': 'mois', 'qtr': 'tri', 'hrs': 'h', 'dys': 'j',
'wks': 'sem', 'mths': 'mois', 'qtrs': 'tri'
'january': 'Janvier',
'february': 'Février',
'march': 'Mars',
'april': 'Avril',
'maylong': 'Mai',
'june': 'Juin',
'july': 'Juillet',
'august': 'Août',
'september': 'Septembre',
'october': 'Octobre',
'november': 'Novembre',
'december': 'Décembre',
'jan': 'Janv',
'feb': 'Févr',
'mar': 'Mars',
'apr': 'Avr',
'may': 'Mai',
'jun': 'Juin',
'jul': 'Juil',
'aug': 'Août',
'sep': 'Sept',
'oct': 'Oct',
'nov': 'Nov',
'dec': 'Déc',
'sunday': 'Dimanche',
'monday': 'Lundi',
'tuesday': 'Mardi',
'wednesday': 'Mercredi',
'thursday': 'Jeudi',
'friday': 'Vendredi',
'saturday': 'Samedi',
'sun': 'Dim',
'mon': 'Lun',
'tue': 'Mar',
'wed': 'Mer',
'thu': 'Jeu',
'fri': 'Ven',
'sat': 'Sam',
'resource': 'Ressource',
'duration': 'Durée',
'comp': '% Term.',
'completion': 'Terminé',
'startdate': 'Début',
'planstartdate': 'Plan Début',
'enddate': 'Fin',
'planenddate': 'Plan Fin',
'cost': 'Cost',
'moreinfo': "Plus d'informations",
'notes': 'Notes',
'format': 'Format',
'hour': 'Heure',
'day': 'Jour',
'week': 'Semaine',
'month': 'Mois',
'quarter': 'Trimestre',
'hours': 'Heures',
'days': 'Jours',
'weeks': 'Semaines',
'months': 'Mois',
'quarters': 'Trimestres',
'hr': 'h',
'dy': 'j',
'wk': 'sem',
'mth': 'mois',
'qtr': 'tri',
'hrs': 'h',
'dys': 'j',
'wks': 'sem',
'mths': 'mois',
'qtrs': 'tri'
};
exports.fr = fr;
//# sourceMappingURL=lang.js.map

@@ -42,2 +42,5 @@ "use strict";

this.setShowEndDate = function (pVal) { this.vShowEndDate = pVal; };
this.setShowPlanStartDate = function (pVal) { this.vShowPlanStartDate = pVal; };
this.setShowPlanEndDate = function (pVal) { this.vShowPlanEndDate = pVal; };
this.setShowCost = function (pVal) { this.vShowCost = pVal; };
this.setShowTaskInfoRes = function (pVal) { this.vShowTaskInfoRes = pVal; };

@@ -123,2 +126,5 @@ this.setShowTaskInfoDur = function (pVal) { this.vShowTaskInfoDur = pVal; };

this.getShowEndDate = function () { return this.vShowEndDate; };
this.getShowPlanStartDate = function () { return this.vShowPlanStartDate; };
this.getShowPlanEndDate = function () { return this.vShowPlanEndDate; };
this.getShowCost = function () { return this.vShowCost; };
this.getShowTaskInfoRes = function () { return this.vShowTaskInfoRes; };

@@ -125,0 +131,0 @@ this.getShowTaskInfoDur = function () { return this.vShowTaskInfoDur; };

@@ -130,6 +130,8 @@ "use strict";

exports.TaskItemObject = function (object) {
return new exports.TaskItem(object.pID, object.pName, object.pStart, object.pEnd, object.pClass, object.pLink, object.pMile, object.pRes, object.pComp, object.pGroup, object.pParent, object.pOpen, object.pDepend, object.pCaption, object.pNotes, object.pGantt, object.pCost);
return new exports.TaskItem(object.pID, object.pName, object.pStart, object.pEnd, object.pClass, object.pLink, object.pMile, object.pRes, object.pComp, object.pGroup, object.pParent, object.pOpen, object.pDepend, object.pCaption, object.pNotes, object.pGantt, object.pCost, object.pPlanStartDate, object.pPlanEndDate);
};
exports.TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt, pCost) {
exports.TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt, pCost, pPlanStart, pPlanEnd) {
if (pCost === void 0) { pCost = null; }
if (pPlanStart === void 0) { pPlanStart = null; }
if (pPlanEnd === void 0) { pPlanEnd = null; }
var vBenchTime = new Date().getTime();

@@ -140,2 +142,4 @@ var vID = parseInt(document.createTextNode(pID).data);

var vEnd = new Date(0);
var vPlanStart = null;
var vPlanEnd = null;
var vGroupMinStart = null;

@@ -186,2 +190,10 @@ var vGroupMinEnd = null;

}
if (pPlanStart != null && pPlanStart != '') {
vPlanStart = (pPlanStart instanceof Date) ? pPlanStart : utils_1.parseDateStr(document.createTextNode(pPlanStart).data, vGantt.getDateInputFormat());
vGroupMinStart = vPlanStart;
}
if (pPlanEnd != null && pPlanEnd != '') {
vPlanEnd = (pPlanEnd instanceof Date) ? pPlanEnd : utils_1.parseDateStr(document.createTextNode(pPlanEnd).data, vGantt.getDateInputFormat());
vGroupMinEnd = vPlanEnd;
}
if (pDepend != null) {

@@ -218,2 +230,5 @@ var vDependStr = pDepend + '';

this.getEnd = function () { return vEnd; };
this.getPlanStart = function () { return vPlanStart; };
this.getPlanEnd = function () { return vPlanEnd; };
this.getCost = function () { return vCost; };
this.getGroupMinStart = function () { return vGroupMinStart; };

@@ -322,2 +337,3 @@ this.getGroupMinEnd = function () { return vGroupMinEnd; };

this.getGroupSpan = function () { return vGroupSpan; };
this.setCost = function (pCost) { vCost = pCost; };
this.setStart = function (pStart) { if (pStart instanceof Date)

@@ -327,2 +343,6 @@ vStart = pStart; };

vEnd = pEnd; };
this.setPlanStart = function (pPlanStart) { if (pPlanStart instanceof Date)
vPlanStart = pPlanStart; };
this.setPlanEnd = function (pPlanEnd) { if (pPlanEnd instanceof Date)
vPlanEnd = pPlanEnd; };
this.setGroupMinStart = function (pStart) { if (pStart instanceof Date)

@@ -329,0 +349,0 @@ vGroupMinStart = pStart; };

@@ -325,4 +325,4 @@ "use strict";

exports.getOffset = function (pStartDate, pEndDate, pColWidth, pFormat) {
var DAY_CELL_MARGIN_WIDTH = 1; // Cell margin for 'day' format
var WEEK_CELL_MARGIN_WIDTH = 1; // Cell margin for 'week' format
var DAY_CELL_MARGIN_WIDTH = 3; // Cell margin for 'day' format
var WEEK_CELL_MARGIN_WIDTH = 3; // Cell margin for 'week' format
var MONTH_CELL_MARGIN_WIDTH = 1; // Cell margin for 'month' format

@@ -329,0 +329,0 @@ var QUARTER_CELL_MARGIN_WIDTH = 1; // Cell margin for 'quarter' format

@@ -47,4 +47,6 @@

"pName": "Define Chart API",
"pStart": "",
"pEnd": "",
"pStart": "2017-02-25",
"pEnd": "2017-03-17",
"pPlanStart": "2017-04-01",
"pPlanEnd": "2017-04-15 12:00",
"pClass": "ggroupblack",

@@ -60,2 +62,3 @@ "pLink": "",

"pCaption": "",
"pCost": 1000,
"pNotes": "Some Notes text"

@@ -78,2 +81,4 @@ });

|_pEnd:_|(required) the task end date, can enter empty date ('') for groups|
|_pPlanStart:_|(required) the planed task start date, can enter empty date ('') for groups. You can also enter specific time (e.g. 2013-02-20 09:00) for additional precision or half days|
|_pPlanEnd:_|(required) the task end date planned, can enter empty date ('') for groups|
|_pClass:_|(required) the css class for this task |

@@ -91,2 +96,3 @@ |_pLink:_|(optional) any http link to be displayed in tool tip as the "More information" link.|

|_pGantt:_|(required) javascript JSGantt.GanttChart object from which to take settings. Defaults to "g" for backwards compatibility|
|_pCost:_|(required) cost of that task, numeric

@@ -110,2 +116,4 @@ <sup>*</sup> Combined group tasks show all sub-tasks on one row. The information displayed in the task list and row caption are taken from the parent task. Tool tips are generated individually for each sub-task from its own information. Milestones are not valid as sub-tasks of a combined group task and will not be displayed. No bounds checking of start and end dates of sub-tasks is performed therefore it is possible for these task bars to overlap. Dependencies can be set to and from sub-tasks only.

"pEnd": "",
"pPlanStart": "",
"pPlanEnd": "",
"pClass": "ggroupblack",

@@ -121,2 +129,3 @@ "pLink": "",

"pCaption": "",
"pCost": "",
"pNotes": "Some Notes text"

@@ -148,2 +157,4 @@ }

<pEnd></pEnd>
<pPlanStart></pPlanStart>
<pPlanEnd></PlanEnd>
<pClass>gtaskred</pClass>

@@ -157,2 +168,3 @@ <pLink></pLink>

<pOpen>1</pOpen>
<pCost></pCost>
<pDepend>2,24</pDepend>

@@ -239,2 +251,5 @@ <pCaption>A caption</pCaption>

|_setShowEndDate():_|Controls whether the Task End Date column is displayed in the task list, defaults to 1 (show column)|
|_setShowPlanStartDate():_|Controls whether the Plan Task Start Date column is displayed in the task list, defaults to 1 (show column)|
|_setShowPlanEndDate():_|Controls whether the Task Plan End Date column is displayed in the task list, defaults to 1 (show column)|
|_setShowCost():_|Controls whether the Cost column is displayed in the task list, defaults to 1 (show column)|
|_setShowTaskInfoRes():_|Controls whether the Resource information is displayed in the task tool tip, defaults to 1 (show information)|

@@ -422,4 +437,6 @@ |_setShowTaskInfoDur():_|Controls whether the Task Duration information is displayed in the task tool tip, defaults to 1 (show information)|

"pName": "Define Chart API",
"pStart": "",
"pEnd": "",
"pStart": "2017-02-25",
"pEnd": "2017-03-17",
"pPlanStart": "2017-04-01",
"pPlanEnd": "2017-04-15 12:00",
"pClass": "ggroupblack",

@@ -433,2 +450,3 @@ "pLink": "",

"pOpen": 1,
"pCost": 100,
"pDepend": "",

@@ -435,0 +453,0 @@ "pCaption": "",

{
"name": "jsgantt-improved",
"version": "1.8.7",
"version": "1.8.8",
"description": "jsgantt-improved",

@@ -8,3 +8,4 @@ "main": "dist/index.js",

"build": "tsc",
"watch": "onchange 'src/**/*.ts' '*.ts' -- npm run build",
"watch": "onchange 'src/**' '*.*' -- npm run build",
"watch:dist": "onchange 'src/**' '*.ts' -- npm run dist",
"watch:test": "onchange 'src/**/*.ts' '*.ts' -- npm run test",

@@ -14,5 +15,5 @@ "test": "node node_modules/.bin/protractor protractor.conf.js",

"browserify": "browserify dist/index.js --standalone JSGantt > jsgantt.js",
"dist": "npm run build && npm run browserify && cp src/jsgantt.css dist/ && cp jsgantt.js dist/",
"dist": "npm run build && npm run browserify && cp src/jsgantt.css dist/ && cp jsgantt.js dist/ && cp jsgantt.js demo/ && cp src/jsgantt.css demo/ && echo 'DIST finished'",
"publish-npm": "npm run dist && npm publish",
"demo": "cp jsgantt.js demo/ && cp src/jsgantt.css demo/ && cd demo && http-server",
"demo": "nodemon server.js",
"demo-full": "npm run dist && npm run demo",

@@ -36,2 +37,3 @@ "e2e-prepare": "npm i -g webdriver-manager && webdriver-manager update && ./node_modules/protractor/node_modules/webdriver-manager/bin/webdriver-manager update"

"chai": "^4.1.2",
"express": "^4.16.4",
"jasmine": "^3.3.0",

@@ -38,0 +40,0 @@ "jasmine-core": "^3.3.0",

@@ -0,8 +1,12 @@

[![Build Status](https://travis-ci.org/mariohmol/jsgantt-improved.svg?branch=master)](https://travis-ci.org/mariohmol/jsgantt-improved)
A fully featured gantt chart component built entirely in Javascript, CSS and AJAX. It is lightweight and there is no need of external libraries or additional images.
[![Build Status](https://travis-ci.org/mariohmol/jsgantt-improved.svg?branch=master)](https://travis-ci.org/mariohmol/jsgantt-improved)
![Demo Image](/demo/demo.png)
Start using with including the files `jsgantt.js` and `jsgantt.css` that are inside `demo/` folder.
Or install and use in JS

@@ -58,4 +62,6 @@

"pName": "Define Chart API",
"pStart": "",
"pEnd": "",
"pStart": "2017-02-25",
"pEnd": "2017-03-17",
"pPlanStart": "2017-04-01",
"pPlanEnd": "2017-04-15 12:00",
"pClass": "ggroupblack",

@@ -71,2 +77,3 @@ "pLink": "",

"pCaption": "",
"pCost": 1000,
"pNotes": "Some Notes text"

@@ -88,2 +95,5 @@ });

* Resources
* Costs
* Plan Start and End Dates
* Gantt with Planned vs Executed
* Dynamic Loading of Tasks

@@ -94,3 +104,3 @@ * Dynamic change of format: Hour, Day, Week, Month, Quarter

* From JavaScript Strings
* Support for Internationalization (all hard coded strings can be overridden)
* Support for Internationalization

@@ -97,0 +107,0 @@ ## Documentation

@@ -32,2 +32,5 @@ import * as lang from './lang';

this.vShowEndDate = 1;
this.vShowPlanStartDate = 0;
this.vShowCost = 0;
this.vShowPlanEndDate = 0;
this.vShowEndWeekDate = 1;

@@ -273,2 +276,7 @@ this.vShowTaskInfoRes = 1;

var vTaskWidth = 1;
var vTaskPlanLeftPx = 0;
var vTaskPlanRightPx = 0;
var vTaskPlanWidth = 1;
var vNumCols = 0;

@@ -320,2 +328,5 @@ var vNumRows = 0;

if (this.vShowEndDate == 1) this.newNode(vTmpRow, 'td', null, 'gspanning genddate', '\u00A0');
if (this.vShowPlanStartDate == 1) this.newNode(vTmpRow, 'td', null, 'gspanning gstartdate', '\u00A0');
if (this.vShowPlanEndDate == 1) this.newNode(vTmpRow, 'td', null, 'gspanning gplanenddate', '\u00A0');
if (this.vShowCost == 1) this.newNode(vTmpRow, 'td', null, 'gspanning gcost', '\u00A0');

@@ -330,2 +341,5 @@ vTmpRow = this.newNode(vTmpTBody, 'tr');

if (this.vShowEndDate == 1) this.newNode(vTmpRow, 'td', null, 'gtaskheading genddate', this.vLangs[this.vLang]['enddate']);
if (this.vShowPlanStartDate == 1) this.newNode(vTmpRow, 'td', null, 'gtaskheading gplanstartdate', this.vLangs[this.vLang]['planstartdate']);
if (this.vShowPlanEndDate == 1) this.newNode(vTmpRow, 'td', null, 'gtaskheading gplanenddate', this.vLangs[this.vLang]['planenddate']);
if (this.vShowCost == 1) this.newNode(vTmpRow, 'td', null, 'gtaskheading gcost', this.vLangs[this.vLang]['cost']);

@@ -388,2 +402,16 @@ var vLeftTable = document.createDocumentFragment();

}
if (this.vShowPlanStartDate == 1) {
vTmpCell = this.newNode(vTmpRow, 'td', null, 'gplanstartdate');
const v = this.vTaskList[i].getPlanStart() ? formatDateStr(this.vTaskList[i].getPlanStart(), this.vDateTaskTableDisplayFormat, this.vLangs[this.vLang]) : '';
vTmpDiv = this.newNode(vTmpCell, 'div', null, null, v);
}
if (this.vShowPlanEndDate == 1) {
vTmpCell = this.newNode(vTmpRow, 'td', null, 'gplanenddate');
const v = this.vTaskList[i].getPlanEnd() ? formatDateStr(this.vTaskList[i].getPlanEnd(), this.vDateTaskTableDisplayFormat, this.vLangs[this.vLang]) : '';
vTmpDiv = this.newNode(vTmpCell, 'div', null, null, v);
}
if (this.vShowCost == 1) {
vTmpCell = this.newNode(vTmpRow, 'td', null, 'gcost');
vTmpDiv = this.newNode(vTmpCell, 'div', null, null, this.vTaskList[i].getCost());
}
vNumRows++;

@@ -403,2 +431,4 @@ }

if (this.vShowEndDate == 1) this.newNode(vTmpRow, 'td', null, 'gspanning genddate', '\u00A0');
if (this.vShowPlanStartDate == 1) this.newNode(vTmpRow, 'td', null, 'gspanning gplanstartdate', '\u00A0');
if (this.vShowPlanEndDate == 1) this.newNode(vTmpRow, 'td', null, 'gspanning gplanenddate', '\u00A0');
// Add some white space so the vertical scroll distance should always be greater

@@ -545,2 +575,3 @@ // than for the right pane (keep to a minimum as it is seen in unconstrained height designs)

vTaskLeftPx = (vNumCols * (vColWidth + 1)) + 1;
vTaskPlanLeftPx = (vNumCols * (vColWidth + 1)) + 1;

@@ -570,5 +601,22 @@ if (this.vUseSingleCell != 0 && this.vUseSingleCell < (vNumCols * vNumRows)) vSingleCell = true;

vTaskLeftPx = getOffset(vMinDate, curTaskStart, vColWidth, this.vFormat);
vTaskRightPx = getOffset(curTaskStart, curTaskEnd, vColWidth, this.vFormat);
let curTaskPlanStart, curTaskPlanEnd;
curTaskPlanStart = this.vTaskList[i].getPlanStart();
curTaskPlanEnd = this.vTaskList[i].getPlanEnd();
if (curTaskPlanStart && curTaskPlanEnd) {
if ((curTaskPlanEnd.getTime() - (curTaskPlanEnd.getTimezoneOffset() * 60000)) % (86400000) == 0) curTaskPlanEnd = new Date(curTaskPlanEnd.getFullYear(), curTaskPlanEnd.getMonth(), curTaskPlanEnd.getDate() + 1, curTaskPlanEnd.getHours(), curTaskPlanEnd.getMinutes(), curTaskPlanEnd.getSeconds()); // add 1 day here to simplify calculations below
vTaskPlanLeftPx = getOffset(vMinDate, curTaskPlanStart, vColWidth, this.vFormat);
vTaskPlanRightPx = getOffset(curTaskPlanStart, curTaskPlanEnd, vColWidth, this.vFormat);
}else {
vTaskPlanLeftPx = vTaskPlanRightPx = 0;
}
vID = this.vTaskList[i].getID();

@@ -651,6 +699,12 @@ var vComb = (this.vTaskList[i].getParItem() && this.vTaskList[i].getParItem().getGroup() == 2);

/**
* DRAW THE BOXES FOR GANTT
*/
let vTmpDivCell;
if (vComb) {
vTmpDiv = this.vTaskList[i].getParItem().getCellDiv();
vTmpDivCell = vTmpDiv = this.vTaskList[i].getParItem().getCellDiv();
}
else {
// Draw Task Bar which has colored bar div
vTmpRow = this.newNode(vTmpTBody, 'tr', this.vDivId + 'childrow_' + vID, 'glineitem gitem' + this.vFormat, null, null, null, ((this.vTaskList[i].getVisible() == 0) ? 'none' : null));

@@ -660,5 +714,6 @@ this.vTaskList[i].setChildRow(vTmpRow);

vTmpCell = this.newNode(vTmpRow, 'td', null, 'gtaskcell');
vTmpDiv = this.newNode(vTmpCell, 'div', null, 'gtaskcelldiv', '\u00A0\u00A0');
vTmpDivCell = vTmpDiv = this.newNode(vTmpCell, 'div', null, 'gtaskcelldiv', '\u00A0\u00A0');
}
// Draw Task Bar which has colored bar div, and opaque completion div
// draw the lines for dependecies
vTmpDiv = this.newNode(vTmpDiv, 'div', this.vDivId + 'bardiv_' + vID, 'gtaskbarcontainer', null, vTaskWidth, vTaskLeftPx);

@@ -668,7 +723,18 @@ this.vTaskList[i].setBarDiv(vTmpDiv);

this.vTaskList[i].setTaskDiv(vTmpDiv2);
// PLANNED
if (vTaskPlanLeftPx) { // vTaskPlanRightPx vTaskPlanLeftPx
const vTmpPlanDiv = this.newNode(vTmpDivCell, 'div', this.vDivId + 'bardiv_' + vID, 'gtaskbarcontainer gplan', null, vTaskPlanRightPx, vTaskPlanLeftPx);
const vTmpDiv3 = this.newNode(vTmpPlanDiv, 'div', this.vDivId + 'taskbar_' + vID, this.vTaskList[i].getClass() + ' gplan', null, vTaskPlanRightPx);
}
// and opaque completion div
this.newNode(vTmpDiv2, 'div', this.vDivId + 'complete_' + vID, this.vTaskList[i].getClass() + 'complete', null, this.vTaskList[i].getCompStr());
// caption
if (vComb) vTmpItem = this.vTaskList[i].getParItem();
if (!vComb || (vComb && this.vTaskList[i].getParItem().getEnd() == this.vTaskList[i].getEnd())) vCaptClass = 'gcaption';
// Background cells
if (!vSingleCell && !vComb) {

@@ -696,4 +762,4 @@ vCellFormat = '';

// Add Task Info div for tooltip
if (this.vTaskList[i].getTaskDiv() && vTmpDiv) {
// Add Task Info div for tooltip
vTmpDiv2 = this.newNode(vTmpDiv, 'div', this.vDivId + 'tt' + vID, null, null, null, null, 'none');

@@ -700,0 +766,0 @@ vTmpDiv2.appendChild(this.createTaskInfo(this.vTaskList[i]));

@@ -9,11 +9,11 @@ import { TaskItem } from "./task";

export const parseJSON = function (pFile, pGanttVar) {
let xhttp;
if ((<any>window).XMLHttpRequest) {
var xhttp = new XMLHttpRequest();
xhttp = new XMLHttpRequest();
} else { // IE 5/6
xhttp = new (<any>window).ActiveXObject('Microsoft.XMLHTTP');
}
xhttp.open('GET', pFile, false);
xhttp.send(null);
var jsonObj = eval('(' + xhttp.response + ')');
let jsonObj = eval('(' + xhttp.response + ')');

@@ -29,22 +29,25 @@ addJSONTask(pGanttVar, jsonObj);

if ({}.toString.call(pJsonObj) === '[object Array]') {
for (var index = 0; index < pJsonObj.length; index++) {
var id;
var name;
var start;
var end;
var itemClass;
var link = '';
var milestone = 0;
var resourceName = '';
var completion;
var group = 0;
var parent;
var open;
var dependsOn = '';
var caption = '';
var notes = '';
for (let index = 0; index < pJsonObj.length; index++) {
let id;
let name;
let start;
let end;
let planstart;
let planend;
let itemClass;
let link = '';
let milestone = 0;
let resourceName = '';
let completion;
let group = 0;
let parent;
let open;
let dependsOn = '';
let caption = '';
let notes = '';
let cost;
for (var prop in pJsonObj[index]) {
var property = prop;
var value = pJsonObj[index][property];
for (let prop in pJsonObj[index]) {
let property = prop;
let value = pJsonObj[index][property];
switch (property.toLowerCase()) {

@@ -67,2 +70,10 @@ case 'pid':

break;
case 'pplanstart':
case 'planstart':
planstart = value;
break;
case 'pplanend':
case 'planend':
planend = value;
break;
case 'pclass':

@@ -112,2 +123,6 @@ case 'class':

break;
case 'pcost':
case 'cost':
cost = value;
break;
}

@@ -117,3 +132,3 @@ }

//if (id != undefined && !isNaN(parseInt(id)) && isFinite(id) && name && start && end && itemClass && completion != undefined && !isNaN(parseFloat(completion)) && isFinite(completion) && !isNaN(parseInt(parent)) && isFinite(parent)) {
pGanttVar.AddTaskItem(new TaskItem(id, name, start, end, itemClass, link, milestone, resourceName, completion, group, parent, open, dependsOn, caption, notes, pGanttVar));
pGanttVar.AddTaskItem(new TaskItem(id, name, start, end, itemClass, link, milestone, resourceName, completion, group, parent, open, dependsOn, caption, notes, pGanttVar, cost, planstart, planend));
//}

@@ -120,0 +135,0 @@ }

@@ -45,4 +45,6 @@ const es = {

'startdate': 'Inicio',
'planstartdate': 'Inicio Plan',
'cost': 'Custo',
'enddate': 'Fin',
'planenddate': 'Plan Fin',
'moreinfo': '+información',

@@ -101,3 +103,5 @@ 'notes': 'Notas',

'startdate': 'Start Date',
'planstartdate': 'Plan Start Date',
'enddate': 'End Date',
'planenddate': 'Plan End Date',
'cost': 'Cost',

@@ -148,5 +152,76 @@ 'moreinfo': 'More Information',

const de = { 'format': 'Ansicht', 'hour': 'Stunde', 'day': 'Tag', 'week': 'Woche', 'month': 'Monat', 'quarter': 'Quartal', 'hours': 'Stunden', 'days': 'Tage', 'weeks': 'Wochen', 'months': 'Monate', 'quarters': 'Quartale', 'hr': 'h', 'dy': 'T', 'wk': 'W', 'mth': 'M', 'qtr': 'Q', 'hrs': 'Std', 'dys': 'Tage', 'wks': 'Wochen', 'mths': 'Monate', 'qtrs': 'Quartal', 'resource': 'Resource', 'duration': 'Dauer', 'comp': '%Fertig', 'completion': 'Fertigstellung', 'startdate': 'Erste Buchu', 'enddate': 'Letzte Buchung', 'moreinfo': 'Weitere Infos', 'notes': 'Anmerkung', 'january': 'Jänner', 'february': 'Februar', 'march': 'März', 'april': 'April', 'maylong': 'Mai', 'june': 'Juni', 'july': 'Juli', 'august': 'August', 'september': 'September', 'october': 'Oktober', 'november': 'November', 'december': 'Dezember', 'jan': 'Jan', 'feb': 'Feb', 'mar': 'Mar', 'apr': 'Apr', 'may': 'Mai', 'jun': 'Jun', 'jul': 'Jul', 'aug': 'Aug', 'sep': 'Sep', 'oct': 'Okt', 'nov': 'Nov', 'dec': 'Dez', 'sunday': 'Sonntag', 'monday': 'Montag', 'tuesday': 'Dienstag', 'wednesday': 'Mittwoch', 'thursday': 'Donnerstag', 'friday': 'Freitag', 'saturday': 'Samstag', 'sun': 'So', 'mon': 'Mo', 'tue': 'Di', 'wed': 'Mi', 'thu': 'Do', 'fri': 'Fr', 'sat': 'Sa' }
const de = {
'format': 'Ansicht',
'hour': 'Stunde',
'day': 'Tag',
'week': 'Woche',
'month': 'Monat',
'quarter': 'Quartal',
'hours': 'Stunden',
'days': 'Tage',
'weeks': 'Wochen',
'months': 'Monate',
'quarters': 'Quartale',
'hr': 'h',
'dy': 'T',
'wk': 'W',
'mth': 'M',
'qtr': 'Q',
'hrs': 'Std',
'dys': 'Tage',
'wks': 'Wochen',
'mths': 'Monate',
'qtrs': 'Quartal',
'resource': 'Resource',
'duration': 'Dauer',
'comp': '%Fertig',
'completion': 'Fertigstellung',
'startdate': 'Erste Buchu',
'planstartdate': 'Erste Buchu Plan',
'enddate': 'Letzte Buchung',
'planenddate': 'Plan Letzte Buchung',
'cost': 'Cost',
'moreinfo': 'Weitere Infos',
'notes': 'Anmerkung',
'january': 'Jänner',
'february': 'Februar',
'march': 'März',
'april': 'April',
'maylong': 'Mai',
'june': 'Juni',
'july': 'Juli',
'august': 'August',
'september': 'September',
'october': 'Oktober',
'november': 'November',
'december': 'Dezember',
'jan': 'Jan',
'feb': 'Feb',
'mar': 'Mar',
'apr': 'Apr',
'may': 'Mai',
'jun': 'Jun',
'jul': 'Jul',
'aug': 'Aug',
'sep': 'Sep',
'oct': 'Okt',
'nov': 'Nov',
'dec': 'Dez',
'sunday': 'Sonntag',
'monday': 'Montag',
'tuesday': 'Dienstag',
'wednesday': 'Mittwoch',
'thursday': 'Donnerstag',
'friday': 'Freitag',
'saturday': 'Samstag',
'sun': 'So',
'mon': 'Mo', 'tue': 'Di', 'wed': 'Mi', 'thu': 'Do', 'fri': 'Fr', 'sat': 'Sa'
}
const pt = {
'hours': 'Horas',
'days': 'Dias',
'weeks': 'Weeks',
'months': 'Months',
'quarters': 'Quarters',
'format': 'Formato',

@@ -158,3 +233,14 @@ 'hour': 'Hora',

'quarter': 'Trimestre',
'completion': '% Completo',
'hr': 'hr',
'dy': 'dia',
'wk': 'sem.',
'mth': 'mês',
'qtr': 'qtr',
'hrs': 'hrs',
'dys': 'dias',
'wks': 'sem.',
'mths': 'meses',
'qtrs': 'qtrs',
'completion': 'Terminado',
'comp': '% Completado',
'moreinfo': 'Mais informações',

@@ -165,6 +251,6 @@ 'notes': 'Notas',

'startdate': 'Data inicial',
'planstartdate': 'Plan Data inicial',
'enddate': 'Data final',
'dys': 'dias',
'wks': 'sem.',
'mths': 'mes.',
'planenddate': 'Plan Data final',
'cost': 'Cost',
'jan': 'Jan',

@@ -193,3 +279,10 @@ 'feb': 'Fev',

'november': 'Novembro',
'december': 'Dezembro'
'december': 'Dezembro',
'sun': 'Dom',
'mon': 'Seg',
'tue': 'Ter',
'wed': 'Qua',
'thu': 'Qui',
'fri': 'Sex',
'sat': 'Sab'
}

@@ -241,6 +334,8 @@

'startdate': 'Нач. дата',
'planstartdate': 'Plan Нач. дата',
'enddate': 'Кон. дата',
'planenddate': 'Plan Кон. дата',
'cost': 'Cost',
'moreinfo': 'Детали',
'notes': 'Заметки',
'format': 'Формат',

@@ -272,21 +367,73 @@ 'hour': 'Час',

// Jours : http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=3617
'january': 'Janvier', 'february': 'Février', 'march': 'Mars',
'april': 'Avril', 'maylong': 'Mai', 'june': 'Juin', 'july': 'Juillet',
'august': 'Août', 'september': 'Septembre', 'october': 'Octobre',
'november': 'Novembre', 'december': 'Décembre', 'jan': 'Janv',
'feb': 'Févr', 'mar': 'Mars', 'apr': 'Avr', 'may': 'Mai', 'jun': 'Juin',
'jul': 'Juil', 'aug': 'Août', 'sep': 'Sept', 'oct': 'Oct', 'nov': 'Nov',
'dec': 'Déc', 'sunday': 'Dimanche', 'monday': 'Lundi', 'tuesday': 'Mardi',
'wednesday': 'Mercredi', 'thursday': 'Jeudi', 'friday': 'Vendredi',
'saturday': 'Samedi', 'sun': 'Dim', 'mon': 'Lun', 'tue': 'Mar',
'wed': 'Mer', 'thu': 'Jeu', 'fri': 'Ven', 'sat': 'Sam',
'resource': 'Ressource', 'duration': 'Durée', 'comp': '% Term.',
'completion': 'Terminé', 'startdate': 'Début', 'enddate': 'Fin',
'moreinfo': "Plus d'informations", 'notes': 'Notes', 'format': 'Format',
'hour': 'Heure', 'day': 'Jour', 'week': 'Semaine', 'month': 'Mois',
'quarter': 'Trimestre', 'hours': 'Heures', 'days': 'Jours',
'weeks': 'Semaines', 'months': 'Mois', 'quarters': 'Trimestres', 'hr': 'h',
'dy': 'j', 'wk': 'sem', 'mth': 'mois', 'qtr': 'tri', 'hrs': 'h', 'dys': 'j',
'wks': 'sem', 'mths': 'mois', 'qtrs': 'tri'
'january': 'Janvier',
'february': 'Février',
'march': 'Mars',
'april': 'Avril',
'maylong': 'Mai',
'june': 'Juin',
'july': 'Juillet',
'august': 'Août',
'september': 'Septembre',
'october': 'Octobre',
'november': 'Novembre',
'december': 'Décembre',
'jan': 'Janv',
'feb': 'Févr',
'mar': 'Mars',
'apr': 'Avr',
'may': 'Mai',
'jun': 'Juin',
'jul': 'Juil',
'aug': 'Août',
'sep': 'Sept',
'oct': 'Oct',
'nov': 'Nov',
'dec': 'Déc',
'sunday': 'Dimanche',
'monday': 'Lundi',
'tuesday': 'Mardi',
'wednesday': 'Mercredi',
'thursday': 'Jeudi',
'friday': 'Vendredi',
'saturday': 'Samedi',
'sun': 'Dim',
'mon': 'Lun',
'tue': 'Mar',
'wed': 'Mer',
'thu': 'Jeu',
'fri': 'Ven',
'sat': 'Sam',
'resource': 'Ressource',
'duration': 'Durée',
'comp': '% Term.',
'completion': 'Terminé',
'startdate': 'Début',
'planstartdate': 'Plan Début',
'enddate': 'Fin',
'planenddate': 'Plan Fin',
'cost': 'Cost',
'moreinfo': "Plus d'informations",
'notes': 'Notes',
'format': 'Format',
'hour': 'Heure',
'day': 'Jour',
'week': 'Semaine',
'month': 'Mois',
'quarter': 'Trimestre',
'hours': 'Heures',
'days': 'Jours',
'weeks': 'Semaines',
'months': 'Mois',
'quarters': 'Trimestres',
'hr': 'h',
'dy': 'j',
'wk': 'sem',
'mth': 'mois',
'qtr': 'tri',
'hrs': 'h',
'dys': 'j',
'wks': 'sem',
'mths': 'mois',
'qtrs': 'tri'
}
export { en, es, de, pt, fr, ru }

@@ -43,2 +43,5 @@ import { parseDateFormatStr } from "./utils";

this.setShowEndDate = function (pVal) { this.vShowEndDate = pVal; };
this.setShowPlanStartDate = function (pVal) { this.vShowPlanStartDate = pVal; };
this.setShowPlanEndDate = function (pVal) { this.vShowPlanEndDate = pVal; };
this.setShowCost = function (pVal) { this.vShowCost = pVal; };
this.setShowTaskInfoRes = function (pVal) { this.vShowTaskInfoRes = pVal; };

@@ -118,2 +121,5 @@ this.setShowTaskInfoDur = function (pVal) { this.vShowTaskInfoDur = pVal; };

this.getShowEndDate = function () { return this.vShowEndDate; };
this.getShowPlanStartDate = function () { return this.vShowPlanStartDate; };
this.getShowPlanEndDate = function () { return this.vShowPlanEndDate; };
this.getShowCost = function () { return this.vShowCost; };
this.getShowTaskInfoRes = function () { return this.vShowTaskInfoRes; };

@@ -120,0 +126,0 @@ this.getShowTaskInfoDur = function () { return this.vShowTaskInfoDur; };

@@ -147,43 +147,50 @@ import { parseDateStr, isIE, stripUnwanted, getOffset, formatDateStr } from "./utils";

object.pGantt,
object.pCost);
object.pCost,
object.pPlanStartDate,
object.pPlanEndDate
);
}
export const TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt, pCost = null) {
var vBenchTime = new Date().getTime();
var vID = parseInt(document.createTextNode(pID).data);
var vName = document.createTextNode(pName).data;
var vStart = new Date(0);
var vEnd = new Date(0);
var vGroupMinStart = null;
var vGroupMinEnd = null;
var vClass = document.createTextNode(pClass).data;
var vLink = document.createTextNode(pLink).data;
var vMile = parseInt(document.createTextNode(pMile).data);
var vRes = document.createTextNode(pRes).data;
var vComp = parseFloat(document.createTextNode(pComp).data);
var vCost = parseInt(document.createTextNode(pCost).data)
var vGroup = parseInt(document.createTextNode(pGroup).data);
var vParent = document.createTextNode(pParent).data;
var vOpen = (vGroup == 2) ? 1 : parseInt(document.createTextNode(pOpen).data);
var vDepend = new Array();
var vDependType = new Array();
var vCaption = document.createTextNode(pCaption).data;
var vDuration = '';
var vLevel = 0;
var vNumKid = 0;
var vWeight = 0;
var vVisible = 1;
var vSortIdx = 0;
var vToDelete = false;
var x1, y1, x2, y2;
var vNotes;
var vParItem = null;
var vCellDiv = null;
var vGantt = pGantt ? pGantt : g; //hack for backwards compatibility
var vBarDiv = null;
var vTaskDiv = null;
var vListChildRow = null;
var vChildRow = null;
var vGroupSpan = null;
export const TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen,
pDepend, pCaption, pNotes, pGantt, pCost = null, pPlanStart = null, pPlanEnd = null) {
let vBenchTime = new Date().getTime();
let vID = parseInt(document.createTextNode(pID).data);
let vName = document.createTextNode(pName).data;
let vStart = new Date(0);
let vEnd = new Date(0);
let vPlanStart = null;
let vPlanEnd = null;
let vGroupMinStart = null;
let vGroupMinEnd = null;
let vClass = document.createTextNode(pClass).data;
let vLink = document.createTextNode(pLink).data;
let vMile = parseInt(document.createTextNode(pMile).data);
let vRes = document.createTextNode(pRes).data;
let vComp = parseFloat(document.createTextNode(pComp).data);
let vCost = parseInt(document.createTextNode(pCost).data)
let vGroup = parseInt(document.createTextNode(pGroup).data);
let vParent = document.createTextNode(pParent).data;
let vOpen = (vGroup == 2) ? 1 : parseInt(document.createTextNode(pOpen).data);
let vDepend = new Array();
let vDependType = new Array();
let vCaption = document.createTextNode(pCaption).data;
let vDuration = '';
let vLevel = 0;
let vNumKid = 0;
let vWeight = 0;
let vVisible = 1;
let vSortIdx = 0;
let vToDelete = false;
let x1, y1, x2, y2;
let vNotes;
let vParItem = null;
let vCellDiv = null;
let vGantt = pGantt ? pGantt : g; //hack for backwards compatibility
let vBarDiv = null;
let vTaskDiv = null;
let vListChildRow = null;
let vChildRow = null;
let vGroupSpan = null;
vNotes = document.createElement('span');

@@ -206,2 +213,12 @@ vNotes.className = 'gTaskNotes';

if (pPlanStart != null && pPlanStart != '') {
vPlanStart = (pPlanStart instanceof Date) ? pPlanStart : parseDateStr(document.createTextNode(pPlanStart).data, vGantt.getDateInputFormat());
vGroupMinStart = vPlanStart;
}
if (pPlanEnd != null && pPlanEnd != '') {
vPlanEnd = (pPlanEnd instanceof Date) ? pPlanEnd : parseDateStr(document.createTextNode(pPlanEnd).data, vGantt.getDateInputFormat());
vGroupMinEnd = vPlanEnd;
}
if (pDepend != null) {

@@ -240,2 +257,5 @@ var vDependStr = pDepend + '';

this.getEnd = function () { return vEnd; };
this.getPlanStart = function () { return vPlanStart; };
this.getPlanEnd = function () { return vPlanEnd; };
this.getCost = function () { return vCost; };
this.getGroupMinStart = function () { return vGroupMinStart; };

@@ -308,4 +328,7 @@ this.getGroupMinEnd = function () { return vGroupMinEnd; };

this.getGroupSpan = function () { return vGroupSpan; };
this.setCost = function (pCost) { vCost = pCost; };
this.setStart = function (pStart) { if (pStart instanceof Date) vStart = pStart; };
this.setEnd = function (pEnd) { if (pEnd instanceof Date) vEnd = pEnd; };
this.setPlanStart = function (pPlanStart) { if (pPlanStart instanceof Date) vPlanStart = pPlanStart; };
this.setPlanEnd = function (pPlanEnd) { if (pPlanEnd instanceof Date) vPlanEnd = pPlanEnd; };
this.setGroupMinStart = function (pStart) { if (pStart instanceof Date) vGroupMinStart = pStart; };

@@ -312,0 +335,0 @@ this.setGroupMinEnd = function (pEnd) { if (pEnd instanceof Date) vGroupMinEnd = pEnd; };

@@ -323,4 +323,4 @@

export const getOffset = function (pStartDate, pEndDate, pColWidth, pFormat) {
const DAY_CELL_MARGIN_WIDTH = 1; // Cell margin for 'day' format
const WEEK_CELL_MARGIN_WIDTH = 1; // Cell margin for 'week' format
const DAY_CELL_MARGIN_WIDTH = 3; // Cell margin for 'day' format
const WEEK_CELL_MARGIN_WIDTH = 3; // Cell margin for 'week' format
const MONTH_CELL_MARGIN_WIDTH = 1; // Cell margin for 'month' format

@@ -327,0 +327,0 @@ const QUARTER_CELL_MARGIN_WIDTH = 1; // Cell margin for 'quarter' format

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc