@syncfusion/ej2-gantt 20.2.49 → 20.3.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/ej2-gantt.min.js +10 -0
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +970 -379
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1019 -413
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +19 -19
- package/src/gantt/actions/cell-edit.js +1 -2
- package/src/gantt/actions/connector-line-edit.d.ts +2 -0
- package/src/gantt/actions/connector-line-edit.js +104 -10
- package/src/gantt/actions/context-menu.js +6 -1
- package/src/gantt/actions/critical-path.d.ts +1 -1
- package/src/gantt/actions/critical-path.js +105 -30
- package/src/gantt/actions/dependency.d.ts +2 -0
- package/src/gantt/actions/dependency.js +68 -12
- package/src/gantt/actions/dialog-edit.d.ts +3 -0
- package/src/gantt/actions/dialog-edit.js +130 -15
- package/src/gantt/actions/edit.js +101 -26
- package/src/gantt/actions/filter.d.ts +3 -1
- package/src/gantt/actions/filter.js +32 -44
- package/src/gantt/actions/keyboard.js +1 -1
- package/src/gantt/actions/rowdragdrop.js +68 -8
- package/src/gantt/actions/taskbar-edit.js +15 -3
- package/src/gantt/actions/toolbar.js +1 -1
- package/src/gantt/base/enum.d.ts +3 -1
- package/src/gantt/base/gantt-chart.js +8 -6
- package/src/gantt/base/gantt.d.ts +6 -6
- package/src/gantt/base/gantt.js +10 -3
- package/src/gantt/base/interface.d.ts +4 -0
- package/src/gantt/base/splitter.d.ts +2 -2
- package/src/gantt/base/splitter.js +6 -7
- package/src/gantt/base/task-processor.js +13 -7
- package/src/gantt/base/tree-grid.js +21 -2
- package/src/gantt/export/pdf-connector-line.js +187 -185
- package/src/gantt/models/edit-settings-model.d.ts +2 -2
- package/src/gantt/models/edit-settings.d.ts +2 -2
- package/src/gantt/models/filter-settings-model.d.ts +1 -1
- package/src/gantt/models/filter-settings.d.ts +1 -1
- package/src/gantt/renderer/chart-rows.d.ts +1 -0
- package/src/gantt/renderer/chart-rows.js +47 -16
- package/src/gantt/renderer/connector-line.js +101 -33
- package/src/gantt/renderer/event-marker.js +1 -1
- package/src/gantt/renderer/nonworking-day.js +0 -1
- package/src/gantt/renderer/tooltip.js +2 -1
- package/styles/bootstrap-dark.css +115 -62
- package/styles/bootstrap.css +115 -62
- package/styles/bootstrap4.css +115 -62
- package/styles/bootstrap5-dark.css +119 -63
- package/styles/bootstrap5.css +119 -63
- package/styles/fabric-dark.css +115 -62
- package/styles/fabric.css +115 -62
- package/styles/fluent-dark.css +126 -66
- package/styles/fluent.css +124 -64
- package/styles/gantt/_all.scss +1 -1
- package/styles/gantt/_bootstrap-dark-definition.scss +4 -1
- package/styles/gantt/_bootstrap-definition.scss +4 -1
- package/styles/gantt/_bootstrap4-definition.scss +4 -1
- package/styles/gantt/_bootstrap5-definition.scss +4 -2
- package/styles/gantt/_fabric-dark-definition.scss +4 -1
- package/styles/gantt/_fabric-definition.scss +4 -1
- package/styles/gantt/_fluent-definition.scss +6 -4
- package/styles/gantt/_fusionnew-definition.scss +12 -10
- package/styles/gantt/_highcontrast-definition.scss +4 -1
- package/styles/gantt/_highcontrast-light-definition.scss +4 -1
- package/styles/gantt/_layout.scss +143 -51
- package/styles/gantt/_material-dark-definition.scss +4 -1
- package/styles/gantt/_material-definition.scss +4 -1
- package/styles/gantt/_material3-definition.scss +13 -11
- package/styles/gantt/_tailwind-definition.scss +4 -2
- package/styles/gantt/_theme.scss +29 -29
- package/styles/gantt/bootstrap-dark.css +115 -62
- package/styles/gantt/bootstrap.css +115 -62
- package/styles/gantt/bootstrap4.css +115 -62
- package/styles/gantt/bootstrap5-dark.css +119 -63
- package/styles/gantt/bootstrap5.css +119 -63
- package/styles/gantt/fabric-dark.css +115 -62
- package/styles/gantt/fabric.css +115 -62
- package/styles/gantt/fluent-dark.css +126 -66
- package/styles/gantt/fluent.css +124 -64
- package/styles/gantt/highcontrast-light.css +120 -62
- package/styles/gantt/highcontrast.css +120 -62
- package/styles/gantt/material-dark.css +120 -65
- package/styles/gantt/material.css +118 -65
- package/styles/gantt/tailwind-dark.css +117 -64
- package/styles/gantt/tailwind.css +117 -64
- package/styles/highcontrast-light.css +120 -62
- package/styles/highcontrast.css +120 -62
- package/styles/material-dark.css +120 -65
- package/styles/material.css +118 -65
- package/styles/tailwind-dark.css +117 -64
- package/styles/tailwind.css +117 -64
|
@@ -1733,7 +1733,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
1733
1733
|
* @returns {void} .
|
|
1734
1734
|
* @public
|
|
1735
1735
|
*/
|
|
1736
|
-
expandByID(id: number): void;
|
|
1736
|
+
expandByID(id: number | string): void;
|
|
1737
1737
|
/**
|
|
1738
1738
|
* Collapse the record by index value.
|
|
1739
1739
|
*
|
|
@@ -1749,7 +1749,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
1749
1749
|
* @returns {void} .
|
|
1750
1750
|
* @public
|
|
1751
1751
|
*/
|
|
1752
|
-
collapseByID(id: number): void;
|
|
1752
|
+
collapseByID(id: number | string): void;
|
|
1753
1753
|
/**
|
|
1754
1754
|
* Method to add record.
|
|
1755
1755
|
*
|
|
@@ -1860,7 +1860,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
1860
1860
|
* @returns {void} .
|
|
1861
1861
|
* @public
|
|
1862
1862
|
*/
|
|
1863
|
-
addPredecessor(id: number, predecessorString: string): void;
|
|
1863
|
+
addPredecessor(id: number | string, predecessorString: string): void;
|
|
1864
1864
|
/**
|
|
1865
1865
|
* To remove dependency from task.
|
|
1866
1866
|
*
|
|
@@ -1868,7 +1868,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
1868
1868
|
* @returns {void} .
|
|
1869
1869
|
* @public
|
|
1870
1870
|
*/
|
|
1871
|
-
removePredecessor(id: number): void;
|
|
1871
|
+
removePredecessor(id: number | string): void;
|
|
1872
1872
|
/**
|
|
1873
1873
|
* To modify current dependency values of Task by task id.
|
|
1874
1874
|
*
|
|
@@ -1877,7 +1877,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
1877
1877
|
* @returns {void} .
|
|
1878
1878
|
* @public
|
|
1879
1879
|
*/
|
|
1880
|
-
updatePredecessor(id: number, predecessorString: string): void;
|
|
1880
|
+
updatePredecessor(id: number | string, predecessorString: string): void;
|
|
1881
1881
|
/**
|
|
1882
1882
|
* Method to open Add dialog.
|
|
1883
1883
|
*
|
|
@@ -1892,7 +1892,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
1892
1892
|
* @returns {void} .
|
|
1893
1893
|
* @public
|
|
1894
1894
|
*/
|
|
1895
|
-
openEditDialog(taskId?: number): void;
|
|
1895
|
+
openEditDialog(taskId?: number | string): void;
|
|
1896
1896
|
/**
|
|
1897
1897
|
* Changes the TreeGrid column positions by field names.
|
|
1898
1898
|
*
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -391,6 +391,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
391
391
|
if (this.enableValidation) {
|
|
392
392
|
this.dataOperation.updateGanttData();
|
|
393
393
|
}
|
|
394
|
+
this.predecessorModule.updateParentPredecessor();
|
|
394
395
|
if (this.dataSource instanceof Object && isCountRequired(this)) {
|
|
395
396
|
var count = getValue('count', this.dataSource);
|
|
396
397
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
@@ -403,6 +404,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
403
404
|
if (this.enableValidation) {
|
|
404
405
|
this.dataOperation.updateGanttData();
|
|
405
406
|
}
|
|
407
|
+
this.predecessorModule.updateParentPredecessor();
|
|
406
408
|
this.treeGridPane.classList.remove('e-temp-content');
|
|
407
409
|
remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
|
|
408
410
|
this.notify('dataReady', {});
|
|
@@ -714,7 +716,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
714
716
|
{
|
|
715
717
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
716
718
|
bottomTier: { unit: 'Minutes', format: 'mm', count: 30 }, timelineUnitSize: 66, level: 22,
|
|
717
|
-
timelineViewMode: 'Hour', weekStartDay:
|
|
719
|
+
timelineViewMode: 'Hour', weekStartDay: 0, updateTimescaleView: true, weekendBackground: null, showTooltip: true
|
|
718
720
|
},
|
|
719
721
|
{
|
|
720
722
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
@@ -2055,7 +2057,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2055
2057
|
Gantt.prototype.setSplitterPosition = function (value, type) {
|
|
2056
2058
|
var tempSplitterSettings = {};
|
|
2057
2059
|
tempSplitterSettings[type] = value;
|
|
2058
|
-
var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings
|
|
2060
|
+
var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings);
|
|
2059
2061
|
var pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
|
|
2060
2062
|
var pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
|
|
2061
2063
|
this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
|
|
@@ -2137,7 +2139,10 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2137
2139
|
if (this.viewType === 'ResourceView') {
|
|
2138
2140
|
this.editModule.addRowPosition = rowPosition;
|
|
2139
2141
|
this.editModule.addRowIndex = rowIndex;
|
|
2140
|
-
var resources =
|
|
2142
|
+
var resources = void 0;
|
|
2143
|
+
if (!isNullOrUndefined(data)) {
|
|
2144
|
+
resources = data[this.taskFields.resourceInfo];
|
|
2145
|
+
}
|
|
2141
2146
|
var id = void 0;
|
|
2142
2147
|
var parentTask = void 0;
|
|
2143
2148
|
if (!isNullOrUndefined(resources) && resources.length) {
|
|
@@ -2635,6 +2640,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2635
2640
|
*/
|
|
2636
2641
|
Gantt.prototype.showColumn = function (keys, showBy) {
|
|
2637
2642
|
this.treeGrid.showColumns(keys, showBy);
|
|
2643
|
+
this.updateTreeColumns();
|
|
2638
2644
|
};
|
|
2639
2645
|
/**
|
|
2640
2646
|
* Hides a column by column name.
|
|
@@ -2646,6 +2652,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
2646
2652
|
*/
|
|
2647
2653
|
Gantt.prototype.hideColumn = function (keys, hideBy) {
|
|
2648
2654
|
this.treeGrid.hideColumns(keys, hideBy);
|
|
2655
|
+
this.updateTreeColumns();
|
|
2649
2656
|
};
|
|
2650
2657
|
/**
|
|
2651
2658
|
* To set scroll top for chart scroll container.
|
|
@@ -37,6 +37,10 @@ export interface IGanttData {
|
|
|
37
37
|
parentItem?: IParent;
|
|
38
38
|
/** Defines the parent unique id of task. */
|
|
39
39
|
parentUniqueID?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Specifies the checkbox state of a record
|
|
42
|
+
*/
|
|
43
|
+
checkboxState?: string;
|
|
40
44
|
/** Defines the data which specified in data source.
|
|
41
45
|
*
|
|
42
46
|
* @isGenericType true
|
|
@@ -17,11 +17,11 @@ export declare class Splitter {
|
|
|
17
17
|
renderSplitter(): void;
|
|
18
18
|
/**
|
|
19
19
|
* @param {SplitterSettingsModel} splitter .
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
* @returns {string} .
|
|
22
22
|
* @private
|
|
23
23
|
*/
|
|
24
|
-
calculateSplitterPosition(splitter: SplitterSettingsModel
|
|
24
|
+
calculateSplitterPosition(splitter: SplitterSettingsModel): string;
|
|
25
25
|
/**
|
|
26
26
|
* @param {string} position .
|
|
27
27
|
* @returns {string} .
|
|
@@ -74,11 +74,11 @@ var Splitter = /** @class */ (function () {
|
|
|
74
74
|
};
|
|
75
75
|
/**
|
|
76
76
|
* @param {SplitterSettingsModel} splitter .
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
* @returns {string} .
|
|
79
79
|
* @private
|
|
80
80
|
*/
|
|
81
|
-
Splitter.prototype.calculateSplitterPosition = function (splitter
|
|
81
|
+
Splitter.prototype.calculateSplitterPosition = function (splitter) {
|
|
82
82
|
if (!isNullOrUndefined(this.splitterObject) && this.parent.enablePersistence) {
|
|
83
83
|
return this.splitterObject.paneSettings[0].size;
|
|
84
84
|
}
|
|
@@ -94,8 +94,7 @@ var Splitter = /** @class */ (function () {
|
|
|
94
94
|
}
|
|
95
95
|
else if (!isNullOrUndefined(splitter.columnIndex) && splitter.columnIndex >= 0) {
|
|
96
96
|
if ((splitter.columnIndex * 150) < this.parent.ganttWidth || !this.parent.element.classList.contains('e-device')) {
|
|
97
|
-
return
|
|
98
|
-
this.getSpliterPositionInPercentage((splitter.columnIndex * 150) + 'px');
|
|
97
|
+
return this.getSpliterPositionInPercentage(this.getTotalColumnWidthByIndex(splitter.columnIndex).toString() + 'px');
|
|
99
98
|
}
|
|
100
99
|
else {
|
|
101
100
|
return this.getSpliterPositionInPercentage((splitter.columnIndex * 130) + 'px');
|
|
@@ -131,10 +130,10 @@ var Splitter = /** @class */ (function () {
|
|
|
131
130
|
*/
|
|
132
131
|
Splitter.prototype.getTotalColumnWidthByIndex = function (index) {
|
|
133
132
|
var width = 0;
|
|
134
|
-
var tr = this.parent.
|
|
133
|
+
var tr = this.parent.ganttColumns;
|
|
135
134
|
index = tr.length > index ? index : tr.length;
|
|
136
135
|
for (var column = 0; column < index; column++) {
|
|
137
|
-
width = width + tr[column].
|
|
136
|
+
width = width + parseInt(tr[column].width);
|
|
138
137
|
}
|
|
139
138
|
return width;
|
|
140
139
|
};
|
|
@@ -145,7 +144,7 @@ var Splitter = /** @class */ (function () {
|
|
|
145
144
|
Splitter.prototype.updateSplitterPosition = function () {
|
|
146
145
|
this.splitterObject.separatorSize = this.parent.splitterSettings.separatorSize >= 4 ?
|
|
147
146
|
this.parent.splitterSettings.separatorSize : 4;
|
|
148
|
-
var splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings
|
|
147
|
+
var splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings);
|
|
149
148
|
this.splitterObject.paneSettings[0].min = this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum);
|
|
150
149
|
this.splitterObject.dataBind();
|
|
151
150
|
this.splitterObject.paneSettings[0].size = splitterPosition;
|
|
@@ -223,7 +223,9 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
223
223
|
};
|
|
224
224
|
TaskProcessor.prototype.calculateSharedTaskUniqueIds = function () {
|
|
225
225
|
var _loop_2 = function (i) {
|
|
226
|
-
var value =
|
|
226
|
+
var value = [];
|
|
227
|
+
value[0] = this_2.parent.getTaskIds()[i][0];
|
|
228
|
+
value[1] = this_2.parent.getTaskIds()[i].slice(1);
|
|
227
229
|
if (value[0] !== 'R') {
|
|
228
230
|
var sharedRecords_1 = [];
|
|
229
231
|
var ids_1 = [];
|
|
@@ -290,7 +292,6 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
290
292
|
this_3.parent.setRecordValue('autoDuration', this_3.calculateAutoDuration(parentProp), parentProp, true);
|
|
291
293
|
this_3.updateAutoWidthLeft(parentData);
|
|
292
294
|
}
|
|
293
|
-
this_3.resetDependency(parentData);
|
|
294
295
|
this_3.updateWidthLeft(parentData);
|
|
295
296
|
this_3.updateTaskData(parentData);
|
|
296
297
|
}
|
|
@@ -315,7 +316,8 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
315
316
|
var length = columns.length;
|
|
316
317
|
if (length) {
|
|
317
318
|
for (var i = 0; i < length; i++) {
|
|
318
|
-
|
|
319
|
+
var fieldName = ganttRecord[columns[i].field];
|
|
320
|
+
if (fieldName === undefined) {
|
|
319
321
|
this.parent.setRecordValue(columns[i].field, data[columns[i].field], ganttRecord);
|
|
320
322
|
}
|
|
321
323
|
}
|
|
@@ -364,6 +366,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
364
366
|
this.parent.setRecordValue('parentId', data[taskSettings.parentID], ganttProperties, true);
|
|
365
367
|
}
|
|
366
368
|
this.addCustomFieldValue(data, ganttData);
|
|
369
|
+
ganttData.checkboxState = 'uncheck';
|
|
367
370
|
this.parent.setRecordValue('isAutoSchedule', autoSchedule, ganttProperties, true);
|
|
368
371
|
this.parent.setRecordValue('resourceInfo', this.setResourceInfo(data), ganttProperties, true);
|
|
369
372
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
@@ -406,7 +409,6 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
406
409
|
if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
|
|
407
410
|
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
408
411
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
409
|
-
this.resetDependency(ganttData);
|
|
410
412
|
}
|
|
411
413
|
else {
|
|
412
414
|
this.parent.setRecordValue('hasChildRecords', false, ganttData);
|
|
@@ -449,6 +451,9 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
449
451
|
}
|
|
450
452
|
else {
|
|
451
453
|
var uniqueId = ganttData.uniqueID.replace(this.parent.element.id + '_data_', '');
|
|
454
|
+
if (this.parent.viewType === 'ResourceView' && typeof (ganttData.ganttProperties.taskId) === "string") {
|
|
455
|
+
uniqueId = ganttProperties.taskId.toString();
|
|
456
|
+
}
|
|
452
457
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttData);
|
|
453
458
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttProperties, true);
|
|
454
459
|
this.parent.setRecordValue('sharedTaskUniqueIds', [], ganttProperties, true);
|
|
@@ -1568,10 +1573,12 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1568
1573
|
TaskProcessor.prototype.updateResourceName = function (data) {
|
|
1569
1574
|
var resourceInfo = data.ganttProperties.resourceInfo;
|
|
1570
1575
|
var resourceName = [];
|
|
1576
|
+
var taskMapping = this.parent.taskFields;
|
|
1571
1577
|
if (resourceInfo) {
|
|
1578
|
+
var resourceLength = resourceInfo.length;
|
|
1572
1579
|
var taskResources = extend([], [], data.taskData[this.parent.taskFields.resourceInfo], true);
|
|
1573
1580
|
this.parent.setRecordValue('taskData.' + this.parent.taskFields.resourceInfo, [], data);
|
|
1574
|
-
for (var i = 0; i <
|
|
1581
|
+
for (var i = 0; i < resourceLength; i++) {
|
|
1575
1582
|
var resource = resourceInfo[i];
|
|
1576
1583
|
var resName = resource[this.parent.resourceFields.name];
|
|
1577
1584
|
var resourceUnit = resource[this.parent.resourceFields.unit];
|
|
@@ -1580,7 +1587,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1580
1587
|
}
|
|
1581
1588
|
resourceName.push(resName);
|
|
1582
1589
|
if (data.taskData) {
|
|
1583
|
-
var mapping =
|
|
1590
|
+
var mapping = taskMapping.resourceInfo;
|
|
1584
1591
|
// eslint-disable-next-line
|
|
1585
1592
|
if (typeof (taskResources[i] === 'object')) {
|
|
1586
1593
|
data.taskData[mapping].push(taskResources[i]);
|
|
@@ -2260,7 +2267,6 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2260
2267
|
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
2261
2268
|
this.updateAutoWidthLeft(parentData);
|
|
2262
2269
|
}
|
|
2263
|
-
this.resetDependency(parentData);
|
|
2264
2270
|
this.updateWidthLeft(parentData);
|
|
2265
2271
|
this.updateTaskData(parentData);
|
|
2266
2272
|
}
|
|
@@ -587,11 +587,30 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
587
587
|
*/
|
|
588
588
|
GanttTreeGrid.prototype.composeIDColumn = function (column) {
|
|
589
589
|
var isProjectView = this.parent.viewType === 'ProjectView';
|
|
590
|
+
var lengthDataSource = this.parent.dataSource['length'];
|
|
591
|
+
var taskIDName;
|
|
590
592
|
column.isPrimaryKey = isProjectView ? true : false;
|
|
591
593
|
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
|
|
592
594
|
column.width = column.width ? column.width : 100;
|
|
593
|
-
|
|
594
|
-
|
|
595
|
+
for (var i = 0; i < lengthDataSource; i++) {
|
|
596
|
+
if (!isNullOrUndefined(this.parent.dataSource[i][this.parent.taskFields.id])) {
|
|
597
|
+
taskIDName = this.parent.dataSource[i][this.parent.taskFields.id];
|
|
598
|
+
break;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
if (typeof (taskIDName) === "string") {
|
|
602
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
603
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
604
|
+
}
|
|
605
|
+
else {
|
|
606
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : true;
|
|
607
|
+
}
|
|
608
|
+
column.editType = column.editType ? column.editType : 'stringedit';
|
|
609
|
+
}
|
|
610
|
+
else {
|
|
611
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
612
|
+
column.editType = column.editType ? column.editType : 'numericedit';
|
|
613
|
+
}
|
|
595
614
|
column.valueAccessor = isProjectView ? null : this.idValueAccessor.bind(this);
|
|
596
615
|
};
|
|
597
616
|
GanttTreeGrid.prototype.composeUniqueIDColumn = function (column) {
|