@@ -589,7 +589,7 @@ exports.GanttChart = function (pDiv, pFormat) {
589
589
// If exist and one of them are different, show plan bar... show if there is no real vStart as well (just plan dates)
590
590
if ( vTaskPlanLeftPx && ( ( vTaskPlanLeftPx != vTaskLeftPx_1 || vTaskPlanRightPx != vTaskRightPx ) || ! this . vTaskList [ i ] . getStartVar ( ) ) ) {
591
591
var vTmpPlanDiv = draw_utils_1 . newNode ( vTmpDivCell , 'div' , this . vDivId + 'bardiv_' + vID , 'gtaskbarcontainer gplan' , null , vTaskPlanRightPx , vTaskPlanLeftPx ) ;
592
- var vTmpPlanDiv2 = draw_utils_1 . newNode ( vTmpPlanDiv , 'div' , this . vDivId + 'taskbar_' + vID , this . vTaskList [ i ] . getClass ( ) + ' gplan' , null , vTaskPlanRightPx ) ;
592
+ var vTmpPlanDiv2 = draw_utils_1 . newNode ( vTmpPlanDiv , 'div' , this . vDivId + 'taskbar_' + vID , this . vTaskList [ i ] . getPlanClass ( ) + ' gplan' , null , vTaskPlanRightPx ) ;
593
593
this . vTaskList [ i ] . setPlanTaskDiv ( vTmpPlanDiv2 ) ;
594
594
}
595
595
// and opaque completion div
@@ -1658,6 +1658,7 @@ exports.addJSONTask = function (pGanttVar, pJsonObj) {
1658
1658
var planstart = void 0 ;
1659
1659
var planend = void 0 ;
1660
1660
var itemClass = void 0 ;
1661
+ var planClass = void 0 ;
1661
1662
var link = '' ;
1662
1663
var milestone = 0 ;
1663
1664
var resourceName = '' ;
@@ -1704,6 +1705,10 @@ exports.addJSONTask = function (pGanttVar, pJsonObj) {
1704
1705
case 'class' :
1705
1706
itemClass = value ;
1706
1707
break ;
1708
+ case 'pplanclass' :
1709
+ case 'planclass' :
1710
+ planClass = value ;
1711
+ break ;
1707
1712
case 'plink' :
1708
1713
case 'link' :
1709
1714
link = value ;
@@ -1761,7 +1766,7 @@ exports.addJSONTask = function (pGanttVar, pJsonObj) {
1761
1766
}
1762
1767
}
1763
1768
//if (id != undefined && !isNaN(parseInt(id)) && isFinite(id) && name && start && end && itemClass && completion != undefined && !isNaN(parseFloat(completion)) && isFinite(completion) && !isNaN(parseInt(parent)) && isFinite(parent)) {
1764
- 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 , duration , bartext , additionalObject ) ) ;
1769
+ 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 , duration , bartext , additionalObject , planClass ) ) ;
1765
1770
//}
1766
1771
}
1767
1772
} ;
@@ -3308,15 +3313,16 @@ exports.TaskItemObject = function (object) {
3308
3313
general_utils_1 . internalProperties . forEach ( function ( property ) {
3309
3314
delete pDataObject [ property ] ;
3310
3315
} ) ;
3311
- 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 . pPlanStart , object . pPlanEnd , object . pDuration , object . pBarText , object ) ;
3316
+ 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 . pPlanStart , object . pPlanEnd , object . pDuration , object . pBarText , object , object . pPlanClass ) ;
3312
3317
} ;
3313
- exports . TaskItem = function ( pID , pName , pStart , pEnd , pClass , pLink , pMile , pRes , pComp , pGroup , pParent , pOpen , pDepend , pCaption , pNotes , pGantt , pCost , pPlanStart , pPlanEnd , pDuration , pBarText , pDataObject ) {
3318
+ exports . TaskItem = function ( pID , pName , pStart , pEnd , pClass , pLink , pMile , pRes , pComp , pGroup , pParent , pOpen , pDepend , pCaption , pNotes , pGantt , pCost , pPlanStart , pPlanEnd , pDuration , pBarText , pDataObject , pPlanClass ) {
3314
3319
if ( pCost === void 0 ) { pCost = null ; }
3315
3320
if ( pPlanStart === void 0 ) { pPlanStart = null ; }
3316
3321
if ( pPlanEnd === void 0 ) { pPlanEnd = null ; }
3317
3322
if ( pDuration === void 0 ) { pDuration = null ; }
3318
3323
if ( pBarText === void 0 ) { pBarText = null ; }
3319
3324
if ( pDataObject === void 0 ) { pDataObject = null ; }
3325
+ if ( pPlanClass === void 0 ) { pPlanClass = null ; }
3320
3326
var vGantt = pGantt ? pGantt : this ;
3321
3327
var _id = document . createTextNode ( pID ) . data ;
3322
3328
var vID = general_utils_1 . hashKey ( document . createTextNode ( pID ) . data ) ;
@@ -3330,6 +3336,7 @@ exports.TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRe
3330
3336
var vGroupMinPlanStart = null ;
3331
3337
var vGroupMinPlanEnd = null ;
3332
3338
var vClass = document . createTextNode ( pClass ) . data ;
3339
+ var vPlanClass = document . createTextNode ( pPlanClass ) . data ;
3333
3340
var vLink = document . createTextNode ( pLink ) . data ;
3334
3341
var vMile = parseInt ( document . createTextNode ( pMile ) . data ) ;
3335
3342
var vRes = document . createTextNode ( pRes ) . data ;
@@ -3467,6 +3474,7 @@ exports.TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRe
3467
3474
return vEnd ;
3468
3475
} ;
3469
3476
this . getPlanStart = function ( ) { return vPlanStart ? vPlanStart : vStart ; } ;
3477
+ this . getPlanClass = function ( ) { return vPlanClass && vPlanClass !== "null" ? vPlanClass : vClass ; } ;
3470
3478
this . getPlanEnd = function ( ) { return vPlanEnd ? vPlanEnd : vEnd ; } ;
3471
3479
this . getCost = function ( ) { return vCost ; } ;
3472
3480
this . getGroupMinStart = function ( ) { return vGroupMinStart ; } ;
@@ -3602,6 +3610,7 @@ exports.TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRe
3602
3610
this . setName = function ( pName ) { vName = pName ; } ;
3603
3611
this . setNotes = function ( pNotes ) { vNotes = pNotes ; } ;
3604
3612
this . setClass = function ( pClass ) { vClass = pClass ; } ;
3613
+ this . setPlanClass = function ( pPlanClass ) { vPlanClass = pPlanClass ; } ;
3605
3614
this . setCost = function ( pCost ) { vCost = pCost ; } ;
3606
3615
this . setResource = function ( pRes ) { vRes = pRes ; } ;
3607
3616
this . setDuration = function ( pDuration ) { vDuration = pDuration ; } ;
@@ -3708,7 +3717,8 @@ exports.TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRe
3708
3717
pComp : vComp ,
3709
3718
pCost : vCost ,
3710
3719
pGroup : vGroup ,
3711
- pDataObjec : vDataObject
3720
+ pDataObjec : vDataObject ,
3721
+ pPlanClass : vPlanClass
3712
3722
} ;
3713
3723
} ;
3714
3724
} ;
@@ -4440,7 +4450,7 @@ exports.drawSelector = function (pPos) {
4440
4450
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
4441
4451
exports . printChart = exports . calculateStartEndFromDepend = exports . makeRequestOldBrowsers = exports . makeRequest = exports . moveToolTip = exports . updateFlyingObj = exports . isParentElementOrSelf = exports . criticalPath = exports . hashKey = exports . hashString = exports . fadeToolTip = exports . hideToolTip = exports . isIE = exports . getOffset = exports . calculateCurrentDateOffset = exports . getScrollbarWidth = exports . getScrollPositions = exports . benchMark = exports . getZoomFactor = exports . delayedHide = exports . stripUnwanted = exports . stripIds = exports . changeFormat = exports . findObj = exports . internalPropertiesLang = exports . internalProperties = void 0 ;
4442
4452
exports . internalProperties = [ 'pID' , 'pName' , 'pStart' , 'pEnd' , 'pClass' , 'pLink' , 'pMile' , 'pRes' , 'pComp' , 'pGroup' , 'pParent' ,
4443
- 'pOpen' , 'pDepend' , 'pCaption' , 'pNotes' , 'pGantt' , 'pCost' , 'pPlanStart' , 'pPlanEnd' ] ;
4453
+ 'pOpen' , 'pDepend' , 'pCaption' , 'pNotes' , 'pGantt' , 'pCost' , 'pPlanStart' , 'pPlanEnd' , 'pPlanClass' ] ;
4444
4454
exports . internalPropertiesLang = {
4445
4455
'pID' : 'id' ,
4446
4456
'pName' : 'name' ,
@@ -4459,7 +4469,8 @@ exports.internalPropertiesLang = {
4459
4469
'pNotes' : 'notes' ,
4460
4470
'pCost' : 'cost' ,
4461
4471
'pPlanStart' : 'planstartdate' ,
4462
- 'pPlanEnd' : 'planenddate'
4472
+ 'pPlanEnd' : 'planenddate' ,
4473
+ 'pPlanClass' : 'planclass'
4463
4474
} ;
4464
4475
exports . findObj = function ( theObj , theDoc ) {
4465
4476
if ( theDoc === void 0 ) { theDoc = null ; }
@@ -5137,7 +5148,7 @@ exports.AddXMLTask = function (pGanttVar, pXmlDoc) {
5137
5148
if ( vSubCreated )
5138
5149
pDepend = '' ;
5139
5150
// Finally add the task
5140
- pGanttVar . AddTaskItem ( new task_1 . TaskItem ( pID , pName , pStart , pEnd , pClass , pLink , pMile , pRes , pComp , pGroup , pParent , pOpen , pDepend , pCaption , pNotes , pGanttVar , pCost , pPlanStart , pPlanEnd , pDuration ) ) ;
5151
+ pGanttVar . AddTaskItem ( new task_1 . TaskItem ( pID , pName , pStart , pEnd , pClass , pLink , pMile , pRes , pComp , pGroup , pParent , pOpen , pDepend , pCaption , pNotes , pGanttVar , pCost , pPlanStart , pPlanEnd , pDuration , undefined , undefined , pClass ) ) ;
5141
5152
}
5142
5153
}
5143
5154
}
@@ -5167,6 +5178,7 @@ exports.AddXMLTask = function (pGanttVar, pXmlDoc) {
5167
5178
var pCaption = exports . getXMLNodeValue ( Task [ i ] , 'pCaption' , 2 , '' ) ;
5168
5179
var pNotes = exports . getXMLNodeValue ( Task [ i ] , 'pNotes' , 2 , '' ) ;
5169
5180
var pClass = exports . getXMLNodeValue ( Task [ i ] , 'pClass' , 2 , '' ) ;
5181
+ var pPlanClass = exports . getXMLNodeValue ( Task [ i ] , 'pPlanClass' , 2 , '' ) ;
5170
5182
if ( typeof pClass == 'undefined' ) {
5171
5183
if ( pGroup > 0 )
5172
5184
pClass = 'ggroupblack' ;
@@ -5175,8 +5187,10 @@ exports.AddXMLTask = function (pGanttVar, pXmlDoc) {
5175
5187
else
5176
5188
pClass = 'gtaskblue' ;
5177
5189
}
5190
+ if ( typeof pPlanClass == 'undefined' )
5191
+ pPlanClass = pClass ;
5178
5192
// Finally add the task
5179
- pGanttVar . AddTaskItem ( new task_1 . TaskItem ( pID , pName , pStart , pEnd , pClass , pLink , pMile , pRes , pComp , pGroup , pParent , pOpen , pDepend , pCaption , pNotes , pGanttVar , pCost , pPlanStart , pPlanEnd , pDuration ) ) ;
5193
+ pGanttVar . AddTaskItem ( new task_1 . TaskItem ( pID , pName , pStart , pEnd , pClass , pLink , pMile , pRes , pComp , pGroup , pParent , pOpen , pDepend , pCaption , pNotes , pGanttVar , pCost , pPlanStart , pPlanEnd , pDuration , undefined , undefined , pPlanClass ) ) ;
5180
5194
}
5181
5195
}
5182
5196
}
@@ -5237,6 +5251,7 @@ exports.getXMLTask = function (pID, pIdx) {
5237
5251
var vTmpFrag = document . createDocumentFragment ( ) ;
5238
5252
var vTmpDiv = draw_utils_1 . newNode ( vTmpFrag , 'div' , null , null , this . vTaskList [ vIdx ] . getNotes ( ) . innerHTML ) ;
5239
5253
vTask += '<pNotes>' + vTmpDiv . innerHTML + '</pNotes>' ;
5254
+ vTask += '<pPlanClass>' + this . vTaskList [ vIdx ] . getPlanClass ( ) + '</pPlanClass>' ;
5240
5255
vTask += '</task>' ;
5241
5256
}
5242
5257
return vTask ;
0 commit comments