@syncfusion/ej2-gantt 20.2.50 → 20.3.48
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 +23 -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 +959 -346
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +989 -365
- 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 +124 -19
- package/src/gantt/actions/edit.js +72 -11
- package/src/gantt/actions/filter.d.ts +3 -0
- package/src/gantt/actions/filter.js +30 -6
- 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/base/enum.d.ts +3 -1
- package/src/gantt/base/gantt-chart.js +11 -6
- package/src/gantt/base/gantt.d.ts +6 -6
- package/src/gantt/base/gantt.js +13 -4
- 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/timeline.js +1 -1
- package/src/gantt/renderer/tooltip.js +3 -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
|
@@ -6,7 +6,7 @@ import { ColumnMenu, ContextMenu, Edit as Edit$1, ExcelExport, Filter, Reorder,
|
|
|
6
6
|
import { Splitter } from '@syncfusion/ej2-layouts';
|
|
7
7
|
import { ContextMenu as ContextMenu$1, Tab, Toolbar as Toolbar$1 } from '@syncfusion/ej2-navigations';
|
|
8
8
|
import { Count, HtmlEditor, Link, QuickToolbar, RichTextEditor, Toolbar as Toolbar$2 } from '@syncfusion/ej2-richtexteditor';
|
|
9
|
-
import { MaskedTextBox, NumericTextBox, TextBox } from '@syncfusion/ej2-inputs';
|
|
9
|
+
import { FormValidator, MaskedTextBox, NumericTextBox, TextBox } from '@syncfusion/ej2-inputs';
|
|
10
10
|
import { CheckBox } from '@syncfusion/ej2-buttons';
|
|
11
11
|
import { DatePicker, DateTimePicker } from '@syncfusion/ej2-calendars';
|
|
12
12
|
import { CheckBoxSelection, ComboBox, DropDownList, MultiSelect } from '@syncfusion/ej2-dropdowns';
|
|
@@ -1712,7 +1712,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
1712
1712
|
}
|
|
1713
1713
|
calculateSharedTaskUniqueIds() {
|
|
1714
1714
|
for (let i = 0; i < this.parent.getTaskIds().length; i++) {
|
|
1715
|
-
const value =
|
|
1715
|
+
const value = [];
|
|
1716
|
+
value[0] = this.parent.getTaskIds()[i][0];
|
|
1717
|
+
value[1] = this.parent.getTaskIds()[i].slice(1);
|
|
1716
1718
|
if (value[0] !== 'R') {
|
|
1717
1719
|
const sharedRecords = [];
|
|
1718
1720
|
const ids = [];
|
|
@@ -1774,7 +1776,6 @@ class TaskProcessor extends DateProcessor {
|
|
|
1774
1776
|
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
1775
1777
|
this.updateAutoWidthLeft(parentData);
|
|
1776
1778
|
}
|
|
1777
|
-
this.resetDependency(parentData);
|
|
1778
1779
|
this.updateWidthLeft(parentData);
|
|
1779
1780
|
this.updateTaskData(parentData);
|
|
1780
1781
|
}
|
|
@@ -1795,7 +1796,8 @@ class TaskProcessor extends DateProcessor {
|
|
|
1795
1796
|
const length = columns.length;
|
|
1796
1797
|
if (length) {
|
|
1797
1798
|
for (let i = 0; i < length; i++) {
|
|
1798
|
-
|
|
1799
|
+
const fieldName = ganttRecord[columns[i].field];
|
|
1800
|
+
if (fieldName === undefined) {
|
|
1799
1801
|
this.parent.setRecordValue(columns[i].field, data[columns[i].field], ganttRecord);
|
|
1800
1802
|
}
|
|
1801
1803
|
}
|
|
@@ -1844,6 +1846,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
1844
1846
|
this.parent.setRecordValue('parentId', data[taskSettings.parentID], ganttProperties, true);
|
|
1845
1847
|
}
|
|
1846
1848
|
this.addCustomFieldValue(data, ganttData);
|
|
1849
|
+
ganttData.checkboxState = 'uncheck';
|
|
1847
1850
|
this.parent.setRecordValue('isAutoSchedule', autoSchedule, ganttProperties, true);
|
|
1848
1851
|
this.parent.setRecordValue('resourceInfo', this.setResourceInfo(data), ganttProperties, true);
|
|
1849
1852
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
@@ -1886,7 +1889,6 @@ class TaskProcessor extends DateProcessor {
|
|
|
1886
1889
|
if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
|
|
1887
1890
|
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
1888
1891
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
1889
|
-
this.resetDependency(ganttData);
|
|
1890
1892
|
}
|
|
1891
1893
|
else {
|
|
1892
1894
|
this.parent.setRecordValue('hasChildRecords', false, ganttData);
|
|
@@ -1928,7 +1930,10 @@ class TaskProcessor extends DateProcessor {
|
|
|
1928
1930
|
this.parent.setRecordValue('rowUniqueID', ganttProperties.taskId.toString(), ganttProperties, true);
|
|
1929
1931
|
}
|
|
1930
1932
|
else {
|
|
1931
|
-
|
|
1933
|
+
let uniqueId = ganttData.uniqueID.replace(this.parent.element.id + '_data_', '');
|
|
1934
|
+
if (this.parent.viewType === 'ResourceView' && typeof (ganttData.ganttProperties.taskId) === "string") {
|
|
1935
|
+
uniqueId = ganttProperties.taskId.toString();
|
|
1936
|
+
}
|
|
1932
1937
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttData);
|
|
1933
1938
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttProperties, true);
|
|
1934
1939
|
this.parent.setRecordValue('sharedTaskUniqueIds', [], ganttProperties, true);
|
|
@@ -3040,10 +3045,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
3040
3045
|
updateResourceName(data) {
|
|
3041
3046
|
const resourceInfo = data.ganttProperties.resourceInfo;
|
|
3042
3047
|
const resourceName = [];
|
|
3048
|
+
const taskMapping = this.parent.taskFields;
|
|
3043
3049
|
if (resourceInfo) {
|
|
3050
|
+
const resourceLength = resourceInfo.length;
|
|
3044
3051
|
const taskResources = extend([], [], data.taskData[this.parent.taskFields.resourceInfo], true);
|
|
3045
3052
|
this.parent.setRecordValue('taskData.' + this.parent.taskFields.resourceInfo, [], data);
|
|
3046
|
-
for (let i = 0; i <
|
|
3053
|
+
for (let i = 0; i < resourceLength; i++) {
|
|
3047
3054
|
const resource = resourceInfo[i];
|
|
3048
3055
|
let resName = resource[this.parent.resourceFields.name];
|
|
3049
3056
|
const resourceUnit = resource[this.parent.resourceFields.unit];
|
|
@@ -3052,7 +3059,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3052
3059
|
}
|
|
3053
3060
|
resourceName.push(resName);
|
|
3054
3061
|
if (data.taskData) {
|
|
3055
|
-
const mapping =
|
|
3062
|
+
const mapping = taskMapping.resourceInfo;
|
|
3056
3063
|
// eslint-disable-next-line
|
|
3057
3064
|
if (typeof (taskResources[i] === 'object')) {
|
|
3058
3065
|
data.taskData[mapping].push(taskResources[i]);
|
|
@@ -3731,7 +3738,6 @@ class TaskProcessor extends DateProcessor {
|
|
|
3731
3738
|
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
3732
3739
|
this.updateAutoWidthLeft(parentData);
|
|
3733
3740
|
}
|
|
3734
|
-
this.resetDependency(parentData);
|
|
3735
3741
|
this.updateWidthLeft(parentData);
|
|
3736
3742
|
this.updateTaskData(parentData);
|
|
3737
3743
|
}
|
|
@@ -4287,7 +4293,7 @@ class GanttChart {
|
|
|
4287
4293
|
renderTimelineContainer() {
|
|
4288
4294
|
this.chartTimelineContainer =
|
|
4289
4295
|
createElement('div', { className: timelineHeaderContainer });
|
|
4290
|
-
this.chartTimelineContainer.setAttribute("role", "
|
|
4296
|
+
this.chartTimelineContainer.setAttribute("role", "presentation");
|
|
4291
4297
|
this.chartElement.appendChild(this.chartTimelineContainer);
|
|
4292
4298
|
}
|
|
4293
4299
|
/**
|
|
@@ -4413,12 +4419,10 @@ class GanttChart {
|
|
|
4413
4419
|
}
|
|
4414
4420
|
}
|
|
4415
4421
|
ganttChartMouseClick(e) {
|
|
4416
|
-
if (this.parent.
|
|
4417
|
-
|
|
4418
|
-
this.scrollToTarget(e); /** Scroll to task */
|
|
4419
|
-
}
|
|
4420
|
-
this.parent.notify('chartMouseClick', e);
|
|
4422
|
+
if (this.parent.autoFocusTasks) {
|
|
4423
|
+
this.scrollToTarget(e); /** Scroll to task */
|
|
4421
4424
|
}
|
|
4425
|
+
this.parent.notify('chartMouseClick', e);
|
|
4422
4426
|
}
|
|
4423
4427
|
ganttChartMouseUp(e) {
|
|
4424
4428
|
if (this.parent.editSettings.allowTaskbarEditing) {
|
|
@@ -4752,6 +4756,10 @@ class GanttChart {
|
|
|
4752
4756
|
this.parent.updatedConnectorLineCollection = [];
|
|
4753
4757
|
this.parent.predecessorModule.createConnectorLinesCollection();
|
|
4754
4758
|
this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection);
|
|
4759
|
+
if (this.parent.enableCriticalPath && this.parent.criticalPathModule) {
|
|
4760
|
+
let criticalModule = this.parent.criticalPathModule;
|
|
4761
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
4762
|
+
}
|
|
4755
4763
|
}
|
|
4756
4764
|
/**
|
|
4757
4765
|
* To collapse gantt rows
|
|
@@ -4780,6 +4788,9 @@ class GanttChart {
|
|
|
4780
4788
|
* @private
|
|
4781
4789
|
*/
|
|
4782
4790
|
collapsedGanttRow(args) {
|
|
4791
|
+
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
4792
|
+
return;
|
|
4793
|
+
}
|
|
4783
4794
|
const record = getValue('data', args);
|
|
4784
4795
|
if (this.isExpandCollapseFromChart) {
|
|
4785
4796
|
this.expandCollapseChartRows('collapse', getValue('chartRow', args), record, null);
|
|
@@ -6282,7 +6293,7 @@ class Timeline {
|
|
|
6282
6293
|
endDate.setHours(24, 0, 0, 0);
|
|
6283
6294
|
}
|
|
6284
6295
|
}
|
|
6285
|
-
if ((this.isZooming || this.parent.isLoad) && isNullOrUndefined(this.parent.projectEndDate)) {
|
|
6296
|
+
if ((this.isZooming || this.parent.isLoad || this.parent.isFromOnPropertyChange) && isNullOrUndefined(this.parent.projectEndDate)) {
|
|
6286
6297
|
this.updateTimelineAfterZooming(endDate, false);
|
|
6287
6298
|
}
|
|
6288
6299
|
return endDate;
|
|
@@ -7437,11 +7448,30 @@ class GanttTreeGrid {
|
|
|
7437
7448
|
*/
|
|
7438
7449
|
composeIDColumn(column) {
|
|
7439
7450
|
const isProjectView = this.parent.viewType === 'ProjectView';
|
|
7451
|
+
let lengthDataSource = this.parent.dataSource['length'];
|
|
7452
|
+
let taskIDName;
|
|
7440
7453
|
column.isPrimaryKey = isProjectView ? true : false;
|
|
7441
7454
|
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
|
|
7442
7455
|
column.width = column.width ? column.width : 100;
|
|
7443
|
-
|
|
7444
|
-
|
|
7456
|
+
for (let i = 0; i < lengthDataSource; i++) {
|
|
7457
|
+
if (!isNullOrUndefined(this.parent.dataSource[i][this.parent.taskFields.id])) {
|
|
7458
|
+
taskIDName = this.parent.dataSource[i][this.parent.taskFields.id];
|
|
7459
|
+
break;
|
|
7460
|
+
}
|
|
7461
|
+
}
|
|
7462
|
+
if (typeof (taskIDName) === "string") {
|
|
7463
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
7464
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7465
|
+
}
|
|
7466
|
+
else {
|
|
7467
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : true;
|
|
7468
|
+
}
|
|
7469
|
+
column.editType = column.editType ? column.editType : 'stringedit';
|
|
7470
|
+
}
|
|
7471
|
+
else {
|
|
7472
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7473
|
+
column.editType = column.editType ? column.editType : 'numericedit';
|
|
7474
|
+
}
|
|
7445
7475
|
column.valueAccessor = isProjectView ? null : this.idValueAccessor.bind(this);
|
|
7446
7476
|
}
|
|
7447
7477
|
composeUniqueIDColumn(column) {
|
|
@@ -8120,7 +8150,7 @@ class ChartRows extends DateProcessor {
|
|
|
8120
8150
|
* @private
|
|
8121
8151
|
*/
|
|
8122
8152
|
getIndicatorNode(indicator) {
|
|
8123
|
-
const templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"
|
|
8153
|
+
const templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"style="line-height:'
|
|
8124
8154
|
+ (this.parent.rowHeight) + 'px;' +
|
|
8125
8155
|
'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
|
|
8126
8156
|
return this.createDivElement(templateString);
|
|
@@ -8636,7 +8666,7 @@ class ChartRows extends DateProcessor {
|
|
|
8636
8666
|
*/
|
|
8637
8667
|
getTaskBaselineNode() {
|
|
8638
8668
|
const data = this.templateData;
|
|
8639
|
-
const template = '<div class="' + baselineBar + ' ' + '" role="
|
|
8669
|
+
const template = '<div class="' + baselineBar + ' ' + '" role="term" style="margin-top:' + this.baselineTop +
|
|
8640
8670
|
'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
|
|
8641
8671
|
'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
|
|
8642
8672
|
this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
|
|
@@ -8889,10 +8919,10 @@ class ChartRows extends DateProcessor {
|
|
|
8889
8919
|
const className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
|
|
8890
8920
|
'e-chart-row-border' : '';
|
|
8891
8921
|
table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + '"' +
|
|
8892
|
-
'
|
|
8922
|
+
'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
8893
8923
|
this.parent.rowHeight + 'px;">' +
|
|
8894
8924
|
'<td class="' + chartRowCell + ' ' + className
|
|
8895
|
-
+ '"
|
|
8925
|
+
+ '"style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
|
|
8896
8926
|
return table.childNodes;
|
|
8897
8927
|
}
|
|
8898
8928
|
/**
|
|
@@ -8957,7 +8987,7 @@ class ChartRows extends DateProcessor {
|
|
|
8957
8987
|
}
|
|
8958
8988
|
leftLabelContainer() {
|
|
8959
8989
|
const template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
|
|
8960
|
-
leftLabelContainer) + ' ' + '" tabindex="-1" role="
|
|
8990
|
+
leftLabelContainer) + ' ' + '" tabindex="-1" role="term" style="height:' +
|
|
8961
8991
|
(this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
|
|
8962
8992
|
return this.createDivElement(template);
|
|
8963
8993
|
}
|
|
@@ -8969,7 +8999,7 @@ class ChartRows extends DateProcessor {
|
|
|
8969
8999
|
const template = '<div class="' + taskBarMainContainer + ' ' +
|
|
8970
9000
|
this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
|
|
8971
9001
|
((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
|
|
8972
|
-
' tabindex="-1" role="
|
|
9002
|
+
' tabindex="-1" role="term" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
|
|
8973
9003
|
('width:' + this.milestoneHeight + 'px;height:' +
|
|
8974
9004
|
this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
|
|
8975
9005
|
(this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
|
|
@@ -8980,26 +9010,26 @@ class ChartRows extends DateProcessor {
|
|
|
8980
9010
|
}
|
|
8981
9011
|
rightLabelContainer() {
|
|
8982
9012
|
const template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
|
|
8983
|
-
rightLabelContainer) + '" ' + ' tabindex="-1" role="
|
|
9013
|
+
rightLabelContainer) + '" ' + ' tabindex="-1" role="term" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
|
|
8984
9014
|
+ (this.parent.rowHeight - 2) + 'px;"></div>';
|
|
8985
9015
|
return this.createDivElement(template);
|
|
8986
9016
|
}
|
|
8987
9017
|
childTaskbarLeftResizer() {
|
|
8988
9018
|
const lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
|
|
8989
9019
|
const template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
|
|
8990
|
-
'
|
|
9020
|
+
'style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
8991
9021
|
return this.createDivElement(template);
|
|
8992
9022
|
}
|
|
8993
9023
|
childTaskbarRightResizer() {
|
|
8994
9024
|
const rResizerLeft = this.parent.isAdaptive ? -2 : -10;
|
|
8995
9025
|
const template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
|
|
8996
|
-
'
|
|
9026
|
+
'style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
8997
9027
|
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
8998
9028
|
return this.createDivElement(template);
|
|
8999
9029
|
}
|
|
9000
9030
|
childTaskbarProgressResizer() {
|
|
9001
9031
|
const template = '<div class="' + childProgressResizer + '"' +
|
|
9002
|
-
'
|
|
9032
|
+
'style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
|
|
9003
9033
|
(this.taskBarHeight - 4) + 'px;"><div class="' + progressBarHandler + '"' +
|
|
9004
9034
|
'><div class="' + progressHandlerElement + '"></div>' +
|
|
9005
9035
|
'<div class="' + progressBarHandlerAfter + '"></div></div>';
|
|
@@ -9010,9 +9040,16 @@ class ChartRows extends DateProcessor {
|
|
|
9010
9040
|
const pointerLeft = -((this.parent.isAdaptive ? 14 : 2) + this.connectorPointWidth);
|
|
9011
9041
|
const mileStoneLeft = -(this.connectorPointWidth + 2);
|
|
9012
9042
|
const pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9043
|
+
let marginTop;
|
|
9044
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9045
|
+
marginTop = '';
|
|
9046
|
+
}
|
|
9047
|
+
else {
|
|
9048
|
+
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
9049
|
+
}
|
|
9013
9050
|
const template = '<div class="' + leftConnectorPointOuterDiv + '" style="' +
|
|
9014
9051
|
((data.ganttProperties.isMilestone) ? ('margin-top:' + pointerTop + 'px;left:' + mileStoneLeft +
|
|
9015
|
-
'px;') : (
|
|
9052
|
+
'px;') : (marginTop + ';left:' + pointerLeft + 'px;')) + '">' +
|
|
9016
9053
|
'<div class="' + connectorPointLeft + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
9017
9054
|
'" style="width: ' + this.connectorPointWidth + 'px;' +
|
|
9018
9055
|
'height: ' + this.connectorPointWidth + 'px;">' + this.touchLeftConnectorpoint + '</div></div>';
|
|
@@ -9022,10 +9059,16 @@ class ChartRows extends DateProcessor {
|
|
|
9022
9059
|
const data = this.templateData;
|
|
9023
9060
|
const pointerRight = this.parent.isAdaptive ? 10 : -2;
|
|
9024
9061
|
const pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9062
|
+
let marginTop;
|
|
9063
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9064
|
+
marginTop = '';
|
|
9065
|
+
}
|
|
9066
|
+
else {
|
|
9067
|
+
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
9068
|
+
}
|
|
9025
9069
|
const template = '<div class="' + rightConnectorPointOuterDiv + '" style="' +
|
|
9026
9070
|
((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
|
|
9027
|
-
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;
|
|
9028
|
-
this.connectorPointMargin + 'px;')) + '">' +
|
|
9071
|
+
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
|
|
9029
9072
|
'<div class="' + connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
9030
9073
|
'" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
|
|
9031
9074
|
this.touchRightConnectorpoint + '</div></div>';
|
|
@@ -9325,14 +9368,17 @@ class ChartRows extends DateProcessor {
|
|
|
9325
9368
|
const taskbarContainerNode = this.taskbarContainer();
|
|
9326
9369
|
taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
|
|
9327
9370
|
taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
|
|
9328
|
-
|
|
9329
|
-
|
|
9371
|
+
const connectorLineLeftNode = this.getLeftPointNode();
|
|
9372
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
9330
9373
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9331
9374
|
}
|
|
9332
9375
|
if (this.templateData.hasChildRecords) {
|
|
9333
9376
|
const parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
|
|
9334
9377
|
if (!this.templateData.ganttProperties.isAutoSchedule) {
|
|
9335
9378
|
const manualTaskbar = this.getManualTaskbar();
|
|
9379
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9380
|
+
const connectorLineRightNode = this.getRightPointNode();
|
|
9381
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9336
9382
|
taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
|
|
9337
9383
|
}
|
|
9338
9384
|
if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
|
|
@@ -9407,7 +9453,7 @@ class ChartRows extends DateProcessor {
|
|
|
9407
9453
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
9408
9454
|
}
|
|
9409
9455
|
}
|
|
9410
|
-
if (!this.templateData.hasChildRecords) {
|
|
9456
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
9411
9457
|
const connectorLineRightNode = this.getRightPointNode();
|
|
9412
9458
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9413
9459
|
}
|
|
@@ -9809,6 +9855,21 @@ class ChartRows extends DateProcessor {
|
|
|
9809
9855
|
}
|
|
9810
9856
|
return defaultValue;
|
|
9811
9857
|
}
|
|
9858
|
+
generateBaselineAriaLabel(data) {
|
|
9859
|
+
data = this.templateData;
|
|
9860
|
+
let defaultValue = '';
|
|
9861
|
+
const nameConstant = this.parent.localeObj.getConstant('name');
|
|
9862
|
+
const startDateConstant = this.parent.localeObj.getConstant('startDate');
|
|
9863
|
+
const endDateConstant = this.parent.localeObj.getConstant('endDate');
|
|
9864
|
+
const taskNameVal = data.ganttProperties.taskName;
|
|
9865
|
+
const startDateVal = data.ganttProperties.baselineStartDate;
|
|
9866
|
+
const endDateVal = data.ganttProperties.baselineEndDate;
|
|
9867
|
+
defaultValue += 'Baseline' + ' ';
|
|
9868
|
+
defaultValue += nameConstant + ' ' + taskNameVal + ' ';
|
|
9869
|
+
defaultValue += startDateConstant + ' ' + this.parent.getFormatedDate(startDateVal) + ' ';
|
|
9870
|
+
defaultValue += endDateConstant + ' ' + this.parent.getFormatedDate(endDateVal) + ' ';
|
|
9871
|
+
return defaultValue;
|
|
9872
|
+
}
|
|
9812
9873
|
generateSpiltTaskAriaLabel(data, ganttProp) {
|
|
9813
9874
|
let defaultValue = '';
|
|
9814
9875
|
const startDateConstant = this.parent.localeObj.getConstant('startDate');
|
|
@@ -9847,6 +9908,7 @@ class Dependency {
|
|
|
9847
9908
|
constructor(gantt) {
|
|
9848
9909
|
this.parentRecord = [];
|
|
9849
9910
|
this.parentIds = [];
|
|
9911
|
+
this.parentPredecessors = [];
|
|
9850
9912
|
this.parent = gantt;
|
|
9851
9913
|
this.dateValidateModule = this.parent.dateValidationModule;
|
|
9852
9914
|
}
|
|
@@ -9862,9 +9924,7 @@ class Dependency {
|
|
|
9862
9924
|
for (let count = length; count >= 0; count--) {
|
|
9863
9925
|
const ganttData = predecessorTasks[count];
|
|
9864
9926
|
const ganttProp = ganttData.ganttProperties;
|
|
9865
|
-
|
|
9866
|
-
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
9867
|
-
}
|
|
9927
|
+
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
9868
9928
|
}
|
|
9869
9929
|
}
|
|
9870
9930
|
/**
|
|
@@ -9973,8 +10033,29 @@ class Dependency {
|
|
|
9973
10033
|
values = el.split('-');
|
|
9974
10034
|
offsetValue = '-';
|
|
9975
10035
|
}
|
|
9976
|
-
match =
|
|
10036
|
+
match = [];
|
|
9977
10037
|
const ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
10038
|
+
const isExist1 = this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + values[0]) : ids.indexOf(values[0]);
|
|
10039
|
+
if (isExist1 !== -1) {
|
|
10040
|
+
match[0] = values[0];
|
|
10041
|
+
}
|
|
10042
|
+
else {
|
|
10043
|
+
if (ids.indexOf(values[0]) === -1) {
|
|
10044
|
+
match = values[0].split(" ");
|
|
10045
|
+
if (match.length === 1) {
|
|
10046
|
+
if (match[0].indexOf(" ") != -1) {
|
|
10047
|
+
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
10048
|
+
}
|
|
10049
|
+
else {
|
|
10050
|
+
match[0] = values[0].slice(0, -2);
|
|
10051
|
+
match[1] = values[0].slice(-2);
|
|
10052
|
+
}
|
|
10053
|
+
}
|
|
10054
|
+
}
|
|
10055
|
+
else {
|
|
10056
|
+
match[0] = values[0];
|
|
10057
|
+
}
|
|
10058
|
+
}
|
|
9978
10059
|
const isExist = this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + match[0]) : ids.indexOf(match[0]);
|
|
9979
10060
|
/*Validate for appropriate predecessor*/
|
|
9980
10061
|
if (match[0] && isExist !== -1) {
|
|
@@ -10005,10 +10086,18 @@ class Dependency {
|
|
|
10005
10086
|
offsetUnit: offsetUnits.durationUnit,
|
|
10006
10087
|
offset: offsetUnits.duration
|
|
10007
10088
|
};
|
|
10008
|
-
|
|
10009
|
-
|
|
10089
|
+
let fromData = this.parent.connectorLineModule.getRecordByID(obj.to);
|
|
10090
|
+
let toData = this.parent.connectorLineModule.getRecordByID(obj.from);
|
|
10091
|
+
let isValid;
|
|
10092
|
+
if (this.parent.connectorLineEditModule && toData && fromData) {
|
|
10093
|
+
isValid = this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
|
|
10094
|
+
if (isValid)
|
|
10095
|
+
collection.push(obj);
|
|
10096
|
+
}
|
|
10097
|
+
else {
|
|
10010
10098
|
collection.push(obj);
|
|
10011
10099
|
}
|
|
10100
|
+
match.splice(0);
|
|
10012
10101
|
});
|
|
10013
10102
|
return collection;
|
|
10014
10103
|
}
|
|
@@ -10023,6 +10112,9 @@ class Dependency {
|
|
|
10023
10112
|
const predecessors = data.ganttProperties.predecessor;
|
|
10024
10113
|
const durationUnitTexts = this.parent.durationUnitTexts;
|
|
10025
10114
|
let resultString = '';
|
|
10115
|
+
let temp1;
|
|
10116
|
+
let match;
|
|
10117
|
+
match = [];
|
|
10026
10118
|
if (predecessors) {
|
|
10027
10119
|
const length = predecessors.length;
|
|
10028
10120
|
for (let i = 0; i < length; i++) {
|
|
@@ -10032,6 +10124,15 @@ class Dependency {
|
|
|
10032
10124
|
: data.ganttProperties.rowUniqueID;
|
|
10033
10125
|
if (currentValue.from !== id.toString()) {
|
|
10034
10126
|
temp = currentValue.from + currentValue.type;
|
|
10127
|
+
if (typeof (data.ganttProperties.taskId) === "string") {
|
|
10128
|
+
match[0] = temp.slice(0, -2);
|
|
10129
|
+
match[1] = temp.slice(-2);
|
|
10130
|
+
temp1 = match[0] + " " + match[1];
|
|
10131
|
+
}
|
|
10132
|
+
else {
|
|
10133
|
+
temp1 = temp;
|
|
10134
|
+
}
|
|
10135
|
+
temp = temp1;
|
|
10035
10136
|
if (currentValue.offset !== 0) {
|
|
10036
10137
|
temp += currentValue.offset > 0 ? ('+' + currentValue.offset + ' ') : (currentValue.offset + ' ');
|
|
10037
10138
|
const multiple = currentValue.offset !== 1;
|
|
@@ -10119,9 +10220,7 @@ class Dependency {
|
|
|
10119
10220
|
const length = predecessorsCollection.length;
|
|
10120
10221
|
for (let count = 0; count < length; count++) {
|
|
10121
10222
|
ganttRecord = predecessorsCollection[count];
|
|
10122
|
-
|
|
10123
|
-
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
10124
|
-
}
|
|
10223
|
+
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
10125
10224
|
}
|
|
10126
10225
|
}
|
|
10127
10226
|
/**
|
|
@@ -10171,9 +10270,22 @@ class Dependency {
|
|
|
10171
10270
|
*/
|
|
10172
10271
|
updatedRecordsDateByPredecessor() {
|
|
10173
10272
|
const flatData = this.parent.flatData;
|
|
10174
|
-
|
|
10273
|
+
const totLength = this.parent.flatData.length;
|
|
10274
|
+
for (let count = 0; count < totLength; count++) {
|
|
10175
10275
|
if (flatData[count].ganttProperties.predecessor) {
|
|
10176
10276
|
this.validatePredecessorDates(flatData[count]);
|
|
10277
|
+
if (flatData[count].hasChildRecords && this.parent.editModule) {
|
|
10278
|
+
this.parent.editModule['updateChildItems'](flatData[count]);
|
|
10279
|
+
}
|
|
10280
|
+
}
|
|
10281
|
+
}
|
|
10282
|
+
}
|
|
10283
|
+
updateParentPredecessor() {
|
|
10284
|
+
if (this.parent.enablePredecessorValidation) {
|
|
10285
|
+
const parentPredecessorLength = this.parentPredecessors.length;
|
|
10286
|
+
for (let i = parentPredecessorLength - 1; i >= 0; i--) {
|
|
10287
|
+
let item = this.parentPredecessors[i];
|
|
10288
|
+
this.validatePredecessorDates(item);
|
|
10177
10289
|
}
|
|
10178
10290
|
}
|
|
10179
10291
|
}
|
|
@@ -10204,6 +10316,10 @@ class Dependency {
|
|
|
10204
10316
|
const predecessor = predecessors[count];
|
|
10205
10317
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor.from);
|
|
10206
10318
|
record = this.parent.connectorLineModule.getRecordByID(predecessor.to);
|
|
10319
|
+
if (this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
|
|
10320
|
+
&& (ganttRecord.hasChildRecords || record.hasChildRecords)) {
|
|
10321
|
+
this.parentPredecessors.push(ganttRecord);
|
|
10322
|
+
}
|
|
10207
10323
|
if (record.ganttProperties.isAutoSchedule || this.parent.validateManualTasksOnLinking) {
|
|
10208
10324
|
this.validateChildGanttRecord(parentGanttRecord, record);
|
|
10209
10325
|
}
|
|
@@ -10244,8 +10360,8 @@ class Dependency {
|
|
|
10244
10360
|
this.dateValidateModule.calculateEndDate(childGanttRecord);
|
|
10245
10361
|
}
|
|
10246
10362
|
this.parent.dataOperation.updateWidthLeft(childGanttRecord);
|
|
10247
|
-
if (childGanttRecord.parentItem && this.parent.
|
|
10248
|
-
|
|
10363
|
+
if (!this.parent.isLoad && childGanttRecord.parentItem && this.parent.isInPredecessorValidation &&
|
|
10364
|
+
this.parent.getParentTask(childGanttRecord.parentItem).ganttProperties.isAutoSchedule) {
|
|
10249
10365
|
if (this.parentIds.indexOf(childGanttRecord.parentItem.uniqueID) === -1) {
|
|
10250
10366
|
this.parentIds.push(childGanttRecord.parentItem.uniqueID);
|
|
10251
10367
|
this.parentRecord.push(childGanttRecord.parentItem);
|
|
@@ -10599,8 +10715,19 @@ class ConnectorLine {
|
|
|
10599
10715
|
*/
|
|
10600
10716
|
createConnectorLineObject(parentGanttData, childGanttData, predecessor) {
|
|
10601
10717
|
const connectorObj = {};
|
|
10602
|
-
|
|
10603
|
-
|
|
10718
|
+
let updatedRecords;
|
|
10719
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport) {
|
|
10720
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].exportType &&
|
|
10721
|
+
this.parent.pdfExportModule['helper']['exportProps'].exportType === 'CurrentViewData') {
|
|
10722
|
+
updatedRecords = this.expandedRecords;
|
|
10723
|
+
}
|
|
10724
|
+
else {
|
|
10725
|
+
updatedRecords = this.parent.flatData;
|
|
10726
|
+
}
|
|
10727
|
+
}
|
|
10728
|
+
else {
|
|
10729
|
+
updatedRecords = this.expandedRecords;
|
|
10730
|
+
}
|
|
10604
10731
|
const parentIndex = updatedRecords.indexOf(parentGanttData);
|
|
10605
10732
|
const childIndex = updatedRecords.indexOf(childGanttData);
|
|
10606
10733
|
const parentGanttRecord = parentGanttData.ganttProperties;
|
|
@@ -10923,6 +11050,63 @@ class ConnectorLine {
|
|
|
10923
11050
|
isMilestoneValue = (data.milestoneParent && data.milestoneChild) ? 0 : data.milestoneParent ? -5 : data.milestoneChild ? 5 : 0;
|
|
10924
11051
|
}
|
|
10925
11052
|
const heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
|
|
11053
|
+
let borderTopWidth = 0;
|
|
11054
|
+
let addTop = 0;
|
|
11055
|
+
if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex]) {
|
|
11056
|
+
let fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
|
|
11057
|
+
let toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
|
|
11058
|
+
let fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
|
|
11059
|
+
let toRecordIsManual = this.parent.currentViewData[data.childIndex].ganttProperties.isAutoSchedule;
|
|
11060
|
+
let isValid = true;
|
|
11061
|
+
if (((fromRecordIsParent && fromRecordIsManual) && !toRecordIsParent) || ((toRecordIsParent && toRecordIsManual) &&
|
|
11062
|
+
!fromRecordIsParent) || (fromRecordIsParent && fromRecordIsManual && toRecordIsManual && toRecordIsParent)
|
|
11063
|
+
|| (!fromRecordIsParent && !toRecordIsParent)) {
|
|
11064
|
+
isValid = false;
|
|
11065
|
+
}
|
|
11066
|
+
if (isValid) {
|
|
11067
|
+
if (((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
|
|
11068
|
+
addTop = -11;
|
|
11069
|
+
}
|
|
11070
|
+
else if (!((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
|
|
11071
|
+
if (data.childIndex > data.parentIndex) {
|
|
11072
|
+
if (!fromRecordIsParent && toRecordIsParent) {
|
|
11073
|
+
borderTopWidth = -11;
|
|
11074
|
+
}
|
|
11075
|
+
else {
|
|
11076
|
+
borderTopWidth = 11;
|
|
11077
|
+
addTop = -11;
|
|
11078
|
+
}
|
|
11079
|
+
}
|
|
11080
|
+
else {
|
|
11081
|
+
if ((fromRecordIsParent && !toRecordIsParent)) {
|
|
11082
|
+
borderTopWidth = -11;
|
|
11083
|
+
}
|
|
11084
|
+
else {
|
|
11085
|
+
borderTopWidth = 11;
|
|
11086
|
+
addTop = -11;
|
|
11087
|
+
}
|
|
11088
|
+
}
|
|
11089
|
+
}
|
|
11090
|
+
if (this.parent.currentViewData[data.parentIndex].ganttProperties.isMilestone) {
|
|
11091
|
+
if (data.parentIndex > data.childIndex) {
|
|
11092
|
+
addTop = -5;
|
|
11093
|
+
borderTopWidth = 10;
|
|
11094
|
+
}
|
|
11095
|
+
else if (data.type === 'SS' || data.type === 'FF') {
|
|
11096
|
+
addTop = -5;
|
|
11097
|
+
}
|
|
11098
|
+
}
|
|
11099
|
+
else if (this.parent.currentViewData[data.childIndex].ganttProperties.isMilestone) {
|
|
11100
|
+
if (data.parentIndex > data.childIndex) {
|
|
11101
|
+
addTop = 5;
|
|
11102
|
+
borderTopWidth = -10;
|
|
11103
|
+
}
|
|
11104
|
+
else if (data.type === 'SS' || data.type === 'FF') {
|
|
11105
|
+
addTop = 5;
|
|
11106
|
+
}
|
|
11107
|
+
}
|
|
11108
|
+
}
|
|
11109
|
+
}
|
|
10926
11110
|
if (this.getParentPosition(data)) {
|
|
10927
11111
|
connectorContainer = '<div id="ConnectorLine' + data.connectorLineId + '" style="background-color:black">';
|
|
10928
11112
|
let div = '<div class="' + connectorLineContainer +
|
|
@@ -10942,7 +11126,7 @@ class ConnectorLine {
|
|
|
10942
11126
|
'border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div>';
|
|
10943
11127
|
const duplicateStingThree = this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>' + eLine +
|
|
10944
11128
|
'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
10945
|
-
this.getBorderStyles('top', (heightValue - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11129
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
10946
11130
|
const duplicateStingFour = leftArrow + 'left:' +
|
|
10947
11131
|
(((data.childLeft + data.childWidth) - (data.parentLeft)) + 10) + 'px;' +
|
|
10948
11132
|
this.getBorderStyles('right', 10);
|
|
@@ -10950,7 +11134,7 @@ class ConnectorLine {
|
|
|
10950
11134
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
10951
11135
|
if (this.getParentPosition(data) === 'FSType1') {
|
|
10952
11136
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
10953
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11137
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
10954
11138
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
|
|
10955
11139
|
div = div + eLine;
|
|
10956
11140
|
div = div + 'left:' + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
|
|
@@ -10960,7 +11144,7 @@ class ConnectorLine {
|
|
|
10960
11144
|
div = div + eLine;
|
|
10961
11145
|
div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;' +
|
|
10962
11146
|
'width:0px;' + this.getBorderStyles('right', this.lineStroke) +
|
|
10963
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11147
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
10964
11148
|
div = div + eLine;
|
|
10965
11149
|
div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;width:10px;' +
|
|
10966
11150
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -10970,7 +11154,7 @@ class ConnectorLine {
|
|
|
10970
11154
|
'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
|
|
10971
11155
|
}
|
|
10972
11156
|
if (this.getParentPosition(data) === 'FSType2') {
|
|
10973
|
-
div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) +
|
|
11157
|
+
div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) + addTop +
|
|
10974
11158
|
this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
10975
11159
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
|
|
10976
11160
|
div = div + eLine;
|
|
@@ -10980,7 +11164,7 @@ class ConnectorLine {
|
|
|
10980
11164
|
div = div + eLine;
|
|
10981
11165
|
div = div + 'left:' + (data.parentWidth + 10 - this.lineStroke) + 'px;' +
|
|
10982
11166
|
this.getBorderStyles('left', this.lineStroke) + 'width:0px;' +
|
|
10983
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11167
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
10984
11168
|
div = div + eLine;
|
|
10985
11169
|
div = div + 'left:' + (data.parentWidth - (((data.parentLeft + data.parentWidth) - data.childLeft) + 20)) + 'px;' +
|
|
10986
11170
|
'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
|
|
@@ -11002,7 +11186,7 @@ class ConnectorLine {
|
|
|
11002
11186
|
}
|
|
11003
11187
|
if (this.getParentPosition(data) === 'FSType3') {
|
|
11004
11188
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11005
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11189
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11006
11190
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
|
|
11007
11191
|
div = div + rightArrow;
|
|
11008
11192
|
div = div + 'left:10px;' + this.getBorderStyles('left', 10) +
|
|
@@ -11012,7 +11196,7 @@ class ConnectorLine {
|
|
|
11012
11196
|
div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) +
|
|
11013
11197
|
'position:relative;top:' + (-(6 + (5 + this.lineStroke) + Math.round(this.lineStroke / 2))) + 'px;"></div>';
|
|
11014
11198
|
div = div + eLine;
|
|
11015
|
-
div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
|
|
11199
|
+
div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
|
|
11016
11200
|
'position:relative;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;"></div>';
|
|
11017
11201
|
div = div + eLine;
|
|
11018
11202
|
div = div + 'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
|
|
@@ -11032,7 +11216,7 @@ class ConnectorLine {
|
|
|
11032
11216
|
}
|
|
11033
11217
|
if (this.getParentPosition(data) === 'FSType4') {
|
|
11034
11218
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11035
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11219
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11036
11220
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
|
|
11037
11221
|
div = div + rightArrow;
|
|
11038
11222
|
div = div + 'left:' + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
|
|
@@ -11048,7 +11232,7 @@ class ConnectorLine {
|
|
|
11048
11232
|
div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;left:' +
|
|
11049
11233
|
(data.childLeft - (data.parentLeft + data.parentWidth) - 20) + 'px;width:0px;' +
|
|
11050
11234
|
this.getBorderStyles('left', this.lineStroke) +
|
|
11051
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11235
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11052
11236
|
div = div + eLine;
|
|
11053
11237
|
div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'top:' +
|
|
11054
11238
|
(-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
@@ -11058,7 +11242,7 @@ class ConnectorLine {
|
|
|
11058
11242
|
}
|
|
11059
11243
|
if (this.getParentPosition(data) === 'SSType4') {
|
|
11060
11244
|
div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11061
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11245
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11062
11246
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
|
|
11063
11247
|
div = div + rightArrow;
|
|
11064
11248
|
div = div + 'left:' + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
|
|
@@ -11071,7 +11255,7 @@ class ConnectorLine {
|
|
|
11071
11255
|
}
|
|
11072
11256
|
if (this.getParentPosition(data) === 'SSType3') {
|
|
11073
11257
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11074
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11258
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11075
11259
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
|
|
11076
11260
|
div = div + rightArrow;
|
|
11077
11261
|
div = div + 'left:10px;' + duplicateStingTwo;
|
|
@@ -11084,14 +11268,14 @@ class ConnectorLine {
|
|
|
11084
11268
|
}
|
|
11085
11269
|
if (this.getParentPosition(data) === 'SSType2') {
|
|
11086
11270
|
div = div + 'left:' + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11087
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11271
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11088
11272
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
|
|
11089
11273
|
div = div + eLine;
|
|
11090
11274
|
div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
|
|
11091
11275
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11092
11276
|
div = div + eLine;
|
|
11093
11277
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11094
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11278
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11095
11279
|
div = div + eLine;
|
|
11096
11280
|
div = div + 'width:' + setInnerElementWidthSSType2 + 'px;' +
|
|
11097
11281
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11104,7 +11288,7 @@ class ConnectorLine {
|
|
|
11104
11288
|
}
|
|
11105
11289
|
if (this.getParentPosition(data) === 'SSType1') {
|
|
11106
11290
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11107
|
-
((data.parentIndex * data.rowHeight) +
|
|
11291
|
+
((data.parentIndex * data.rowHeight) + addTop +
|
|
11108
11292
|
this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11109
11293
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
|
|
11110
11294
|
div = div + eLine;
|
|
@@ -11112,7 +11296,7 @@ class ConnectorLine {
|
|
|
11112
11296
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11113
11297
|
div = div + eLine;
|
|
11114
11298
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11115
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11299
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11116
11300
|
div = div + eLine;
|
|
11117
11301
|
div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11118
11302
|
div = div + rightArrow;
|
|
@@ -11122,7 +11306,7 @@ class ConnectorLine {
|
|
|
11122
11306
|
}
|
|
11123
11307
|
if (this.getParentPosition(data) === 'FFType1') {
|
|
11124
11308
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11125
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11309
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11126
11310
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
|
|
11127
11311
|
div = div + eLine;
|
|
11128
11312
|
div = div + 'left:' + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
|
|
@@ -11133,7 +11317,7 @@ class ConnectorLine {
|
|
|
11133
11317
|
div = div + eLine;
|
|
11134
11318
|
div = div + 'left:' + (((data.parentLeft + data.parentWidth) -
|
|
11135
11319
|
(data.childLeft + data.childWidth)) + 20) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11136
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11320
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11137
11321
|
div = div + eLine;
|
|
11138
11322
|
div = div + 'left:' + (isMilestone ? 4 : 10) + 'px;width:' + (isMilestone ?
|
|
11139
11323
|
(((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + (16 + this.lineStroke)) :
|
|
@@ -11146,7 +11330,7 @@ class ConnectorLine {
|
|
|
11146
11330
|
}
|
|
11147
11331
|
if (this.getParentPosition(data) === 'FFType2') {
|
|
11148
11332
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11149
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11333
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11150
11334
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
|
|
11151
11335
|
div = div + eLine;
|
|
11152
11336
|
div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'width:' +
|
|
@@ -11157,7 +11341,7 @@ class ConnectorLine {
|
|
|
11157
11341
|
div = div + eLine;
|
|
11158
11342
|
div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 20) +
|
|
11159
11343
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11160
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) +
|
|
11344
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) +
|
|
11161
11345
|
'position:relative;"></div>';
|
|
11162
11346
|
div = div + eLine;
|
|
11163
11347
|
div = div + 'left:' + (isMilestone ? (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 4) :
|
|
@@ -11172,7 +11356,7 @@ class ConnectorLine {
|
|
|
11172
11356
|
}
|
|
11173
11357
|
if (this.getParentPosition(data) === 'FFType3') {
|
|
11174
11358
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11175
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11359
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11176
11360
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
|
|
11177
11361
|
div = div + duplicateStingOne;
|
|
11178
11362
|
div = div + eLine;
|
|
@@ -11185,7 +11369,7 @@ class ConnectorLine {
|
|
|
11185
11369
|
div = div + 'left:' + (((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + 20) +
|
|
11186
11370
|
'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;' +
|
|
11187
11371
|
'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11188
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11372
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11189
11373
|
div = div + eLine;
|
|
11190
11374
|
div = div + (isMilestoneParent ? ('left:' + (((data.parentLeft + data.parentWidth) -
|
|
11191
11375
|
(data.childLeft + data.childWidth)) - 1) + 'px;width:21') : ('left:' + ((data.parentLeft + data.parentWidth) -
|
|
@@ -11195,7 +11379,7 @@ class ConnectorLine {
|
|
|
11195
11379
|
}
|
|
11196
11380
|
if (this.getParentPosition(data) === 'FFType4') {
|
|
11197
11381
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11198
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11382
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11199
11383
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
|
|
11200
11384
|
div = div + leftArrow;
|
|
11201
11385
|
div = div + ('left:' + ((data.childLeft + data.childWidth) -
|
|
@@ -11214,7 +11398,7 @@ class ConnectorLine {
|
|
|
11214
11398
|
div = div + 'left:' + (((data.childLeft + data.childWidth) -
|
|
11215
11399
|
(data.parentLeft + data.parentWidth)) + 20) + 'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) +
|
|
11216
11400
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11217
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11401
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11218
11402
|
div = div + eLine;
|
|
11219
11403
|
div = div + (isMilestoneParent ? ('left:-1px;width:' + (((data.childLeft + data.childWidth) -
|
|
11220
11404
|
(data.parentLeft + data.parentWidth)) + (21 + this.lineStroke))) : ('width:' + (((data.childLeft + data.childWidth) -
|
|
@@ -11224,7 +11408,7 @@ class ConnectorLine {
|
|
|
11224
11408
|
}
|
|
11225
11409
|
if (this.getParentPosition(data) === 'SFType4') {
|
|
11226
11410
|
div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11227
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
11411
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
11228
11412
|
'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
|
|
11229
11413
|
div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
|
|
11230
11414
|
'border-bottom-width:' + (5 + this.lineStroke) +
|
|
@@ -11237,7 +11421,7 @@ class ConnectorLine {
|
|
|
11237
11421
|
div = div + eLine;
|
|
11238
11422
|
div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + 30) + 'px;top:' +
|
|
11239
11423
|
(-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11240
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11424
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11241
11425
|
div = div + eLine;
|
|
11242
11426
|
div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
11243
11427
|
(((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
|
|
@@ -11252,7 +11436,7 @@ class ConnectorLine {
|
|
|
11252
11436
|
}
|
|
11253
11437
|
if (this.getParentPosition(data) === 'SFType3') {
|
|
11254
11438
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11255
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11439
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11256
11440
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
|
|
11257
11441
|
div = div + duplicateStingOne;
|
|
11258
11442
|
div = div + eLine;
|
|
@@ -11262,7 +11446,7 @@ class ConnectorLine {
|
|
|
11262
11446
|
div = div + eLine;
|
|
11263
11447
|
div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' +
|
|
11264
11448
|
this.getBorderStyles('left', this.lineStroke) +
|
|
11265
|
-
this.getBorderStyles('top', (heightValue - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11449
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11266
11450
|
div = div + eLine;
|
|
11267
11451
|
div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
11268
11452
|
((data.parentLeft - (data.childLeft + data.childWidth + 20)) + this.lineStroke) + 'px;' +
|
|
@@ -11270,13 +11454,13 @@ class ConnectorLine {
|
|
|
11270
11454
|
}
|
|
11271
11455
|
if (this.getParentPosition(data) === 'SFType1') {
|
|
11272
11456
|
div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11273
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11457
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11274
11458
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
|
|
11275
11459
|
div = div + eLine;
|
|
11276
11460
|
div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11277
11461
|
div = div + eLine;
|
|
11278
11462
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11279
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11463
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11280
11464
|
div = div + eLine;
|
|
11281
11465
|
div = div + 'width:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
|
|
11282
11466
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11295,7 +11479,7 @@ class ConnectorLine {
|
|
|
11295
11479
|
}
|
|
11296
11480
|
if (this.getParentPosition(data) === 'SFType2') {
|
|
11297
11481
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11298
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11482
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11299
11483
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
|
|
11300
11484
|
div = div + eLine;
|
|
11301
11485
|
div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
@@ -11303,7 +11487,7 @@ class ConnectorLine {
|
|
|
11303
11487
|
div = div + eLine;
|
|
11304
11488
|
div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
11305
11489
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11306
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11490
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11307
11491
|
div = div + eLine;
|
|
11308
11492
|
div = div + (isMilestone ? ('left:4px;width:' + (((data.parentLeft) - (data.childLeft + data.childWidth))
|
|
11309
11493
|
- (14 - this.lineStroke))) : ('left:10px;width:' + (((data.parentLeft) -
|
|
@@ -11551,11 +11735,11 @@ class Splitter$1 {
|
|
|
11551
11735
|
}
|
|
11552
11736
|
/**
|
|
11553
11737
|
* @param {SplitterSettingsModel} splitter .
|
|
11554
|
-
|
|
11738
|
+
|
|
11555
11739
|
* @returns {string} .
|
|
11556
11740
|
* @private
|
|
11557
11741
|
*/
|
|
11558
|
-
calculateSplitterPosition(splitter$$1
|
|
11742
|
+
calculateSplitterPosition(splitter$$1) {
|
|
11559
11743
|
if (!isNullOrUndefined(this.splitterObject) && this.parent.enablePersistence) {
|
|
11560
11744
|
return this.splitterObject.paneSettings[0].size;
|
|
11561
11745
|
}
|
|
@@ -11571,8 +11755,7 @@ class Splitter$1 {
|
|
|
11571
11755
|
}
|
|
11572
11756
|
else if (!isNullOrUndefined(splitter$$1.columnIndex) && splitter$$1.columnIndex >= 0) {
|
|
11573
11757
|
if ((splitter$$1.columnIndex * 150) < this.parent.ganttWidth || !this.parent.element.classList.contains('e-device')) {
|
|
11574
|
-
return
|
|
11575
|
-
this.getSpliterPositionInPercentage((splitter$$1.columnIndex * 150) + 'px');
|
|
11758
|
+
return this.getSpliterPositionInPercentage(this.getTotalColumnWidthByIndex(splitter$$1.columnIndex).toString() + 'px');
|
|
11576
11759
|
}
|
|
11577
11760
|
else {
|
|
11578
11761
|
return this.getSpliterPositionInPercentage((splitter$$1.columnIndex * 130) + 'px');
|
|
@@ -11608,10 +11791,10 @@ class Splitter$1 {
|
|
|
11608
11791
|
*/
|
|
11609
11792
|
getTotalColumnWidthByIndex(index) {
|
|
11610
11793
|
let width = 0;
|
|
11611
|
-
const tr = this.parent.
|
|
11794
|
+
const tr = this.parent.ganttColumns;
|
|
11612
11795
|
index = tr.length > index ? index : tr.length;
|
|
11613
11796
|
for (let column = 0; column < index; column++) {
|
|
11614
|
-
width = width + tr[column].
|
|
11797
|
+
width = width + parseInt(tr[column].width);
|
|
11615
11798
|
}
|
|
11616
11799
|
return width;
|
|
11617
11800
|
}
|
|
@@ -11622,7 +11805,7 @@ class Splitter$1 {
|
|
|
11622
11805
|
updateSplitterPosition() {
|
|
11623
11806
|
this.splitterObject.separatorSize = this.parent.splitterSettings.separatorSize >= 4 ?
|
|
11624
11807
|
this.parent.splitterSettings.separatorSize : 4;
|
|
11625
|
-
const splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings
|
|
11808
|
+
const splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings);
|
|
11626
11809
|
this.splitterObject.paneSettings[0].min = this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum);
|
|
11627
11810
|
this.splitterObject.dataBind();
|
|
11628
11811
|
this.splitterObject.paneSettings[0].size = splitterPosition;
|
|
@@ -11799,6 +11982,7 @@ class Tooltip$1 {
|
|
|
11799
11982
|
args.cancel = true;
|
|
11800
11983
|
}
|
|
11801
11984
|
});
|
|
11985
|
+
this.toolTipObj.content = argsData.content;
|
|
11802
11986
|
if (!this.parent.isAdaptive && args.event.type === 'mouseover') {
|
|
11803
11987
|
this.currentTarget = args.target;
|
|
11804
11988
|
EventHandler.add(this.currentTarget, 'mousemove', this.mouseMoveHandler.bind(this));
|
|
@@ -12038,7 +12222,8 @@ class Tooltip$1 {
|
|
|
12038
12222
|
*/
|
|
12039
12223
|
getPredecessorTooltipData(args) {
|
|
12040
12224
|
const predeceesorParent = args.target.parentElement.id;
|
|
12041
|
-
const taskIds = predeceesorParent.match(
|
|
12225
|
+
const taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
|
|
12226
|
+
taskIds.shift();
|
|
12042
12227
|
let fromTask;
|
|
12043
12228
|
let toTask;
|
|
12044
12229
|
if (this.parent.viewType === 'ResourceView') {
|
|
@@ -12333,7 +12518,7 @@ class FocusModule {
|
|
|
12333
12518
|
if (ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectedRowIndex !== -1) {
|
|
12334
12519
|
const selectedItem = ganttObj.currentViewData[ganttObj.selectedRowIndex];
|
|
12335
12520
|
const focusedRowIndex = this.parent.ganttChartModule.focusedRowIndex;
|
|
12336
|
-
const selectingRowIndex =
|
|
12521
|
+
const selectingRowIndex = expandedRecords.indexOf(selectedItem);
|
|
12337
12522
|
const currentSelectingRecord = e.action === 'downArrow' ? expandedRecords[selectingRowIndex + 1] :
|
|
12338
12523
|
expandedRecords[selectingRowIndex - 1];
|
|
12339
12524
|
ganttObj.selectionModule.selectRow(ganttObj.currentViewData.indexOf(currentSelectingRecord), false, true);
|
|
@@ -12730,6 +12915,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12730
12915
|
if (this.enableValidation) {
|
|
12731
12916
|
this.dataOperation.updateGanttData();
|
|
12732
12917
|
}
|
|
12918
|
+
this.predecessorModule.updateParentPredecessor();
|
|
12733
12919
|
if (this.dataSource instanceof Object && isCountRequired(this)) {
|
|
12734
12920
|
const count = getValue('count', this.dataSource);
|
|
12735
12921
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
@@ -12742,6 +12928,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12742
12928
|
if (this.enableValidation) {
|
|
12743
12929
|
this.dataOperation.updateGanttData();
|
|
12744
12930
|
}
|
|
12931
|
+
this.predecessorModule.updateParentPredecessor();
|
|
12745
12932
|
this.treeGridPane.classList.remove('e-temp-content');
|
|
12746
12933
|
remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
|
|
12747
12934
|
this.notify('dataReady', {});
|
|
@@ -13052,7 +13239,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13052
13239
|
{
|
|
13053
13240
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
13054
13241
|
bottomTier: { unit: 'Minutes', format: 'mm', count: 30 }, timelineUnitSize: 66, level: 22,
|
|
13055
|
-
timelineViewMode: 'Hour', weekStartDay:
|
|
13242
|
+
timelineViewMode: 'Hour', weekStartDay: 0, updateTimescaleView: true, weekendBackground: null, showTooltip: true
|
|
13056
13243
|
},
|
|
13057
13244
|
{
|
|
13058
13245
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
@@ -14391,7 +14578,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14391
14578
|
setSplitterPosition(value, type) {
|
|
14392
14579
|
const tempSplitterSettings = {};
|
|
14393
14580
|
tempSplitterSettings[type] = value;
|
|
14394
|
-
const splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings
|
|
14581
|
+
const splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings);
|
|
14395
14582
|
const pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
|
|
14396
14583
|
const pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
|
|
14397
14584
|
this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
|
|
@@ -14473,7 +14660,10 @@ let Gantt = class Gantt extends Component {
|
|
|
14473
14660
|
if (this.viewType === 'ResourceView') {
|
|
14474
14661
|
this.editModule.addRowPosition = rowPosition;
|
|
14475
14662
|
this.editModule.addRowIndex = rowIndex;
|
|
14476
|
-
|
|
14663
|
+
let resources;
|
|
14664
|
+
if (!isNullOrUndefined(data)) {
|
|
14665
|
+
resources = data[this.taskFields.resourceInfo];
|
|
14666
|
+
}
|
|
14477
14667
|
let id;
|
|
14478
14668
|
let parentTask;
|
|
14479
14669
|
if (!isNullOrUndefined(resources) && resources.length) {
|
|
@@ -14740,7 +14930,9 @@ let Gantt = class Gantt extends Component {
|
|
|
14740
14930
|
if (isNullOrUndefined(index)) {
|
|
14741
14931
|
record = this.getRecordByID(id.toString());
|
|
14742
14932
|
chartRow$$1 = this.getRowByID(id);
|
|
14743
|
-
|
|
14933
|
+
if (!isNullOrUndefined(chartRow$$1)) {
|
|
14934
|
+
rowIndex = getValue('rowIndex', chartRow$$1);
|
|
14935
|
+
}
|
|
14744
14936
|
}
|
|
14745
14937
|
else if (!isNullOrUndefined(index)) {
|
|
14746
14938
|
chartRow$$1 = this.getRowByIndex(index);
|
|
@@ -14970,6 +15162,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14970
15162
|
*/
|
|
14971
15163
|
showColumn(keys, showBy) {
|
|
14972
15164
|
this.treeGrid.showColumns(keys, showBy);
|
|
15165
|
+
this.updateTreeColumns();
|
|
14973
15166
|
}
|
|
14974
15167
|
/**
|
|
14975
15168
|
* Hides a column by column name.
|
|
@@ -14981,6 +15174,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14981
15174
|
*/
|
|
14982
15175
|
hideColumn(keys, hideBy) {
|
|
14983
15176
|
this.treeGrid.hideColumns(keys, hideBy);
|
|
15177
|
+
this.updateTreeColumns();
|
|
14984
15178
|
}
|
|
14985
15179
|
/**
|
|
14986
15180
|
* To set scroll top for chart scroll container.
|
|
@@ -15715,8 +15909,7 @@ class CellEdit {
|
|
|
15715
15909
|
}
|
|
15716
15910
|
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
15717
15911
|
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
15718
|
-
|| field === taskSettings.
|
|
15719
|
-
|| field === taskSettings.work || field === 'taskType')) {
|
|
15912
|
+
|| field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
15720
15913
|
args.cancel = true;
|
|
15721
15914
|
}
|
|
15722
15915
|
else {
|
|
@@ -16514,6 +16707,9 @@ class TaskbarEdit extends DateProcessor {
|
|
|
16514
16707
|
}
|
|
16515
16708
|
}
|
|
16516
16709
|
mouseClickHandler(e) {
|
|
16710
|
+
if (!this.parent.editSettings.allowTaskbarEditing) {
|
|
16711
|
+
return;
|
|
16712
|
+
}
|
|
16517
16713
|
const targetElement = this.getElementByPosition(e);
|
|
16518
16714
|
const element = parentsUntil$1(targetElement, taskBarMainContainer);
|
|
16519
16715
|
if (this.parent.selectionModule && this.parent.selectionModule.enableSelectMultiTouch) {
|
|
@@ -17043,10 +17239,13 @@ class TaskbarEdit extends DateProcessor {
|
|
|
17043
17239
|
startScrollTimer(direction) {
|
|
17044
17240
|
this.stopScrollTimer();
|
|
17045
17241
|
this.scrollTimer = window.setInterval(() => {
|
|
17046
|
-
if (direction === 'right'
|
|
17242
|
+
if (direction === 'right') {
|
|
17047
17243
|
this.timerCount = (this.timerCount + 1) >= this.parent.timelineModule.totalTimelineWidth ?
|
|
17048
17244
|
this.parent.timelineModule.totalTimelineWidth : (this.timerCount + 1);
|
|
17049
17245
|
}
|
|
17246
|
+
else if (direction === 'bottom') {
|
|
17247
|
+
this.timerCount = this.timerCount + 1;
|
|
17248
|
+
}
|
|
17050
17249
|
else {
|
|
17051
17250
|
this.timerCount = (this.timerCount - 1) < 0 ? 0 : (this.timerCount - 1);
|
|
17052
17251
|
}
|
|
@@ -18154,8 +18353,14 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18154
18353
|
}
|
|
18155
18354
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
18156
18355
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
18157
|
-
|
|
18158
|
-
|
|
18356
|
+
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
18357
|
+
this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
|
|
18358
|
+
this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
18359
|
+
}
|
|
18360
|
+
else {
|
|
18361
|
+
this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
|
|
18362
|
+
this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
|
|
18363
|
+
}
|
|
18159
18364
|
this.elementOffsetWidth = this.taskBarEditElement.offsetWidth;
|
|
18160
18365
|
this.elementOffsetHeight = this.taskBarEditElement.offsetHeight;
|
|
18161
18366
|
}
|
|
@@ -18323,6 +18528,7 @@ class DialogEdit {
|
|
|
18323
18528
|
this.addedRecord = null;
|
|
18324
18529
|
this.dialogEditValidationFlag = false;
|
|
18325
18530
|
this.ganttResources = [];
|
|
18531
|
+
this.isValidData = true;
|
|
18326
18532
|
/**
|
|
18327
18533
|
* @private
|
|
18328
18534
|
*/
|
|
@@ -18563,7 +18769,7 @@ class DialogEdit {
|
|
|
18563
18769
|
tempData[field] = 0;
|
|
18564
18770
|
tempData.ganttProperties.work = tempData[field];
|
|
18565
18771
|
}
|
|
18566
|
-
else if (columns[i].field ===
|
|
18772
|
+
else if (columns[i].field === taskSettings.type) {
|
|
18567
18773
|
tempData[field] = this.parent.taskType;
|
|
18568
18774
|
tempData.ganttProperties.taskType = tempData[field];
|
|
18569
18775
|
}
|
|
@@ -18606,6 +18812,24 @@ class DialogEdit {
|
|
|
18606
18812
|
*/
|
|
18607
18813
|
openEditDialog(taskId) {
|
|
18608
18814
|
const ganttObj = this.parent;
|
|
18815
|
+
if (!isNullOrUndefined(taskId)) {
|
|
18816
|
+
if (!isNullOrUndefined(taskId['ganttProperties'])) {
|
|
18817
|
+
if (typeof taskId['ganttProperties']['taskId'] === 'string') {
|
|
18818
|
+
this.numericOrString = "stringedit";
|
|
18819
|
+
}
|
|
18820
|
+
else {
|
|
18821
|
+
this.numericOrString = "numericedit";
|
|
18822
|
+
}
|
|
18823
|
+
}
|
|
18824
|
+
if (isNullOrUndefined(taskId['ganttProperties']) && !isNullOrUndefined(taskId)) {
|
|
18825
|
+
if (isNaN(Number(taskId)) || this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
18826
|
+
this.numericOrString = "stringedit";
|
|
18827
|
+
}
|
|
18828
|
+
else {
|
|
18829
|
+
this.numericOrString = "numericedit";
|
|
18830
|
+
}
|
|
18831
|
+
}
|
|
18832
|
+
}
|
|
18609
18833
|
if (typeof taskId === 'object' && !isNullOrUndefined(taskId)) {
|
|
18610
18834
|
this.rowIndex = this.parent.currentViewData.indexOf(taskId);
|
|
18611
18835
|
if (this.rowIndex > -1) {
|
|
@@ -18639,11 +18863,11 @@ class DialogEdit {
|
|
|
18639
18863
|
this.beforeOpenArgs.rowIndex = this.rowIndex;
|
|
18640
18864
|
const dialogMaxWidth = this.parent.isAdaptive ? '' : '600px';
|
|
18641
18865
|
const dialog = this.parent.createElement('div', { id: ganttObj.element.id + '_dialog', styles: 'max-width:' + dialogMaxWidth });
|
|
18866
|
+
dialog.classList.add('e-gantt-dialog');
|
|
18642
18867
|
ganttObj.element.appendChild(dialog);
|
|
18643
18868
|
dialogModel.animationSettings = { effect: 'None' };
|
|
18644
18869
|
dialogModel.header = this.localeObj.getConstant(this.isEdit ? 'editDialogTitle' : 'addDialogTitle');
|
|
18645
18870
|
dialogModel.isModal = true;
|
|
18646
|
-
dialogModel.cssClass = 'e-gantt-dialog';
|
|
18647
18871
|
dialogModel.allowDragging = this.parent.isAdaptive ? false : true;
|
|
18648
18872
|
dialogModel.showCloseIcon = true;
|
|
18649
18873
|
const position = this.parent.isAdaptive ? { X: 'top', Y: 'left' } : { X: 'center', Y: 'center' };
|
|
@@ -18996,6 +19220,13 @@ class DialogEdit {
|
|
|
18996
19220
|
placeholder: column.headerText,
|
|
18997
19221
|
floatLabelType: 'Auto'
|
|
18998
19222
|
};
|
|
19223
|
+
if (!isNullOrUndefined(this.parent.taskFields.id) && !isNullOrUndefined(this.parent.columnMapping.id)
|
|
19224
|
+
&& !isNullOrUndefined(this.numericOrString)) {
|
|
19225
|
+
if (taskSettings.id === column.field) {
|
|
19226
|
+
column.editType = this.numericOrString;
|
|
19227
|
+
}
|
|
19228
|
+
}
|
|
19229
|
+
|
|
18999
19230
|
switch (column.editType) {
|
|
19000
19231
|
case 'booleanedit':
|
|
19001
19232
|
{
|
|
@@ -19010,7 +19241,7 @@ class DialogEdit {
|
|
|
19010
19241
|
case 'stringedit':
|
|
19011
19242
|
{
|
|
19012
19243
|
const textBox = common;
|
|
19013
|
-
if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.startDate ||
|
|
19244
|
+
if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.id || column.field === ganttObj.columnMapping.startDate ||
|
|
19014
19245
|
column.field === ganttObj.columnMapping.endDate) {
|
|
19015
19246
|
textBox.change = (args) => {
|
|
19016
19247
|
this.validateScheduleFields(args, column, ganttObj);
|
|
@@ -19067,7 +19298,7 @@ class DialogEdit {
|
|
|
19067
19298
|
break;
|
|
19068
19299
|
}
|
|
19069
19300
|
case 'dropdownedit':
|
|
19070
|
-
if (column.field ===
|
|
19301
|
+
if (column.field === ganttObj.columnMapping.type || column.field === ganttObj.columnMapping.manual) {
|
|
19071
19302
|
const dataKey = 'dataSource';
|
|
19072
19303
|
const fieldsKey = 'fields';
|
|
19073
19304
|
const types = [
|
|
@@ -19095,12 +19326,18 @@ class DialogEdit {
|
|
|
19095
19326
|
return fieldsModel;
|
|
19096
19327
|
}
|
|
19097
19328
|
validateScheduleFields(args, column, ganttObj) {
|
|
19098
|
-
|
|
19329
|
+
let dialog;
|
|
19330
|
+
if (!isNullOrUndefined(ganttObj.editModule.dialogModule.dialog)) {
|
|
19331
|
+
dialog = ganttObj.editModule.dialogModule.dialog;
|
|
19332
|
+
}
|
|
19099
19333
|
let targetId = null;
|
|
19100
19334
|
let inputElement;
|
|
19101
19335
|
const currentData = ganttObj.editModule.dialogModule.editedRecord;
|
|
19102
19336
|
let cellValue = null;
|
|
19103
19337
|
let colName = null;
|
|
19338
|
+
let formObject;
|
|
19339
|
+
const ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
19340
|
+
const strViewType = this.parent.viewType;
|
|
19104
19341
|
if (!isNullOrUndefined(args.element)) {
|
|
19105
19342
|
inputElement = args.element;
|
|
19106
19343
|
targetId = inputElement.getAttribute('id');
|
|
@@ -19122,6 +19359,22 @@ class DialogEdit {
|
|
|
19122
19359
|
else {
|
|
19123
19360
|
cellValue = inputElement.value;
|
|
19124
19361
|
colName = targetId.replace(ganttObj.element.id, '');
|
|
19362
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
19363
|
+
let customFn = (args) => {
|
|
19364
|
+
if (strViewType === 'ResourceView') {
|
|
19365
|
+
return ids.indexOf('T' + args['value']) === -1 && ids.indexOf('R' + args['value']) === -1;
|
|
19366
|
+
}
|
|
19367
|
+
else {
|
|
19368
|
+
return ids.indexOf(args['value']) === -1;
|
|
19369
|
+
}
|
|
19370
|
+
};
|
|
19371
|
+
let options = {
|
|
19372
|
+
rules: {
|
|
19373
|
+
[this.parent.taskFields.id]: { required: true, minLength: [customFn, 'ID is already present, please enter new value'] }
|
|
19374
|
+
}
|
|
19375
|
+
};
|
|
19376
|
+
formObject = new FormValidator('#' + this.parent.element.id + 'GeneralTabContainer', options);
|
|
19377
|
+
}
|
|
19125
19378
|
}
|
|
19126
19379
|
if (colName.search('Segments') === 0) {
|
|
19127
19380
|
colName = colName.replace('SegmentsTabContainer', '');
|
|
@@ -19345,7 +19598,7 @@ class DialogEdit {
|
|
|
19345
19598
|
this.validateDuration(currentData);
|
|
19346
19599
|
}
|
|
19347
19600
|
}
|
|
19348
|
-
if (columnName ===
|
|
19601
|
+
if (columnName === taskSettings.type) {
|
|
19349
19602
|
this.parent.setRecordValue('taskType', value, ganttProp, true);
|
|
19350
19603
|
}
|
|
19351
19604
|
if (taskSettings.manual === columnName) {
|
|
@@ -19700,9 +19953,6 @@ class DialogEdit {
|
|
|
19700
19953
|
item.content = this.renderGeneralTab(item.content);
|
|
19701
19954
|
}
|
|
19702
19955
|
else if (item.content === 'Dependency') {
|
|
19703
|
-
if (this.editedRecord.hasChildRecords) {
|
|
19704
|
-
item.disabled = true;
|
|
19705
|
-
}
|
|
19706
19956
|
item.content = this.renderPredecessorTab(item.content);
|
|
19707
19957
|
}
|
|
19708
19958
|
else if (item.content === 'Resources') {
|
|
@@ -19807,6 +20057,7 @@ class DialogEdit {
|
|
|
19807
20057
|
}
|
|
19808
20058
|
isCheckIsDisabled(column) {
|
|
19809
20059
|
let disabled = false;
|
|
20060
|
+
let stringOrNumber;
|
|
19810
20061
|
if (column.allowEditing === false || column.isPrimaryKey || this.parent.readOnly) {
|
|
19811
20062
|
if (this.parent.customColumns.indexOf(column.field) !== -1) {
|
|
19812
20063
|
disabled = true;
|
|
@@ -19816,8 +20067,19 @@ class DialogEdit {
|
|
|
19816
20067
|
column.field === this.parent.taskFields.duration || column.field === this.parent.taskFields.progress ||
|
|
19817
20068
|
column.field === this.parent.taskFields.startDate || column.field === this.parent.taskFields.endDate ||
|
|
19818
20069
|
column.field === this.parent.taskFields.baselineStartDate || column.field === this.parent.taskFields.baselineEndDate ||
|
|
19819
|
-
column.field === this.parent.taskFields.work || column.field ===
|
|
19820
|
-
|
|
20070
|
+
column.field === this.parent.taskFields.work || column.field === this.parent.taskFields.type) {
|
|
20071
|
+
for (let i = 0; i < this.parent.currentViewData['length']; i++) {
|
|
20072
|
+
if (!isNullOrUndefined(this.parent.currentViewData[i].ganttProperties.taskId)) {
|
|
20073
|
+
stringOrNumber = this.parent.currentViewData[i].ganttProperties.taskId;
|
|
20074
|
+
break;
|
|
20075
|
+
}
|
|
20076
|
+
}
|
|
20077
|
+
if (typeof (stringOrNumber) === "string") {
|
|
20078
|
+
disabled = false;
|
|
20079
|
+
}
|
|
20080
|
+
else {
|
|
20081
|
+
disabled = true;
|
|
20082
|
+
}
|
|
19821
20083
|
}
|
|
19822
20084
|
}
|
|
19823
20085
|
}
|
|
@@ -19829,13 +20091,30 @@ class DialogEdit {
|
|
|
19829
20091
|
if ((column.field === this.parent.taskFields.endDate && ((!isNullOrUndefined(this.editedRecord['isManual']) &&
|
|
19830
20092
|
this.editedRecord['isManual'] == false) || this.parent.taskMode == 'Auto')) || column.field === this.parent.taskFields.duration ||
|
|
19831
20093
|
column.field === this.parent.taskFields.progress || column.field === this.parent.taskFields.work ||
|
|
19832
|
-
column.field ===
|
|
20094
|
+
column.field === this.parent.taskFields.type) {
|
|
19833
20095
|
disabled = true;
|
|
19834
20096
|
}
|
|
19835
20097
|
}
|
|
19836
20098
|
}
|
|
19837
20099
|
return disabled;
|
|
19838
20100
|
}
|
|
20101
|
+
isParentValid(data) {
|
|
20102
|
+
if (data.length > 0) {
|
|
20103
|
+
for (let i = 0; i < data.length; i++) {
|
|
20104
|
+
if (data[i].uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20105
|
+
this.isValidData = false;
|
|
20106
|
+
break;
|
|
20107
|
+
}
|
|
20108
|
+
if (data[i].hasChildRecords) {
|
|
20109
|
+
this.isParentValid(data[i].childRecords);
|
|
20110
|
+
}
|
|
20111
|
+
if (!this.isValidData) {
|
|
20112
|
+
break;
|
|
20113
|
+
}
|
|
20114
|
+
}
|
|
20115
|
+
}
|
|
20116
|
+
return this.isValidData;
|
|
20117
|
+
}
|
|
19839
20118
|
renderPredecessorTab(itemName) {
|
|
19840
20119
|
const ganttObj = this.parent;
|
|
19841
20120
|
const gridModel = this.beforeOpenArgs[itemName];
|
|
@@ -20124,7 +20403,26 @@ class DialogEdit {
|
|
|
20124
20403
|
this.preTableCollection = [];
|
|
20125
20404
|
for (let i = 0; i < flatData.length; i++) {
|
|
20126
20405
|
const data = flatData[i];
|
|
20127
|
-
|
|
20406
|
+
let currentFlatData = data;
|
|
20407
|
+
if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20408
|
+
this.isValidData = false;
|
|
20409
|
+
}
|
|
20410
|
+
else {
|
|
20411
|
+
do {
|
|
20412
|
+
if (currentFlatData.parentItem) {
|
|
20413
|
+
currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
|
|
20414
|
+
if (currentFlatData.uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20415
|
+
this.isValidData = false;
|
|
20416
|
+
break;
|
|
20417
|
+
}
|
|
20418
|
+
}
|
|
20419
|
+
} while (currentFlatData.parentItem);
|
|
20420
|
+
}
|
|
20421
|
+
if (data.hasChildRecords && this.isValidData) {
|
|
20422
|
+
this.isValidData = this.isParentValid(data.childRecords);
|
|
20423
|
+
}
|
|
20424
|
+
if (!this.isValidData) {
|
|
20425
|
+
this.isValidData = true;
|
|
20128
20426
|
continue;
|
|
20129
20427
|
}
|
|
20130
20428
|
const taskId = this.parent.viewType === 'ResourceView' ? data.ganttProperties.taskId.toString()
|
|
@@ -20310,10 +20608,17 @@ class DialogEdit {
|
|
|
20310
20608
|
// eslint-disable-next-line
|
|
20311
20609
|
updateSegmentsData(segmentForm, data) {
|
|
20312
20610
|
const gridObj = segmentForm.ej2_instances[0];
|
|
20611
|
+
const isEdit = gridObj.isEdit;
|
|
20612
|
+
let dataSource;
|
|
20313
20613
|
if (gridObj.isEdit) {
|
|
20314
20614
|
gridObj.endEdit();
|
|
20315
20615
|
}
|
|
20316
|
-
|
|
20616
|
+
if (isEdit) {
|
|
20617
|
+
dataSource = gridObj.dataSource;
|
|
20618
|
+
}
|
|
20619
|
+
else {
|
|
20620
|
+
dataSource = gridObj.currentViewData;
|
|
20621
|
+
}
|
|
20317
20622
|
this.updateSegmentTaskData(dataSource);
|
|
20318
20623
|
}
|
|
20319
20624
|
updateGeneralTab(generalForm, isCustom) {
|
|
@@ -20329,6 +20634,10 @@ class DialogEdit {
|
|
|
20329
20634
|
if (inputElement) {
|
|
20330
20635
|
const fieldName = inputElement.id.replace(ganttObj.element.id, '');
|
|
20331
20636
|
const controlObj = div.querySelector('#' + ganttObj.element.id + fieldName).ej2_instances[0];
|
|
20637
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit" && fieldName === this.parent.taskFields.id) {
|
|
20638
|
+
const valueString = controlObj.value.toString();
|
|
20639
|
+
controlObj.value = valueString;
|
|
20640
|
+
}
|
|
20332
20641
|
const column = ganttObj.columnByField[fieldName];
|
|
20333
20642
|
if (!isNullOrUndefined(column.edit) && isNullOrUndefined(column.edit.params)) {
|
|
20334
20643
|
let read = column.edit.read;
|
|
@@ -20364,6 +20673,7 @@ class DialogEdit {
|
|
|
20364
20673
|
this.parent.setRecordValue('duration', fromRecord.ganttProperties.duration, toRecord.ganttProperties, true);
|
|
20365
20674
|
this.parent.setRecordValue('durationUnit', fromRecord.ganttProperties.durationUnit, toRecord.ganttProperties, true);
|
|
20366
20675
|
this.parent.setRecordValue('work', fromRecord.ganttProperties.work, toRecord.ganttProperties, true);
|
|
20676
|
+
this.parent.setRecordValue('type', fromRecord.ganttProperties.taskType, toRecord.ganttProperties, true);
|
|
20367
20677
|
if (!isNullOrUndefined(this.parent.taskFields.startDate)) {
|
|
20368
20678
|
this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.startDate);
|
|
20369
20679
|
}
|
|
@@ -20386,6 +20696,9 @@ class DialogEdit {
|
|
|
20386
20696
|
if (!isNullOrUndefined(this.parent.taskFields.manual)) {
|
|
20387
20697
|
this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.manual);
|
|
20388
20698
|
}
|
|
20699
|
+
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
20700
|
+
this.parent.dataOperation.updateMappingData(this.rowData, "type");
|
|
20701
|
+
}
|
|
20389
20702
|
}
|
|
20390
20703
|
updatePredecessorTab(preElement) {
|
|
20391
20704
|
const gridObj = preElement.ej2_instances[0];
|
|
@@ -20399,10 +20712,6 @@ class DialogEdit {
|
|
|
20399
20712
|
const ids = [];
|
|
20400
20713
|
for (let i = 0; i < dataSource.length; i++) {
|
|
20401
20714
|
const preData = dataSource[i];
|
|
20402
|
-
const newId = preData.name.split('-')[0];
|
|
20403
|
-
if (preData.id !== newId) {
|
|
20404
|
-
preData.id = newId;
|
|
20405
|
-
}
|
|
20406
20715
|
if (ids.indexOf(preData.id) === -1) {
|
|
20407
20716
|
let name = preData.id + preData.type;
|
|
20408
20717
|
if (preData.offset && preData.offset.indexOf('-') !== -1) {
|
|
@@ -20627,8 +20936,7 @@ class ConnectorLineEdit {
|
|
|
20627
20936
|
this.parent.connectorLineModule.removeConnectorLineById('parent' + predecessor[from] + 'child' + predecessor[to]);
|
|
20628
20937
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[from]);
|
|
20629
20938
|
childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[to]);
|
|
20630
|
-
if (
|
|
20631
|
-
(childGanttRecord && childGanttRecord.expanded === true)) {
|
|
20939
|
+
if (parentGanttRecord || childGanttRecord) {
|
|
20632
20940
|
connectorObj =
|
|
20633
20941
|
this.parent.predecessorModule.updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
|
|
20634
20942
|
if (!isNullOrUndefined(connectorObj)) {
|
|
@@ -20667,14 +20975,36 @@ class ConnectorLineEdit {
|
|
|
20667
20975
|
idFromPredecessor(pre) {
|
|
20668
20976
|
const preArray = pre.split(',');
|
|
20669
20977
|
const preIdArray = [];
|
|
20978
|
+
let values;
|
|
20979
|
+
let match = [];
|
|
20670
20980
|
for (let j = 0; j < preArray.length; j++) {
|
|
20671
20981
|
const strArray = [];
|
|
20672
|
-
|
|
20673
|
-
|
|
20674
|
-
|
|
20982
|
+
values = preArray[j].split('+');
|
|
20983
|
+
if (preArray[j].indexOf('-') >= 0) {
|
|
20984
|
+
values = preArray[j].split('-');
|
|
20985
|
+
|
|
20986
|
+
}
|
|
20987
|
+
if (!isNullOrUndefined(values[0])) {
|
|
20988
|
+
const ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
20989
|
+
if (ids.indexOf(values[0]) === -1) {
|
|
20990
|
+
if (values[0].indexOf(" ") != -1) {
|
|
20991
|
+
match = values[0].split(" ");
|
|
20992
|
+
if (match.length === 1) {
|
|
20993
|
+
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
20994
|
+
}
|
|
20995
|
+
strArray.push(match[0]);
|
|
20996
|
+
}
|
|
20997
|
+
else {
|
|
20998
|
+
if (values[0].length === 1 || values[0].length === 2) {
|
|
20999
|
+
strArray.push(values[0]);
|
|
21000
|
+
}
|
|
21001
|
+
else {
|
|
21002
|
+
strArray.push(values[0].slice(0, -2));
|
|
21003
|
+
}
|
|
21004
|
+
}
|
|
20675
21005
|
}
|
|
20676
21006
|
else {
|
|
20677
|
-
|
|
21007
|
+
strArray.push(values[0]);
|
|
20678
21008
|
}
|
|
20679
21009
|
}
|
|
20680
21010
|
preIdArray.push((strArray.join('')));
|
|
@@ -20724,6 +21054,75 @@ class ConnectorLineEdit {
|
|
|
20724
21054
|
}
|
|
20725
21055
|
return true;
|
|
20726
21056
|
}
|
|
21057
|
+
// Get the root parent of the record
|
|
21058
|
+
getRootParent(rec) {
|
|
21059
|
+
let parentRec = rec;
|
|
21060
|
+
if (rec.parentItem) {
|
|
21061
|
+
parentRec = this.parent.flatData.filter((item) => {
|
|
21062
|
+
return item.uniqueID == rec.parentUniqueID;
|
|
21063
|
+
})[0];
|
|
21064
|
+
if (parentRec.parentItem) {
|
|
21065
|
+
parentRec = this.getRootParent(parentRec);
|
|
21066
|
+
}
|
|
21067
|
+
return parentRec;
|
|
21068
|
+
}
|
|
21069
|
+
return parentRec;
|
|
21070
|
+
}
|
|
21071
|
+
// To check whether the predecessor drawn is valid for parent task
|
|
21072
|
+
validateParentPredecessor(fromRecord, toRecord) {
|
|
21073
|
+
if (toRecord.hasChildRecords && !fromRecord.hasChildRecords) {
|
|
21074
|
+
if (fromRecord.parentUniqueID === toRecord.uniqueID) {
|
|
21075
|
+
return false;
|
|
21076
|
+
}
|
|
21077
|
+
else {
|
|
21078
|
+
do {
|
|
21079
|
+
if (fromRecord.parentItem) {
|
|
21080
|
+
fromRecord = this.parent.flatData[this.parent.ids.indexOf(fromRecord.parentItem.taskId)];
|
|
21081
|
+
if (fromRecord.uniqueID === toRecord.uniqueID) {
|
|
21082
|
+
return false;
|
|
21083
|
+
}
|
|
21084
|
+
}
|
|
21085
|
+
} while (fromRecord.parentItem);
|
|
21086
|
+
}
|
|
21087
|
+
}
|
|
21088
|
+
else if (!toRecord.hasChildRecords && fromRecord.hasChildRecords) {
|
|
21089
|
+
if (toRecord.parentUniqueID === fromRecord.uniqueID) {
|
|
21090
|
+
return false;
|
|
21091
|
+
}
|
|
21092
|
+
else {
|
|
21093
|
+
do {
|
|
21094
|
+
if (toRecord.parentItem) {
|
|
21095
|
+
toRecord = this.parent.flatData[this.parent.ids.indexOf(toRecord.parentItem.taskId)];
|
|
21096
|
+
if (toRecord.uniqueID === fromRecord.uniqueID) {
|
|
21097
|
+
return false;
|
|
21098
|
+
}
|
|
21099
|
+
}
|
|
21100
|
+
} while (toRecord.parentItem);
|
|
21101
|
+
}
|
|
21102
|
+
}
|
|
21103
|
+
else if (toRecord.hasChildRecords && fromRecord.hasChildRecords) {
|
|
21104
|
+
if (toRecord.parentItem && fromRecord.parentItem) {
|
|
21105
|
+
if (fromRecord.parentUniqueID === toRecord.uniqueID || fromRecord.uniqueID === toRecord.parentUniqueID) {
|
|
21106
|
+
return false;
|
|
21107
|
+
}
|
|
21108
|
+
}
|
|
21109
|
+
else {
|
|
21110
|
+
if (!toRecord.parentItem && fromRecord.parentItem) {
|
|
21111
|
+
let fromRootParent = this.parent.connectorLineEditModule.getRootParent(fromRecord);
|
|
21112
|
+
if (fromRootParent.uniqueID === toRecord.uniqueID) {
|
|
21113
|
+
return false;
|
|
21114
|
+
}
|
|
21115
|
+
}
|
|
21116
|
+
else if (toRecord.parentItem && !fromRecord.parentItem) {
|
|
21117
|
+
let toRootParent = this.parent.connectorLineEditModule.getRootParent(toRecord);
|
|
21118
|
+
if (toRootParent.uniqueID === fromRecord.uniqueID) {
|
|
21119
|
+
return false;
|
|
21120
|
+
}
|
|
21121
|
+
}
|
|
21122
|
+
}
|
|
21123
|
+
}
|
|
21124
|
+
return true;
|
|
21125
|
+
}
|
|
20727
21126
|
/**
|
|
20728
21127
|
* To validate predecessor relations
|
|
20729
21128
|
*
|
|
@@ -20733,7 +21132,7 @@ class ConnectorLineEdit {
|
|
|
20733
21132
|
* @private
|
|
20734
21133
|
*/
|
|
20735
21134
|
validatePredecessorRelation(ganttRecord, predecessorString) {
|
|
20736
|
-
|
|
21135
|
+
let flag = true;
|
|
20737
21136
|
const recordId = this.parent.viewType === 'ResourceView' ? ganttRecord.ganttProperties.taskId
|
|
20738
21137
|
: ganttRecord.ganttProperties.rowUniqueID;
|
|
20739
21138
|
let predecessorIdArray;
|
|
@@ -20741,10 +21140,12 @@ class ConnectorLineEdit {
|
|
|
20741
21140
|
if (!isNullOrUndefined(predecessorString) && predecessorString.length > 0) {
|
|
20742
21141
|
predecessorIdArray = this.idFromPredecessor(predecessorString);
|
|
20743
21142
|
for (let count = 0; count < predecessorIdArray.length; count++) {
|
|
20744
|
-
|
|
20745
|
-
|
|
20746
|
-
|
|
20747
|
-
|
|
21143
|
+
if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this.parent.taskFields.id]) {
|
|
21144
|
+
let num = this.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
|
|
21145
|
+
let fromRecord = this.parent.currentViewData[num];
|
|
21146
|
+
if (fromRecord && ganttRecord) {
|
|
21147
|
+
flag = this.validateParentPredecessor(fromRecord, ganttRecord);
|
|
21148
|
+
}
|
|
20748
21149
|
}
|
|
20749
21150
|
// Check if predecessor exist more then one
|
|
20750
21151
|
const tempIdArray = predecessorIdArray.slice(0);
|
|
@@ -22108,6 +22509,10 @@ class Edit$2 {
|
|
|
22108
22509
|
}
|
|
22109
22510
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
22110
22511
|
}
|
|
22512
|
+
if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
22513
|
+
(args.action === "DrawConnectorLine" || args.action === "DialogEditing")) {
|
|
22514
|
+
this.updateChildItems(ganttRecord);
|
|
22515
|
+
}
|
|
22111
22516
|
this.updateParentItemOnEditing();
|
|
22112
22517
|
}
|
|
22113
22518
|
/** Update parent up-to zeroth level */
|
|
@@ -22564,9 +22969,16 @@ class Edit$2 {
|
|
|
22564
22969
|
}
|
|
22565
22970
|
for (let index = 0; index < currentLength; index++) {
|
|
22566
22971
|
const recordIndex = [];
|
|
22567
|
-
|
|
22972
|
+
let resourceID = parseInt(currentResource[index][this.parent.resourceFields.id], 10).toString();
|
|
22973
|
+
if (resourceID === "NaN") {
|
|
22974
|
+
resourceID = currentResource[index][this.parent.resourceFields.id];
|
|
22975
|
+
}
|
|
22568
22976
|
for (let i = 0; i < prevResource.length; i++) {
|
|
22569
|
-
|
|
22977
|
+
let prevResourceID = parseInt(prevResource[i][this.parent.resourceFields.id], 10).toString();
|
|
22978
|
+
if (prevResourceID === "NaN") {
|
|
22979
|
+
prevResourceID = prevResource[i][this.parent.resourceFields.id];
|
|
22980
|
+
}
|
|
22981
|
+
if (prevResourceID === resourceID) {
|
|
22570
22982
|
recordIndex.push(i);
|
|
22571
22983
|
break;
|
|
22572
22984
|
}
|
|
@@ -22578,7 +22990,11 @@ class Edit$2 {
|
|
|
22578
22990
|
}
|
|
22579
22991
|
}
|
|
22580
22992
|
else {
|
|
22581
|
-
|
|
22993
|
+
let record1 = parseInt(recordIndex[0].toString(), 10);
|
|
22994
|
+
if (record1.toString() === "NaN") {
|
|
22995
|
+
record1 = recordIndex[0].toString();
|
|
22996
|
+
}
|
|
22997
|
+
prevResource.splice(record1, 1);
|
|
22582
22998
|
}
|
|
22583
22999
|
}
|
|
22584
23000
|
const prevLength = prevResource ? prevResource.length : 0;
|
|
@@ -22893,6 +23309,10 @@ class Edit$2 {
|
|
|
22893
23309
|
for (let i = 0; i < selectedRecords.length; i++) {
|
|
22894
23310
|
if (selectedRecords[i].parentItem) {
|
|
22895
23311
|
const data = selectedRecords[i];
|
|
23312
|
+
const ids = data.ganttProperties.sharedTaskUniqueIds;
|
|
23313
|
+
for (let j = 0; j < ids.length; j++) {
|
|
23314
|
+
deleteRecords.push(this.parent.flatData[this.parent.ids.indexOf(ids[j].toString())]);
|
|
23315
|
+
}
|
|
22896
23316
|
deleteRecords.push(this.parent.flatData[this.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
22897
23317
|
}
|
|
22898
23318
|
else {
|
|
@@ -23366,12 +23786,34 @@ class Edit$2 {
|
|
|
23366
23786
|
* @private
|
|
23367
23787
|
*/
|
|
23368
23788
|
getNewTaskId() {
|
|
23369
|
-
const
|
|
23370
|
-
|
|
23371
|
-
|
|
23789
|
+
const ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
23790
|
+
const maxId = ids.length;
|
|
23791
|
+
let newTaskId = maxId + 1;
|
|
23792
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
23793
|
+
if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
|
|
23794
|
+
newTaskId = newTaskId + 1;
|
|
23795
|
+
if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
|
|
23796
|
+
do {
|
|
23797
|
+
newTaskId = newTaskId + 1;
|
|
23798
|
+
} while (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1);
|
|
23799
|
+
}
|
|
23800
|
+
}
|
|
23372
23801
|
}
|
|
23373
23802
|
else {
|
|
23374
|
-
|
|
23803
|
+
if (ids.indexOf(newTaskId.toString()) != -1) {
|
|
23804
|
+
newTaskId = newTaskId + 1;
|
|
23805
|
+
if (ids.indexOf(newTaskId.toString()) != -1) {
|
|
23806
|
+
do {
|
|
23807
|
+
newTaskId = newTaskId + 1;
|
|
23808
|
+
} while (ids.indexOf(newTaskId.toString()) != -1);
|
|
23809
|
+
}
|
|
23810
|
+
}
|
|
23811
|
+
}
|
|
23812
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
23813
|
+
return newTaskId = newTaskId.toString();
|
|
23814
|
+
}
|
|
23815
|
+
else {
|
|
23816
|
+
return newTaskId;
|
|
23375
23817
|
}
|
|
23376
23818
|
}
|
|
23377
23819
|
/**
|
|
@@ -23384,6 +23826,7 @@ class Edit$2 {
|
|
|
23384
23826
|
prepareNewlyAddedData(obj, rowPosition) {
|
|
23385
23827
|
const taskModel = this.parent.taskFields;
|
|
23386
23828
|
let id;
|
|
23829
|
+
let newTaskIDmd;
|
|
23387
23830
|
const ids = this.parent.ids;
|
|
23388
23831
|
/*Validate Task Id of data*/
|
|
23389
23832
|
if (obj[taskModel.id]) {
|
|
@@ -23391,7 +23834,13 @@ class Edit$2 {
|
|
|
23391
23834
|
obj[taskModel.id] = null;
|
|
23392
23835
|
}
|
|
23393
23836
|
else {
|
|
23394
|
-
|
|
23837
|
+
if (typeof (obj[taskModel.id]) === "string") {
|
|
23838
|
+
newTaskIDmd = obj[taskModel.id];
|
|
23839
|
+
}
|
|
23840
|
+
else {
|
|
23841
|
+
newTaskIDmd = parseInt(obj[taskModel.id], 10);
|
|
23842
|
+
}
|
|
23843
|
+
obj[taskModel.id] = isNullOrUndefined(newTaskIDmd) ? null : newTaskIDmd;
|
|
23395
23844
|
}
|
|
23396
23845
|
}
|
|
23397
23846
|
if (!obj[taskModel.id]) {
|
|
@@ -23631,7 +24080,7 @@ class Edit$2 {
|
|
|
23631
24080
|
recordIndex = currentItemIndex + dataChildCount + 1;
|
|
23632
24081
|
//Expand Add record's parent item for project view
|
|
23633
24082
|
if (!this.addRowSelectedItem.expanded && !this.parent.enableMultiTaskbar) {
|
|
23634
|
-
this.parent.expandByID(
|
|
24083
|
+
this.parent.expandByID(this.addRowSelectedItem.ganttProperties.rowUniqueID);
|
|
23635
24084
|
}
|
|
23636
24085
|
updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem) +
|
|
23637
24086
|
this.getVisibleChildRecordCount(this.addRowSelectedItem, 0, currentViewData) + 1;
|
|
@@ -23671,6 +24120,10 @@ class Edit$2 {
|
|
|
23671
24120
|
/* Record collection update */
|
|
23672
24121
|
flatRecords.splice(recordIndex, 0, record);
|
|
23673
24122
|
currentViewData.splice(updatedCollectionIndex, 0, record);
|
|
24123
|
+
if (this.parent.viewType === 'ResourceView' && typeof (record.ganttProperties.taskId) === "number") {
|
|
24124
|
+
let taskString = record.ganttProperties.taskId;
|
|
24125
|
+
ids.push(taskString.toString());
|
|
24126
|
+
}
|
|
23674
24127
|
ids.splice(recordIndex, 0, record.ganttProperties.rowUniqueID.toString());
|
|
23675
24128
|
if (this.parent.viewType === 'ResourceView') {
|
|
23676
24129
|
const taskId = record.level === 0 ? 'R' + record.ganttProperties.taskId : 'T' + record.ganttProperties.taskId;
|
|
@@ -23819,7 +24272,9 @@ class Edit$2 {
|
|
|
23819
24272
|
dataSource.push(addedRecord[i].taskData);
|
|
23820
24273
|
}
|
|
23821
24274
|
else {
|
|
23822
|
-
|
|
24275
|
+
if (isNullOrUndefined(addedRecord[i].parentItem)) {
|
|
24276
|
+
this.addDataInRealDataSource(dataSource, addedRecord[i].taskData, rowPosition);
|
|
24277
|
+
}
|
|
23823
24278
|
}
|
|
23824
24279
|
}
|
|
23825
24280
|
this.isBreakLoop = false;
|
|
@@ -23874,6 +24329,7 @@ class Edit$2 {
|
|
|
23874
24329
|
* @private
|
|
23875
24330
|
*/
|
|
23876
24331
|
addRecord(data, rowPosition, rowIndex) {
|
|
24332
|
+
let tempTaskID = this.parent.taskFields.id;
|
|
23877
24333
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
23878
24334
|
this.parent.isDynamicData = true;
|
|
23879
24335
|
const cAddedRecord = [];
|
|
@@ -23895,6 +24351,12 @@ class Edit$2 {
|
|
|
23895
24351
|
args = this.constructTaskAddedEventArgs(cAddedRecord, this.parent.editedRecords, 'beforeAdd');
|
|
23896
24352
|
this.parent.showSpinner();
|
|
23897
24353
|
this.parent.trigger('actionBegin', args, (args) => {
|
|
24354
|
+
if (!isNullOrUndefined(args.data[tempTaskID])) {
|
|
24355
|
+
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
24356
|
+
args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
|
|
24357
|
+
args.newTaskData[tempTaskID] = args.data[tempTaskID];
|
|
24358
|
+
}
|
|
24359
|
+
}
|
|
23898
24360
|
if (!args.cancel) {
|
|
23899
24361
|
if (isRemoteData(this.parent.dataSource)) {
|
|
23900
24362
|
const data = this.parent.dataSource;
|
|
@@ -24953,10 +25415,13 @@ class Filter$1 {
|
|
|
24953
25415
|
this.parent.on('actionComplete', this.actionComplete, this);
|
|
24954
25416
|
this.parent.on('columnMenuOpen', this.columnMenuOpen, this);
|
|
24955
25417
|
}
|
|
25418
|
+
wireEvents(a) {
|
|
25419
|
+
EventHandler.add(document.getElementById(a), 'click', this.mouseClickHandler, this);
|
|
25420
|
+
}
|
|
24956
25421
|
initiateFiltering(column) {
|
|
24957
25422
|
const treeColumn = this.parent.getColumnByField(column.field, this.parent.treeGridModule.treeGridColumns);
|
|
24958
25423
|
column.allowFiltering = column.allowFiltering === false ? false : true;
|
|
24959
|
-
if (column.allowFiltering && this.parent.filterSettings.type === 'Menu' && !column.filter) {
|
|
25424
|
+
if (column.allowFiltering && (this.parent.filterSettings.type === 'Menu' || this.parent.filterSettings.type === 'Excel') && !column.filter) {
|
|
24960
25425
|
column.filter = { ui: this.getCustomFilterUi(column) };
|
|
24961
25426
|
}
|
|
24962
25427
|
if (treeColumn) {
|
|
@@ -24986,6 +25451,14 @@ class Filter$1 {
|
|
|
24986
25451
|
}
|
|
24987
25452
|
return filterUI;
|
|
24988
25453
|
}
|
|
25454
|
+
mouseClickHandler(e) {
|
|
25455
|
+
if (closest(e.target, ".e-excelfilter")) {
|
|
25456
|
+
this.parent.treeGrid.grid.notify("click", e);
|
|
25457
|
+
}
|
|
25458
|
+
}
|
|
25459
|
+
unWireEvents() {
|
|
25460
|
+
EventHandler.remove(this.parent.element, 'click', this.mouseClickHandler);
|
|
25461
|
+
}
|
|
24989
25462
|
getDatePickerFilter(columnName) {
|
|
24990
25463
|
const parent = this.parent;
|
|
24991
25464
|
const timeValue = (columnName === parent.taskFields.startDate) || (columnName === parent.taskFields.baselineStartDate)
|
|
@@ -25104,6 +25577,15 @@ class Filter$1 {
|
|
|
25104
25577
|
}
|
|
25105
25578
|
}
|
|
25106
25579
|
actionComplete(args) {
|
|
25580
|
+
if (!isNullOrUndefined(args['filterModel'])) {
|
|
25581
|
+
if (!isNullOrUndefined(args['filterModel']['dialogObj'])) {
|
|
25582
|
+
if (!isNullOrUndefined(args['filterModel']['dialogObj']['element'])) {
|
|
25583
|
+
if (this.parent.filterSettings.type === 'Excel') {
|
|
25584
|
+
this.wireEvents(args['filterModel']['dialogObj']['element'].id);
|
|
25585
|
+
}
|
|
25586
|
+
}
|
|
25587
|
+
}
|
|
25588
|
+
}
|
|
25107
25589
|
if (args.requestType === filterAfterOpen) {
|
|
25108
25590
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25109
25591
|
this.filterMenuElement = getValue('filterModel.dlgObj.element', args);
|
|
@@ -25121,12 +25603,15 @@ class Filter$1 {
|
|
|
25121
25603
|
if ((args.columnName === predecessor && isNullOrUndefined(getValue(predecessor, filterValues)))
|
|
25122
25604
|
|| (args.columnName === resource && isNullOrUndefined(getValue(resource, filterValues)))) {
|
|
25123
25605
|
const element = this.filterMenuElement.querySelector('.e-dropdownlist');
|
|
25124
|
-
|
|
25125
|
-
|
|
25126
|
-
|
|
25606
|
+
let instanceObj;
|
|
25607
|
+
if (!isNullOrUndefined(element)) {
|
|
25608
|
+
instanceObj = getValue('ej2_instances[0]', element);
|
|
25609
|
+
instanceObj.index = 2;
|
|
25610
|
+
instanceObj.dataBind();
|
|
25611
|
+
}
|
|
25127
25612
|
}
|
|
25128
25613
|
else if (args.columnName === taskID && isNullOrUndefined(getValue(taskID, filterValues)) && this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25129
|
-
const element = this.filterMenuElement.querySelector('.e-
|
|
25614
|
+
const element = this.filterMenuElement.querySelector('.e-flmenu-input');
|
|
25130
25615
|
const instanceObj = getValue('ej2_instances[0]', element);
|
|
25131
25616
|
if (!isNullOrUndefined(instanceObj) && isNullOrUndefined(this.parent.columnByField[args.columnName].format)) {
|
|
25132
25617
|
instanceObj.format = 'n';
|
|
@@ -25157,6 +25642,7 @@ class Filter$1 {
|
|
|
25157
25642
|
*/
|
|
25158
25643
|
destroy() {
|
|
25159
25644
|
this.removeEventListener();
|
|
25645
|
+
this.unWireEvents();
|
|
25160
25646
|
}
|
|
25161
25647
|
}
|
|
25162
25648
|
|
|
@@ -26271,7 +26757,6 @@ class NonWorkingDay {
|
|
|
26271
26757
|
this.nonworkingContainer = createElement('div', {
|
|
26272
26758
|
className: nonworkingContainer
|
|
26273
26759
|
});
|
|
26274
|
-
this.nonworkingContainer.setAttribute("role", "NonWorkingDays");
|
|
26275
26760
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer);
|
|
26276
26761
|
}
|
|
26277
26762
|
}
|
|
@@ -26477,7 +26962,7 @@ class EventMarker$1 {
|
|
|
26477
26962
|
this.eventMarkersContainer = createElement('div', {
|
|
26478
26963
|
className: eventMarkersContainer
|
|
26479
26964
|
});
|
|
26480
|
-
this.eventMarkersContainer.setAttribute("role", "
|
|
26965
|
+
this.eventMarkersContainer.setAttribute("role", "term");
|
|
26481
26966
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer);
|
|
26482
26967
|
}
|
|
26483
26968
|
this.eventMarkersContainer.innerHTML = '';
|
|
@@ -26630,7 +27115,7 @@ class CriticalPath {
|
|
|
26630
27115
|
showCriticalPath(isCritical) {
|
|
26631
27116
|
const modelIds = this.parent.ids;
|
|
26632
27117
|
const totalRecords = this.parent.flatData;
|
|
26633
|
-
if (isCritical && this.parent.flatData.length > 0
|
|
27118
|
+
if (isCritical && this.parent.flatData.length > 0) {
|
|
26634
27119
|
this.parent.enableCriticalPath = true;
|
|
26635
27120
|
const parentRecords = this.parent.treeGrid.parentData;
|
|
26636
27121
|
let checkEndDateTaskid;
|
|
@@ -26675,12 +27160,12 @@ class CriticalPath {
|
|
|
26675
27160
|
totalRecords[j].slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
26676
27161
|
totalRecords[j].ganttProperties.slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
26677
27162
|
if (totalRecords[j].ganttProperties.endDate >= checkEndDate) {
|
|
26678
|
-
checkBeyondEnddate.push(
|
|
27163
|
+
checkBeyondEnddate.push(totalRecords[j].ganttProperties.taskId);
|
|
26679
27164
|
}
|
|
26680
27165
|
if (totalRecords[j].ganttProperties.predecessor) {
|
|
26681
27166
|
if (totalRecords[j].ganttProperties.predecessor.length !== 0) {
|
|
26682
27167
|
totalPredecessorsCollection.push(totalRecords[j]);
|
|
26683
|
-
totalPredecessorsCollectionId.push(
|
|
27168
|
+
totalPredecessorsCollectionId.push((totalRecords[j].ganttProperties.taskId));
|
|
26684
27169
|
}
|
|
26685
27170
|
}
|
|
26686
27171
|
}
|
|
@@ -26696,7 +27181,14 @@ class CriticalPath {
|
|
|
26696
27181
|
predecessorIndex = modelIds.indexOf(checkBeyondEnddate[k].toString());
|
|
26697
27182
|
}
|
|
26698
27183
|
else {
|
|
26699
|
-
|
|
27184
|
+
let currentRecords = this.parent.currentViewData.filter((data) => {
|
|
27185
|
+
return parseInt(data.ganttProperties.taskId) == checkBeyondEnddate[k];
|
|
27186
|
+
});
|
|
27187
|
+
for (let i = 0; i < currentRecords.length; i++) {
|
|
27188
|
+
if (!currentRecords[i].hasChildRecords && currentRecords[i].ganttProperties.endDate >= this.maxEndDate) {
|
|
27189
|
+
predecessorIndex = currentRecords[i].index;
|
|
27190
|
+
}
|
|
27191
|
+
}
|
|
26700
27192
|
}
|
|
26701
27193
|
if (totalRecords[predecessorIndex].ganttProperties.progress < 100) {
|
|
26702
27194
|
totalRecords[predecessorIndex].isCritical = true;
|
|
@@ -26717,12 +27209,22 @@ class CriticalPath {
|
|
|
26717
27209
|
let from = -1;
|
|
26718
27210
|
let toPredecessor = -1;
|
|
26719
27211
|
let fromPredecessor = -1;
|
|
27212
|
+
let tempTaskId;
|
|
26720
27213
|
const currentIndex = x;
|
|
26721
27214
|
const predecessor = totalPredecessorsCollection[x].ganttProperties.predecessor;
|
|
26722
27215
|
const individualPredecessorLength = totalPredecessorsCollection[x].ganttProperties.predecessor.length;
|
|
26723
|
-
const taskid = (
|
|
27216
|
+
const taskid = ((totalPredecessorsCollection[x].ganttProperties.taskId));
|
|
26724
27217
|
for (let y = 0; y < individualPredecessorLength; y++) {
|
|
26725
|
-
if (
|
|
27218
|
+
if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) != "string") {
|
|
27219
|
+
tempTaskId = parseInt((predecessor[y].from), 10);
|
|
27220
|
+
}
|
|
27221
|
+
else if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) === "string") {
|
|
27222
|
+
tempTaskId = predecessor[y].from;
|
|
27223
|
+
}
|
|
27224
|
+
else {
|
|
27225
|
+
tempTaskId = predecessor[y].from;
|
|
27226
|
+
}
|
|
27227
|
+
if (tempTaskId === taskid) {
|
|
26726
27228
|
if (to === -1) {
|
|
26727
27229
|
if (!predecessor[y].offset) {
|
|
26728
27230
|
to = predecessor[y].to;
|
|
@@ -26744,7 +27246,16 @@ class CriticalPath {
|
|
|
26744
27246
|
}
|
|
26745
27247
|
}
|
|
26746
27248
|
}
|
|
26747
|
-
if (
|
|
27249
|
+
if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) != "string") {
|
|
27250
|
+
tempTaskId = parseInt((predecessor[y].to), 10);
|
|
27251
|
+
}
|
|
27252
|
+
else if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) === "string") {
|
|
27253
|
+
tempTaskId = predecessor[y].to;
|
|
27254
|
+
}
|
|
27255
|
+
else {
|
|
27256
|
+
tempTaskId = predecessor[y].to;
|
|
27257
|
+
}
|
|
27258
|
+
if (tempTaskId === taskid) {
|
|
26748
27259
|
if (from === -1) {
|
|
26749
27260
|
if (!predecessor[y].offset) {
|
|
26750
27261
|
from = predecessor[y].from;
|
|
@@ -26813,7 +27324,7 @@ class CriticalPath {
|
|
|
26813
27324
|
this.detailPredecessorCollection = collection;
|
|
26814
27325
|
this.predecessorCollectionTaskIds = collectionTaskId;
|
|
26815
27326
|
}
|
|
26816
|
-
if (isCritical === false && this.parent.flatData.length > 0
|
|
27327
|
+
if (isCritical === false && this.parent.flatData.length > 0) {
|
|
26817
27328
|
let pathIndex;
|
|
26818
27329
|
this.parent.enableCriticalPath = false;
|
|
26819
27330
|
for (let z = 0; z < this.criticalPathCollection.length; z++) {
|
|
@@ -26829,6 +27340,8 @@ class CriticalPath {
|
|
|
26829
27340
|
slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, flatRecords, modelRecordIds) {
|
|
26830
27341
|
const fromDateArray = fromDataObject[0]['fromdata'].split(',');
|
|
26831
27342
|
const fromDataPredecessor = fromDataObject[0]['fromDataPredecessor'].split(',');
|
|
27343
|
+
collectionTaskId = collectionTaskId.toString();
|
|
27344
|
+
collectionTaskId = collectionTaskId.split(',');
|
|
26832
27345
|
let fromDateArray1 = [];
|
|
26833
27346
|
let fromTaskIdIndex;
|
|
26834
27347
|
let indexFromTaskId;
|
|
@@ -26840,8 +27353,8 @@ class CriticalPath {
|
|
|
26840
27353
|
let ffslack;
|
|
26841
27354
|
for (let i = 0; i < fromDateArray.length; i++) {
|
|
26842
27355
|
fromDateArray1 = fromDateArray[i].split(':');
|
|
26843
|
-
fromTaskIdIndex = collectionTaskId.indexOf(
|
|
26844
|
-
totaskId = collectionTaskId.indexOf(
|
|
27356
|
+
fromTaskIdIndex = collectionTaskId.indexOf((fromDateArray1[0].toString()));
|
|
27357
|
+
totaskId = collectionTaskId.indexOf((fromDataObject[0]['todateID'].toString()));
|
|
26845
27358
|
if (this.parent.viewType === 'ProjectView') {
|
|
26846
27359
|
indexFromTaskId = modelRecordIds.indexOf(fromDateArray1[0].toString());
|
|
26847
27360
|
indexToTaskId = modelRecordIds.indexOf(fromDataObject[0]['todateID'].toString());
|
|
@@ -27186,6 +27699,7 @@ class CriticalPath {
|
|
|
27186
27699
|
finalCriticalPath(collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
|
|
27187
27700
|
let criticalPathIds = [];
|
|
27188
27701
|
let index;
|
|
27702
|
+
let predecessorFrom;
|
|
27189
27703
|
for (let x = collection.length - 1; x >= 0; x--) {
|
|
27190
27704
|
if (this.parent.viewType === 'ProjectView') {
|
|
27191
27705
|
index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
|
|
@@ -27229,7 +27743,13 @@ class CriticalPath {
|
|
|
27229
27743
|
/* eslint-disable-next-line */
|
|
27230
27744
|
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.endDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27231
27745
|
}
|
|
27232
|
-
if (
|
|
27746
|
+
if (typeof (flatRecords[index][this.parent.taskFields.id]) === 'number') {
|
|
27747
|
+
predecessorFrom = parseInt(predecessorLength[i].from, 10);
|
|
27748
|
+
}
|
|
27749
|
+
else {
|
|
27750
|
+
predecessorFrom = predecessorLength[i].from;
|
|
27751
|
+
}
|
|
27752
|
+
if (predecessorFrom === flatRecords[index][this.parent.taskFields.id] &&
|
|
27233
27753
|
flatRecords[toID].slack === noSlackValue && dateDifference <= 0) {
|
|
27234
27754
|
flatRecords[index].slack = noSlackValue;
|
|
27235
27755
|
flatRecords[index].ganttProperties.slack = noSlackValue;
|
|
@@ -27267,15 +27787,35 @@ class CriticalPath {
|
|
|
27267
27787
|
for (let i = 0; i < criticalPathIds.length; i++) {
|
|
27268
27788
|
let criticalData;
|
|
27269
27789
|
if (this.parent.viewType === 'ProjectView') {
|
|
27270
|
-
criticalData = this.parent.
|
|
27790
|
+
criticalData = this.parent.currentViewData[this.parent.ids.indexOf(criticalPathIds[i].toString())];
|
|
27271
27791
|
}
|
|
27272
27792
|
else {
|
|
27273
|
-
|
|
27793
|
+
let currentRecords = this.parent.currentViewData.filter((data) => {
|
|
27794
|
+
return (data.ganttProperties.taskId).toString() == criticalPathIds[i].toString();
|
|
27795
|
+
});
|
|
27796
|
+
for (let i = 0; i < currentRecords.length; i++) {
|
|
27797
|
+
if (currentRecords[i].ganttProperties.isCritical || currentRecords[i].ganttProperties.endDate >= this.maxEndDate) {
|
|
27798
|
+
criticalData = currentRecords[i];
|
|
27799
|
+
}
|
|
27800
|
+
}
|
|
27274
27801
|
}
|
|
27275
27802
|
const index = this.parent.currentViewData.indexOf(criticalData);
|
|
27276
27803
|
const element = this.parent.getRowByIndex(index);
|
|
27277
27804
|
let taskClass;
|
|
27278
27805
|
const columnFields = this.parent.taskFields;
|
|
27806
|
+
if (criticalData.parentItem) {
|
|
27807
|
+
const parentRecord = this.parent.currentViewData.filter((data) => {
|
|
27808
|
+
return criticalData.parentItem.uniqueID == data.uniqueID;
|
|
27809
|
+
});
|
|
27810
|
+
const parentIndex = this.parent.currentViewData.indexOf(parentRecord[0]);
|
|
27811
|
+
const parentElement = this.parent.getRowByIndex(parentIndex);
|
|
27812
|
+
let parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
|
|
27813
|
+
for (let i = 0; i < parentTaskbarElement.length; i++) {
|
|
27814
|
+
if (parentTaskbarElement[i].getAttribute('rowuniqueid') == criticalData['rowUniqueID']) {
|
|
27815
|
+
addClass(parentTaskbarElement[i].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
27816
|
+
}
|
|
27817
|
+
}
|
|
27818
|
+
}
|
|
27279
27819
|
/* eslint-disable-next-line */
|
|
27280
27820
|
if (this.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
27281
27821
|
taskClass = criticalUnscheduledTask;
|
|
@@ -27283,7 +27823,8 @@ class CriticalPath {
|
|
|
27283
27823
|
else {
|
|
27284
27824
|
taskClass = criticalChildProgressBarInnerDiv;
|
|
27285
27825
|
}
|
|
27286
|
-
if (element
|
|
27826
|
+
if (element && (this.parent.viewType === 'ProjectView' || (this.parent.viewType === 'ResourceView' &&
|
|
27827
|
+
!criticalData.hasChildRecords))) {
|
|
27287
27828
|
if (element.getElementsByClassName('e-milestone-top')[0]) {
|
|
27288
27829
|
addClass(element.querySelectorAll('.e-milestone-top'), criticalMilestoneTop);
|
|
27289
27830
|
}
|
|
@@ -27303,13 +27844,22 @@ class CriticalPath {
|
|
|
27303
27844
|
let currentdata;
|
|
27304
27845
|
let checking = [];
|
|
27305
27846
|
let checkint;
|
|
27847
|
+
let values;
|
|
27306
27848
|
for (let i = 0; i < this.criticalPathCollection.length; i++) {
|
|
27307
27849
|
index = collectionTaskId.indexOf(this.criticalPathCollection[i]);
|
|
27308
27850
|
currentdata = collection[index];
|
|
27309
27851
|
if (index !== -1 && currentdata['to']) {
|
|
27310
27852
|
checking = currentdata['to'].split(',');
|
|
27311
27853
|
for (let j = 0; j < checking.length; j++) {
|
|
27312
|
-
|
|
27854
|
+
values = checking[j].split('+');
|
|
27855
|
+
if (checking[j].indexOf('-') >= 0) {
|
|
27856
|
+
values = checking[j].split('-');
|
|
27857
|
+
|
|
27858
|
+
}
|
|
27859
|
+
checkint = (values[0].replace(":", ""));
|
|
27860
|
+
if (typeof (criticalPathIds[j]) === "number") {
|
|
27861
|
+
checkint = parseInt(values[0], 10);
|
|
27862
|
+
}
|
|
27313
27863
|
if (criticalPathIds.indexOf(checkint) !== -1) {
|
|
27314
27864
|
const lineElement = this.parent.element.querySelectorAll('#ConnectorLineparent' +
|
|
27315
27865
|
currentdata['taskid'] + 'child' + checkint);
|
|
@@ -27439,7 +27989,12 @@ class ContextMenu$2 {
|
|
|
27439
27989
|
}
|
|
27440
27990
|
switch (this.item) {
|
|
27441
27991
|
case 'TaskInformation':
|
|
27442
|
-
|
|
27992
|
+
if (isNaN(Number(this.rowData.ganttProperties.rowUniqueID))) {
|
|
27993
|
+
this.parent.openEditDialog(this.rowData.ganttProperties.rowUniqueID);
|
|
27994
|
+
}
|
|
27995
|
+
else {
|
|
27996
|
+
this.parent.openEditDialog(Number(this.rowData.ganttProperties.rowUniqueID));
|
|
27997
|
+
}
|
|
27443
27998
|
break;
|
|
27444
27999
|
case 'Above':
|
|
27445
28000
|
case 'Below':
|
|
@@ -28242,7 +28797,7 @@ class RowDD$1 {
|
|
|
28242
28797
|
}
|
|
28243
28798
|
rowDragStartHelper(args) {
|
|
28244
28799
|
this.parent.trigger('rowDragStartHelper', args);
|
|
28245
|
-
if (this.parent.readOnly
|
|
28800
|
+
if (this.parent.readOnly) {
|
|
28246
28801
|
args.cancel = true;
|
|
28247
28802
|
}
|
|
28248
28803
|
if (this.parent.viewType === 'ResourceView' && getValue('level', args.data[0]) === 0) {
|
|
@@ -28464,6 +29019,62 @@ class RowDD$1 {
|
|
|
28464
29019
|
this.updateSharedResourceTask();
|
|
28465
29020
|
}
|
|
28466
29021
|
}
|
|
29022
|
+
if (this.parent.taskFields.dependency) {
|
|
29023
|
+
let isValidPredecessor = true;
|
|
29024
|
+
let draggedParent;
|
|
29025
|
+
let toParent;
|
|
29026
|
+
if (draggedRecord.parentItem) {
|
|
29027
|
+
draggedParent = this.parent.currentViewData[this.parent.ids.indexOf(draggedRecord.parentItem.taskId)];
|
|
29028
|
+
}
|
|
29029
|
+
else {
|
|
29030
|
+
draggedParent = draggedRecord;
|
|
29031
|
+
}
|
|
29032
|
+
if (droppedRecord.parentItem) {
|
|
29033
|
+
toParent = this.parent.currentViewData[this.parent.ids.indexOf(droppedRecord.parentItem.taskId)];
|
|
29034
|
+
}
|
|
29035
|
+
else {
|
|
29036
|
+
toParent = droppedRecord;
|
|
29037
|
+
}
|
|
29038
|
+
let validateRecords;
|
|
29039
|
+
if (toParent.uniqueID === draggedParent.uniqueID || (draggedParent.parentItem &&
|
|
29040
|
+
toParent.uniqueID == this.parent.currentViewData[this.parent.ids.indexOf(draggedParent.parentItem.taskId)].uniqueID)) {
|
|
29041
|
+
validateRecords = this.parent.currentViewData.filter((data) => {
|
|
29042
|
+
if ((data.ganttProperties.predecessor && data.ganttProperties.predecessor.length > 0)) {
|
|
29043
|
+
for (let i = 0; i < data.ganttProperties.predecessor.length; i++) {
|
|
29044
|
+
return (parseInt(data.ganttProperties.predecessor[i].to) === parseInt(toParent.ganttProperties.taskId) ||
|
|
29045
|
+
parseInt(data.ganttProperties.predecessor[i].from) === parseInt(toParent.ganttProperties.taskId));
|
|
29046
|
+
}
|
|
29047
|
+
}
|
|
29048
|
+
return null;
|
|
29049
|
+
});
|
|
29050
|
+
let predName = [];
|
|
29051
|
+
for (let i = 0; i < validateRecords.length; i++) {
|
|
29052
|
+
predName = [];
|
|
29053
|
+
if (validateRecords[i].ganttProperties.predecessor) {
|
|
29054
|
+
for (let k = 0; k < validateRecords[i].ganttProperties.predecessor.length; k++) {
|
|
29055
|
+
if (parseInt(validateRecords[i].ganttProperties.taskId) !==
|
|
29056
|
+
parseInt(validateRecords[i].ganttProperties.predecessor[k].from)) {
|
|
29057
|
+
predName.push(validateRecords[i].ganttProperties.predecessor[k].from);
|
|
29058
|
+
}
|
|
29059
|
+
else {
|
|
29060
|
+
predName.push(validateRecords[i].ganttProperties.predecessor[k].to);
|
|
29061
|
+
}
|
|
29062
|
+
}
|
|
29063
|
+
}
|
|
29064
|
+
for (let j = 0; j < predName.length; j++) {
|
|
29065
|
+
let name = predName[j].replace(/\D/g, '');
|
|
29066
|
+
let toRec = this.parent.currentViewData.filter((data) => {
|
|
29067
|
+
return parseInt(data.ganttProperties.taskId) == parseInt(name);
|
|
29068
|
+
});
|
|
29069
|
+
isValidPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(validateRecords[i], toRec[0]);
|
|
29070
|
+
if (!isValidPredecessor) {
|
|
29071
|
+
this.parent.dataOperation['resetDependency'](validateRecords[i]);
|
|
29072
|
+
this.parent.dataOperation['resetDependency'](toRec[0]);
|
|
29073
|
+
}
|
|
29074
|
+
}
|
|
29075
|
+
}
|
|
29076
|
+
}
|
|
29077
|
+
}
|
|
28467
29078
|
// method to update the edited parent records
|
|
28468
29079
|
for (let j = 0; j < this.updateParentRecords.length; j++) {
|
|
28469
29080
|
this.parent.dataOperation.updateParentItems(this.updateParentRecords[j]);
|
|
@@ -28844,7 +29455,7 @@ class RowDD$1 {
|
|
|
28844
29455
|
}
|
|
28845
29456
|
let idx;
|
|
28846
29457
|
const ganttData = dataSource.length > 0 && this.parent.viewType !== 'ResourceView' ?
|
|
28847
|
-
dataSource : this.parent.
|
|
29458
|
+
dataSource : this.parent.flatData;
|
|
28848
29459
|
for (let i = 0; i < ganttData.length; i++) {
|
|
28849
29460
|
if (this.parent.viewType === 'ResourceView') {
|
|
28850
29461
|
if (ganttData[i].ganttProperties.rowUniqueID === deletedRow.ganttProperties.rowUniqueID) {
|
|
@@ -32165,215 +32776,217 @@ class PdfGanttPredecessor {
|
|
|
32165
32776
|
let childPageData;
|
|
32166
32777
|
let parentY = 0;
|
|
32167
32778
|
let childY = 0;
|
|
32168
|
-
|
|
32169
|
-
|
|
32170
|
-
|
|
32171
|
-
startPage
|
|
32172
|
-
|
|
32173
|
-
|
|
32174
|
-
|
|
32175
|
-
|
|
32176
|
-
if (this.
|
|
32177
|
-
|
|
32779
|
+
if (childTask && parentTask) {
|
|
32780
|
+
switch (this.type) {
|
|
32781
|
+
case 'FS':
|
|
32782
|
+
if (childTask.startPage > -1 && parentTask.endPage > -1) {
|
|
32783
|
+
startPage = pages[parentTask.endPage];
|
|
32784
|
+
endPage = pages[childTask.startPage];
|
|
32785
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
32786
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
32787
|
+
if (this.parentIndex < this.childIndex) {
|
|
32788
|
+
if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
|
|
32789
|
+
predecessorType = 'FSType1';
|
|
32790
|
+
}
|
|
32791
|
+
else {
|
|
32792
|
+
predecessorType = 'FSType2';
|
|
32793
|
+
}
|
|
32178
32794
|
}
|
|
32179
32795
|
else {
|
|
32180
|
-
|
|
32796
|
+
if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
|
|
32797
|
+
predecessorType = 'FSType3';
|
|
32798
|
+
}
|
|
32799
|
+
else {
|
|
32800
|
+
predecessorType = 'FSType4';
|
|
32801
|
+
}
|
|
32181
32802
|
}
|
|
32182
32803
|
}
|
|
32183
32804
|
else {
|
|
32184
|
-
|
|
32185
|
-
predecessorType = 'FSType3';
|
|
32186
|
-
}
|
|
32187
|
-
else {
|
|
32188
|
-
predecessorType = 'FSType4';
|
|
32189
|
-
}
|
|
32805
|
+
return;
|
|
32190
32806
|
}
|
|
32191
|
-
|
|
32192
|
-
|
|
32193
|
-
|
|
32194
|
-
|
|
32195
|
-
|
|
32196
|
-
|
|
32197
|
-
|
|
32198
|
-
|
|
32199
|
-
|
|
32200
|
-
|
|
32201
|
-
|
|
32202
|
-
|
|
32203
|
-
|
|
32204
|
-
|
|
32807
|
+
break;
|
|
32808
|
+
case 'SF':
|
|
32809
|
+
if (childTask.endPage > -1 && parentTask.startPage > -1) {
|
|
32810
|
+
startPage = pages[parentTask.startPage];
|
|
32811
|
+
endPage = pages[childTask.endPage];
|
|
32812
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
32813
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
32814
|
+
if (this.parentIndex < this.childIndex) {
|
|
32815
|
+
if (this.parentLeft > this.childLeft + this.childWidth) {
|
|
32816
|
+
predecessorType = 'SFType1';
|
|
32817
|
+
}
|
|
32818
|
+
else {
|
|
32819
|
+
predecessorType = 'SFType2';
|
|
32820
|
+
}
|
|
32205
32821
|
}
|
|
32206
32822
|
else {
|
|
32207
|
-
|
|
32823
|
+
if (this.parentLeft > this.childLeft + this.childWidth) {
|
|
32824
|
+
predecessorType = 'SFType3';
|
|
32825
|
+
}
|
|
32826
|
+
else {
|
|
32827
|
+
predecessorType = 'SFType4';
|
|
32828
|
+
}
|
|
32208
32829
|
}
|
|
32209
32830
|
}
|
|
32210
32831
|
else {
|
|
32211
|
-
|
|
32212
|
-
predecessorType = 'SFType3';
|
|
32213
|
-
}
|
|
32214
|
-
else {
|
|
32215
|
-
predecessorType = 'SFType4';
|
|
32216
|
-
}
|
|
32832
|
+
return;
|
|
32217
32833
|
}
|
|
32218
|
-
|
|
32219
|
-
|
|
32220
|
-
|
|
32221
|
-
|
|
32222
|
-
|
|
32223
|
-
|
|
32224
|
-
|
|
32225
|
-
|
|
32226
|
-
|
|
32227
|
-
|
|
32228
|
-
|
|
32229
|
-
|
|
32230
|
-
|
|
32231
|
-
|
|
32834
|
+
break;
|
|
32835
|
+
case 'FF':
|
|
32836
|
+
if (childTask.endPage > -1 && parentTask.endPage > -1) {
|
|
32837
|
+
startPage = pages[parentTask.endPage];
|
|
32838
|
+
endPage = pages[childTask.endPage];
|
|
32839
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
32840
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.endPage - pdfGantt.chartPageIndex];
|
|
32841
|
+
if (this.parentIndex < this.childIndex) {
|
|
32842
|
+
if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
|
|
32843
|
+
predecessorType = 'FFType1';
|
|
32844
|
+
}
|
|
32845
|
+
else {
|
|
32846
|
+
predecessorType = 'FFType2';
|
|
32847
|
+
}
|
|
32232
32848
|
}
|
|
32233
32849
|
else {
|
|
32234
|
-
|
|
32850
|
+
if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
|
|
32851
|
+
predecessorType = 'FFType3';
|
|
32852
|
+
}
|
|
32853
|
+
else {
|
|
32854
|
+
predecessorType = 'FFType4';
|
|
32855
|
+
}
|
|
32235
32856
|
}
|
|
32236
32857
|
}
|
|
32237
32858
|
else {
|
|
32238
|
-
|
|
32239
|
-
predecessorType = 'FFType3';
|
|
32240
|
-
}
|
|
32241
|
-
else {
|
|
32242
|
-
predecessorType = 'FFType4';
|
|
32243
|
-
}
|
|
32859
|
+
return;
|
|
32244
32860
|
}
|
|
32245
|
-
|
|
32246
|
-
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
|
|
32250
|
-
|
|
32251
|
-
|
|
32252
|
-
|
|
32253
|
-
|
|
32254
|
-
|
|
32255
|
-
|
|
32256
|
-
|
|
32257
|
-
|
|
32258
|
-
|
|
32861
|
+
break;
|
|
32862
|
+
case 'SS':
|
|
32863
|
+
if (childTask.startPage > -1 && parentTask.startPage > -1) {
|
|
32864
|
+
startPage = pages[parentTask.startPage];
|
|
32865
|
+
endPage = pages[childTask.startPage];
|
|
32866
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.startPage - pdfGantt.chartPageIndex];
|
|
32867
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
32868
|
+
if (this.parentIndex < this.childIndex) {
|
|
32869
|
+
if (this.parentLeft >= this.childLeft) {
|
|
32870
|
+
predecessorType = 'SSType1';
|
|
32871
|
+
}
|
|
32872
|
+
else {
|
|
32873
|
+
predecessorType = 'SSType2';
|
|
32874
|
+
}
|
|
32259
32875
|
}
|
|
32260
32876
|
else {
|
|
32261
|
-
|
|
32877
|
+
if (this.parentLeft >= this.childLeft) {
|
|
32878
|
+
predecessorType = 'SSType3';
|
|
32879
|
+
}
|
|
32880
|
+
else {
|
|
32881
|
+
predecessorType = 'SSType4';
|
|
32882
|
+
}
|
|
32262
32883
|
}
|
|
32263
32884
|
}
|
|
32264
32885
|
else {
|
|
32265
|
-
|
|
32266
|
-
predecessorType = 'SSType3';
|
|
32267
|
-
}
|
|
32268
|
-
else {
|
|
32269
|
-
predecessorType = 'SSType4';
|
|
32270
|
-
}
|
|
32886
|
+
return;
|
|
32271
32887
|
}
|
|
32272
|
-
|
|
32273
|
-
|
|
32274
|
-
|
|
32275
|
-
|
|
32276
|
-
|
|
32277
|
-
|
|
32278
|
-
|
|
32279
|
-
|
|
32280
|
-
|
|
32281
|
-
|
|
32282
|
-
|
|
32283
|
-
|
|
32284
|
-
|
|
32285
|
-
|
|
32286
|
-
|
|
32287
|
-
|
|
32288
|
-
|
|
32289
|
-
|
|
32290
|
-
|
|
32291
|
-
|
|
32292
|
-
|
|
32293
|
-
|
|
32294
|
-
|
|
32295
|
-
|
|
32296
|
-
|
|
32297
|
-
|
|
32298
|
-
|
|
32299
|
-
|
|
32300
|
-
|
|
32301
|
-
|
|
32302
|
-
|
|
32303
|
-
|
|
32304
|
-
|
|
32305
|
-
|
|
32306
|
-
|
|
32307
|
-
|
|
32308
|
-
|
|
32309
|
-
|
|
32310
|
-
|
|
32311
|
-
|
|
32312
|
-
|
|
32313
|
-
|
|
32314
|
-
|
|
32315
|
-
|
|
32316
|
-
|
|
32317
|
-
|
|
32318
|
-
|
|
32319
|
-
|
|
32320
|
-
|
|
32321
|
-
|
|
32322
|
-
|
|
32323
|
-
|
|
32324
|
-
|
|
32325
|
-
|
|
32326
|
-
|
|
32327
|
-
|
|
32328
|
-
|
|
32329
|
-
|
|
32330
|
-
|
|
32331
|
-
|
|
32332
|
-
|
|
32333
|
-
|
|
32334
|
-
|
|
32335
|
-
|
|
32336
|
-
|
|
32337
|
-
|
|
32338
|
-
|
|
32339
|
-
|
|
32340
|
-
|
|
32341
|
-
|
|
32342
|
-
|
|
32343
|
-
|
|
32344
|
-
|
|
32345
|
-
|
|
32346
|
-
|
|
32347
|
-
|
|
32348
|
-
|
|
32349
|
-
|
|
32350
|
-
|
|
32351
|
-
|
|
32352
|
-
|
|
32353
|
-
|
|
32354
|
-
|
|
32355
|
-
|
|
32356
|
-
|
|
32357
|
-
|
|
32358
|
-
|
|
32359
|
-
|
|
32360
|
-
|
|
32361
|
-
|
|
32362
|
-
|
|
32363
|
-
|
|
32364
|
-
|
|
32365
|
-
|
|
32366
|
-
|
|
32367
|
-
|
|
32368
|
-
|
|
32369
|
-
|
|
32370
|
-
|
|
32371
|
-
|
|
32372
|
-
|
|
32373
|
-
|
|
32374
|
-
point6 = sspoint4;
|
|
32375
|
-
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32376
|
-
break;
|
|
32888
|
+
break;
|
|
32889
|
+
}
|
|
32890
|
+
let midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
|
|
32891
|
+
midPoint = pixelToPoint(midPoint);
|
|
32892
|
+
/* eslint-disable-next-line */
|
|
32893
|
+
let point1, point2, point3, point4, point5, point6;
|
|
32894
|
+
point1 = point2 = point3 = point4 = point5 = point6 = new PointF();
|
|
32895
|
+
const parentTaskpoint = Object.assign({}, parentTask.taskStartPoint);
|
|
32896
|
+
const childTaskpoint = Object.assign({}, childTask.taskStartPoint);
|
|
32897
|
+
parentY = parentTaskpoint.y + parentPageData.startPoint.y;
|
|
32898
|
+
childY = childTaskpoint.y + childPageData.startPoint.y;
|
|
32899
|
+
const ffpoint1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth), parentY + midPoint);
|
|
32900
|
+
const sspoint1 = new PointF(pixelToPoint(this.parentLeft) - 1, parentY + midPoint);
|
|
32901
|
+
const ffpoint3 = new PointF(pixelToPoint(this.childLeft - 20), childY + midPoint);
|
|
32902
|
+
const ffpoint4 = new PointF(pixelToPoint(this.childLeft - 6 - this.lineWidth) - 1, childY + midPoint);
|
|
32903
|
+
const sspoint4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 6 + this.lineWidth) + 1, childY + midPoint);
|
|
32904
|
+
switch (predecessorType) {
|
|
32905
|
+
case 'FSType1':
|
|
32906
|
+
case 'FSType3':
|
|
32907
|
+
point1 = ffpoint1;
|
|
32908
|
+
point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
|
|
32909
|
+
point3 = ffpoint3;
|
|
32910
|
+
point4 = ffpoint4;
|
|
32911
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32912
|
+
break;
|
|
32913
|
+
case 'FSType2':
|
|
32914
|
+
point1 = ffpoint1;
|
|
32915
|
+
point2 = new PointF(point1.x + 10, parentY + midPoint);
|
|
32916
|
+
point3 = new PointF(point1.x + 10, childY + 2);
|
|
32917
|
+
point4 = new PointF(pixelToPoint(this.childLeft - 20), childY + 2);
|
|
32918
|
+
point5 = ffpoint3;
|
|
32919
|
+
point6 = ffpoint4;
|
|
32920
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32921
|
+
break;
|
|
32922
|
+
case 'FSType4':
|
|
32923
|
+
point1 = ffpoint1;
|
|
32924
|
+
point2 = new PointF(point1.x + 10, parentY + midPoint);
|
|
32925
|
+
point3 = new PointF(point1.x + 10, parentY + 2);
|
|
32926
|
+
point4 = new PointF(pixelToPoint(this.childLeft - 20), parentY + 2);
|
|
32927
|
+
point5 = ffpoint3;
|
|
32928
|
+
point6 = ffpoint4;
|
|
32929
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32930
|
+
break;
|
|
32931
|
+
case 'FFType1':
|
|
32932
|
+
case 'FFType3':
|
|
32933
|
+
point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
|
|
32934
|
+
point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
|
|
32935
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32936
|
+
point4 = sspoint4;
|
|
32937
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32938
|
+
break;
|
|
32939
|
+
case 'FFType2':
|
|
32940
|
+
case 'FFType4':
|
|
32941
|
+
point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
|
|
32942
|
+
point2 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth + 20), parentY + midPoint);
|
|
32943
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32944
|
+
point4 = sspoint4;
|
|
32945
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32946
|
+
break;
|
|
32947
|
+
case 'SSType1':
|
|
32948
|
+
case 'SSType3':
|
|
32949
|
+
point1 = sspoint1;
|
|
32950
|
+
point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
|
|
32951
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32952
|
+
point4 = ffpoint4;
|
|
32953
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32954
|
+
break;
|
|
32955
|
+
case 'SSType2':
|
|
32956
|
+
case 'SSType4':
|
|
32957
|
+
point1 = sspoint1;
|
|
32958
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
32959
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32960
|
+
point4 = ffpoint4;
|
|
32961
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32962
|
+
break;
|
|
32963
|
+
case 'SFType1':
|
|
32964
|
+
case 'SFType3':
|
|
32965
|
+
point1 = sspoint1;
|
|
32966
|
+
point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
|
|
32967
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32968
|
+
point4 = sspoint4;
|
|
32969
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32970
|
+
break;
|
|
32971
|
+
case 'SFType2':
|
|
32972
|
+
point1 = sspoint1;
|
|
32973
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
32974
|
+
point3 = new PointF(point2.x, childY + 2);
|
|
32975
|
+
point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), childY + 2);
|
|
32976
|
+
point5 = new PointF(point4.x, childY + midPoint);
|
|
32977
|
+
point6 = sspoint4;
|
|
32978
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32979
|
+
break;
|
|
32980
|
+
case 'SFType4':
|
|
32981
|
+
point1 = sspoint1;
|
|
32982
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
32983
|
+
point3 = new PointF(point2.x, parentY + 2);
|
|
32984
|
+
point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + 2);
|
|
32985
|
+
point5 = new PointF(point4.x, childY + midPoint);
|
|
32986
|
+
point6 = sspoint4;
|
|
32987
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32988
|
+
break;
|
|
32989
|
+
}
|
|
32377
32990
|
}
|
|
32378
32991
|
}
|
|
32379
32992
|
/**
|