@syncfusion/ej2-gantt 20.2.49 → 20.3.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/ej2-gantt.min.js +10 -0
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +970 -379
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1019 -413
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +19 -19
- package/src/gantt/actions/cell-edit.js +1 -2
- package/src/gantt/actions/connector-line-edit.d.ts +2 -0
- package/src/gantt/actions/connector-line-edit.js +104 -10
- package/src/gantt/actions/context-menu.js +6 -1
- package/src/gantt/actions/critical-path.d.ts +1 -1
- package/src/gantt/actions/critical-path.js +105 -30
- package/src/gantt/actions/dependency.d.ts +2 -0
- package/src/gantt/actions/dependency.js +68 -12
- package/src/gantt/actions/dialog-edit.d.ts +3 -0
- package/src/gantt/actions/dialog-edit.js +130 -15
- package/src/gantt/actions/edit.js +101 -26
- package/src/gantt/actions/filter.d.ts +3 -1
- package/src/gantt/actions/filter.js +32 -44
- package/src/gantt/actions/keyboard.js +1 -1
- package/src/gantt/actions/rowdragdrop.js +68 -8
- package/src/gantt/actions/taskbar-edit.js +15 -3
- package/src/gantt/actions/toolbar.js +1 -1
- package/src/gantt/base/enum.d.ts +3 -1
- package/src/gantt/base/gantt-chart.js +8 -6
- package/src/gantt/base/gantt.d.ts +6 -6
- package/src/gantt/base/gantt.js +10 -3
- package/src/gantt/base/interface.d.ts +4 -0
- package/src/gantt/base/splitter.d.ts +2 -2
- package/src/gantt/base/splitter.js +6 -7
- package/src/gantt/base/task-processor.js +13 -7
- package/src/gantt/base/tree-grid.js +21 -2
- package/src/gantt/export/pdf-connector-line.js +187 -185
- package/src/gantt/models/edit-settings-model.d.ts +2 -2
- package/src/gantt/models/edit-settings.d.ts +2 -2
- package/src/gantt/models/filter-settings-model.d.ts +1 -1
- package/src/gantt/models/filter-settings.d.ts +1 -1
- package/src/gantt/renderer/chart-rows.d.ts +1 -0
- package/src/gantt/renderer/chart-rows.js +47 -16
- package/src/gantt/renderer/connector-line.js +101 -33
- package/src/gantt/renderer/event-marker.js +1 -1
- package/src/gantt/renderer/nonworking-day.js +0 -1
- package/src/gantt/renderer/tooltip.js +2 -1
- package/styles/bootstrap-dark.css +115 -62
- package/styles/bootstrap.css +115 -62
- package/styles/bootstrap4.css +115 -62
- package/styles/bootstrap5-dark.css +119 -63
- package/styles/bootstrap5.css +119 -63
- package/styles/fabric-dark.css +115 -62
- package/styles/fabric.css +115 -62
- package/styles/fluent-dark.css +126 -66
- package/styles/fluent.css +124 -64
- package/styles/gantt/_all.scss +1 -1
- package/styles/gantt/_bootstrap-dark-definition.scss +4 -1
- package/styles/gantt/_bootstrap-definition.scss +4 -1
- package/styles/gantt/_bootstrap4-definition.scss +4 -1
- package/styles/gantt/_bootstrap5-definition.scss +4 -2
- package/styles/gantt/_fabric-dark-definition.scss +4 -1
- package/styles/gantt/_fabric-definition.scss +4 -1
- package/styles/gantt/_fluent-definition.scss +6 -4
- package/styles/gantt/_fusionnew-definition.scss +12 -10
- package/styles/gantt/_highcontrast-definition.scss +4 -1
- package/styles/gantt/_highcontrast-light-definition.scss +4 -1
- package/styles/gantt/_layout.scss +143 -51
- package/styles/gantt/_material-dark-definition.scss +4 -1
- package/styles/gantt/_material-definition.scss +4 -1
- package/styles/gantt/_material3-definition.scss +13 -11
- package/styles/gantt/_tailwind-definition.scss +4 -2
- package/styles/gantt/_theme.scss +29 -29
- package/styles/gantt/bootstrap-dark.css +115 -62
- package/styles/gantt/bootstrap.css +115 -62
- package/styles/gantt/bootstrap4.css +115 -62
- package/styles/gantt/bootstrap5-dark.css +119 -63
- package/styles/gantt/bootstrap5.css +119 -63
- package/styles/gantt/fabric-dark.css +115 -62
- package/styles/gantt/fabric.css +115 -62
- package/styles/gantt/fluent-dark.css +126 -66
- package/styles/gantt/fluent.css +124 -64
- package/styles/gantt/highcontrast-light.css +120 -62
- package/styles/gantt/highcontrast.css +120 -62
- package/styles/gantt/material-dark.css +120 -65
- package/styles/gantt/material.css +118 -65
- package/styles/gantt/tailwind-dark.css +117 -64
- package/styles/gantt/tailwind.css +117 -64
- package/styles/highcontrast-light.css +120 -62
- package/styles/highcontrast.css +120 -62
- package/styles/material-dark.css +120 -65
- package/styles/material.css +118 -65
- package/styles/tailwind-dark.css +117 -64
- package/styles/tailwind.css +117 -64
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, addClass, append, classList, closest, compile, createElement, deleteObject, extend, formatUnit, getValue, isNullOrUndefined, isObject, isObjectArray, isUndefined, merge, remove, removeClass, setValue } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Dialog, Tooltip, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
|
3
|
-
import { Edit, ForeignKey, Grid, Page, Predicate, Toolbar, ValueFormatter, click, filterAfterOpen, getActualProperties, getCustomDateFormat,
|
|
3
|
+
import { Edit, ForeignKey, Grid, Page, Predicate, Toolbar, ValueFormatter, click, filterAfterOpen, getActualProperties, getCustomDateFormat, getForeignData, getObject, getUid, parentsUntil, setCssInGridPopUp } from '@syncfusion/ej2-grids';
|
|
4
4
|
import { CacheAdaptor, DataManager, DataUtil, Deferred, ODataAdaptor, ODataV4Adaptor, Query, RemoteSaveAdaptor, UrlAdaptor, WebApiAdaptor, WebMethodAdaptor } from '@syncfusion/ej2-data';
|
|
5
5
|
import { ColumnMenu, ContextMenu, Edit as Edit$1, ExcelExport, Filter, Reorder, Resize, RowDD, Selection, Sort, TreeGrid, VirtualScroll } from '@syncfusion/ej2-treegrid';
|
|
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
|
|
@@ -7437,11 +7445,30 @@ class GanttTreeGrid {
|
|
|
7437
7445
|
*/
|
|
7438
7446
|
composeIDColumn(column) {
|
|
7439
7447
|
const isProjectView = this.parent.viewType === 'ProjectView';
|
|
7448
|
+
let lengthDataSource = this.parent.dataSource['length'];
|
|
7449
|
+
let taskIDName;
|
|
7440
7450
|
column.isPrimaryKey = isProjectView ? true : false;
|
|
7441
7451
|
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
|
|
7442
7452
|
column.width = column.width ? column.width : 100;
|
|
7443
|
-
|
|
7444
|
-
|
|
7453
|
+
for (let i = 0; i < lengthDataSource; i++) {
|
|
7454
|
+
if (!isNullOrUndefined(this.parent.dataSource[i][this.parent.taskFields.id])) {
|
|
7455
|
+
taskIDName = this.parent.dataSource[i][this.parent.taskFields.id];
|
|
7456
|
+
break;
|
|
7457
|
+
}
|
|
7458
|
+
}
|
|
7459
|
+
if (typeof (taskIDName) === "string") {
|
|
7460
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
7461
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7462
|
+
}
|
|
7463
|
+
else {
|
|
7464
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : true;
|
|
7465
|
+
}
|
|
7466
|
+
column.editType = column.editType ? column.editType : 'stringedit';
|
|
7467
|
+
}
|
|
7468
|
+
else {
|
|
7469
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7470
|
+
column.editType = column.editType ? column.editType : 'numericedit';
|
|
7471
|
+
}
|
|
7445
7472
|
column.valueAccessor = isProjectView ? null : this.idValueAccessor.bind(this);
|
|
7446
7473
|
}
|
|
7447
7474
|
composeUniqueIDColumn(column) {
|
|
@@ -8120,7 +8147,7 @@ class ChartRows extends DateProcessor {
|
|
|
8120
8147
|
* @private
|
|
8121
8148
|
*/
|
|
8122
8149
|
getIndicatorNode(indicator) {
|
|
8123
|
-
const templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"
|
|
8150
|
+
const templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"style="line-height:'
|
|
8124
8151
|
+ (this.parent.rowHeight) + 'px;' +
|
|
8125
8152
|
'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
|
|
8126
8153
|
return this.createDivElement(templateString);
|
|
@@ -8636,7 +8663,7 @@ class ChartRows extends DateProcessor {
|
|
|
8636
8663
|
*/
|
|
8637
8664
|
getTaskBaselineNode() {
|
|
8638
8665
|
const data = this.templateData;
|
|
8639
|
-
const template = '<div class="' + baselineBar + ' ' + '" role="
|
|
8666
|
+
const template = '<div class="' + baselineBar + ' ' + '" role="term" style="margin-top:' + this.baselineTop +
|
|
8640
8667
|
'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
|
|
8641
8668
|
'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
|
|
8642
8669
|
this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
|
|
@@ -8889,10 +8916,10 @@ class ChartRows extends DateProcessor {
|
|
|
8889
8916
|
const className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
|
|
8890
8917
|
'e-chart-row-border' : '';
|
|
8891
8918
|
table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + '"' +
|
|
8892
|
-
'
|
|
8919
|
+
'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
8893
8920
|
this.parent.rowHeight + 'px;">' +
|
|
8894
8921
|
'<td class="' + chartRowCell + ' ' + className
|
|
8895
|
-
+ '"
|
|
8922
|
+
+ '"style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
|
|
8896
8923
|
return table.childNodes;
|
|
8897
8924
|
}
|
|
8898
8925
|
/**
|
|
@@ -8957,7 +8984,7 @@ class ChartRows extends DateProcessor {
|
|
|
8957
8984
|
}
|
|
8958
8985
|
leftLabelContainer() {
|
|
8959
8986
|
const template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
|
|
8960
|
-
leftLabelContainer) + ' ' + '" tabindex="-1" role="
|
|
8987
|
+
leftLabelContainer) + ' ' + '" tabindex="-1" role="term" style="height:' +
|
|
8961
8988
|
(this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
|
|
8962
8989
|
return this.createDivElement(template);
|
|
8963
8990
|
}
|
|
@@ -8969,7 +8996,7 @@ class ChartRows extends DateProcessor {
|
|
|
8969
8996
|
const template = '<div class="' + taskBarMainContainer + ' ' +
|
|
8970
8997
|
this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
|
|
8971
8998
|
((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
|
|
8972
|
-
' tabindex="-1" role="
|
|
8999
|
+
' tabindex="-1" role="term" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
|
|
8973
9000
|
('width:' + this.milestoneHeight + 'px;height:' +
|
|
8974
9001
|
this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
|
|
8975
9002
|
(this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
|
|
@@ -8980,26 +9007,26 @@ class ChartRows extends DateProcessor {
|
|
|
8980
9007
|
}
|
|
8981
9008
|
rightLabelContainer() {
|
|
8982
9009
|
const template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
|
|
8983
|
-
rightLabelContainer) + '" ' + ' tabindex="-1" role="
|
|
9010
|
+
rightLabelContainer) + '" ' + ' tabindex="-1" role="term" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
|
|
8984
9011
|
+ (this.parent.rowHeight - 2) + 'px;"></div>';
|
|
8985
9012
|
return this.createDivElement(template);
|
|
8986
9013
|
}
|
|
8987
9014
|
childTaskbarLeftResizer() {
|
|
8988
9015
|
const lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
|
|
8989
9016
|
const template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
|
|
8990
|
-
'
|
|
9017
|
+
'style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
8991
9018
|
return this.createDivElement(template);
|
|
8992
9019
|
}
|
|
8993
9020
|
childTaskbarRightResizer() {
|
|
8994
9021
|
const rResizerLeft = this.parent.isAdaptive ? -2 : -10;
|
|
8995
9022
|
const template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
|
|
8996
|
-
'
|
|
9023
|
+
'style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
8997
9024
|
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
8998
9025
|
return this.createDivElement(template);
|
|
8999
9026
|
}
|
|
9000
9027
|
childTaskbarProgressResizer() {
|
|
9001
9028
|
const template = '<div class="' + childProgressResizer + '"' +
|
|
9002
|
-
'
|
|
9029
|
+
'style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
|
|
9003
9030
|
(this.taskBarHeight - 4) + 'px;"><div class="' + progressBarHandler + '"' +
|
|
9004
9031
|
'><div class="' + progressHandlerElement + '"></div>' +
|
|
9005
9032
|
'<div class="' + progressBarHandlerAfter + '"></div></div>';
|
|
@@ -9010,9 +9037,16 @@ class ChartRows extends DateProcessor {
|
|
|
9010
9037
|
const pointerLeft = -((this.parent.isAdaptive ? 14 : 2) + this.connectorPointWidth);
|
|
9011
9038
|
const mileStoneLeft = -(this.connectorPointWidth + 2);
|
|
9012
9039
|
const pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9040
|
+
let marginTop;
|
|
9041
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9042
|
+
marginTop = '';
|
|
9043
|
+
}
|
|
9044
|
+
else {
|
|
9045
|
+
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
9046
|
+
}
|
|
9013
9047
|
const template = '<div class="' + leftConnectorPointOuterDiv + '" style="' +
|
|
9014
9048
|
((data.ganttProperties.isMilestone) ? ('margin-top:' + pointerTop + 'px;left:' + mileStoneLeft +
|
|
9015
|
-
'px;') : (
|
|
9049
|
+
'px;') : (marginTop + ';left:' + pointerLeft + 'px;')) + '">' +
|
|
9016
9050
|
'<div class="' + connectorPointLeft + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
9017
9051
|
'" style="width: ' + this.connectorPointWidth + 'px;' +
|
|
9018
9052
|
'height: ' + this.connectorPointWidth + 'px;">' + this.touchLeftConnectorpoint + '</div></div>';
|
|
@@ -9022,10 +9056,16 @@ class ChartRows extends DateProcessor {
|
|
|
9022
9056
|
const data = this.templateData;
|
|
9023
9057
|
const pointerRight = this.parent.isAdaptive ? 10 : -2;
|
|
9024
9058
|
const pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9059
|
+
let marginTop;
|
|
9060
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9061
|
+
marginTop = '';
|
|
9062
|
+
}
|
|
9063
|
+
else {
|
|
9064
|
+
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
9065
|
+
}
|
|
9025
9066
|
const template = '<div class="' + rightConnectorPointOuterDiv + '" style="' +
|
|
9026
9067
|
((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
|
|
9027
|
-
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;
|
|
9028
|
-
this.connectorPointMargin + 'px;')) + '">' +
|
|
9068
|
+
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
|
|
9029
9069
|
'<div class="' + connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
9030
9070
|
'" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
|
|
9031
9071
|
this.touchRightConnectorpoint + '</div></div>';
|
|
@@ -9325,14 +9365,17 @@ class ChartRows extends DateProcessor {
|
|
|
9325
9365
|
const taskbarContainerNode = this.taskbarContainer();
|
|
9326
9366
|
taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
|
|
9327
9367
|
taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
|
|
9328
|
-
|
|
9329
|
-
|
|
9368
|
+
const connectorLineLeftNode = this.getLeftPointNode();
|
|
9369
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
9330
9370
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9331
9371
|
}
|
|
9332
9372
|
if (this.templateData.hasChildRecords) {
|
|
9333
9373
|
const parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
|
|
9334
9374
|
if (!this.templateData.ganttProperties.isAutoSchedule) {
|
|
9335
9375
|
const manualTaskbar = this.getManualTaskbar();
|
|
9376
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9377
|
+
const connectorLineRightNode = this.getRightPointNode();
|
|
9378
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9336
9379
|
taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
|
|
9337
9380
|
}
|
|
9338
9381
|
if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
|
|
@@ -9407,7 +9450,7 @@ class ChartRows extends DateProcessor {
|
|
|
9407
9450
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
9408
9451
|
}
|
|
9409
9452
|
}
|
|
9410
|
-
if (!this.templateData.hasChildRecords) {
|
|
9453
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
9411
9454
|
const connectorLineRightNode = this.getRightPointNode();
|
|
9412
9455
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9413
9456
|
}
|
|
@@ -9809,6 +9852,21 @@ class ChartRows extends DateProcessor {
|
|
|
9809
9852
|
}
|
|
9810
9853
|
return defaultValue;
|
|
9811
9854
|
}
|
|
9855
|
+
generateBaselineAriaLabel(data) {
|
|
9856
|
+
data = this.templateData;
|
|
9857
|
+
let defaultValue = '';
|
|
9858
|
+
const nameConstant = this.parent.localeObj.getConstant('name');
|
|
9859
|
+
const startDateConstant = this.parent.localeObj.getConstant('startDate');
|
|
9860
|
+
const endDateConstant = this.parent.localeObj.getConstant('endDate');
|
|
9861
|
+
const taskNameVal = data.ganttProperties.taskName;
|
|
9862
|
+
const startDateVal = data.ganttProperties.baselineStartDate;
|
|
9863
|
+
const endDateVal = data.ganttProperties.baselineEndDate;
|
|
9864
|
+
defaultValue += 'Baseline' + ' ';
|
|
9865
|
+
defaultValue += nameConstant + ' ' + taskNameVal + ' ';
|
|
9866
|
+
defaultValue += startDateConstant + ' ' + this.parent.getFormatedDate(startDateVal) + ' ';
|
|
9867
|
+
defaultValue += endDateConstant + ' ' + this.parent.getFormatedDate(endDateVal) + ' ';
|
|
9868
|
+
return defaultValue;
|
|
9869
|
+
}
|
|
9812
9870
|
generateSpiltTaskAriaLabel(data, ganttProp) {
|
|
9813
9871
|
let defaultValue = '';
|
|
9814
9872
|
const startDateConstant = this.parent.localeObj.getConstant('startDate');
|
|
@@ -9847,6 +9905,7 @@ class Dependency {
|
|
|
9847
9905
|
constructor(gantt) {
|
|
9848
9906
|
this.parentRecord = [];
|
|
9849
9907
|
this.parentIds = [];
|
|
9908
|
+
this.parentPredecessors = [];
|
|
9850
9909
|
this.parent = gantt;
|
|
9851
9910
|
this.dateValidateModule = this.parent.dateValidationModule;
|
|
9852
9911
|
}
|
|
@@ -9862,9 +9921,7 @@ class Dependency {
|
|
|
9862
9921
|
for (let count = length; count >= 0; count--) {
|
|
9863
9922
|
const ganttData = predecessorTasks[count];
|
|
9864
9923
|
const ganttProp = ganttData.ganttProperties;
|
|
9865
|
-
|
|
9866
|
-
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
9867
|
-
}
|
|
9924
|
+
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
9868
9925
|
}
|
|
9869
9926
|
}
|
|
9870
9927
|
/**
|
|
@@ -9973,8 +10030,29 @@ class Dependency {
|
|
|
9973
10030
|
values = el.split('-');
|
|
9974
10031
|
offsetValue = '-';
|
|
9975
10032
|
}
|
|
9976
|
-
match =
|
|
10033
|
+
match = [];
|
|
9977
10034
|
const ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
10035
|
+
const isExist1 = this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + values[0]) : ids.indexOf(values[0]);
|
|
10036
|
+
if (isExist1 !== -1) {
|
|
10037
|
+
match[0] = values[0];
|
|
10038
|
+
}
|
|
10039
|
+
else {
|
|
10040
|
+
if (ids.indexOf(values[0]) === -1) {
|
|
10041
|
+
match = values[0].split(" ");
|
|
10042
|
+
if (match.length === 1) {
|
|
10043
|
+
if (match[0].indexOf(" ") != -1) {
|
|
10044
|
+
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
10045
|
+
}
|
|
10046
|
+
else {
|
|
10047
|
+
match[0] = values[0].slice(0, -2);
|
|
10048
|
+
match[1] = values[0].slice(-2);
|
|
10049
|
+
}
|
|
10050
|
+
}
|
|
10051
|
+
}
|
|
10052
|
+
else {
|
|
10053
|
+
match[0] = values[0];
|
|
10054
|
+
}
|
|
10055
|
+
}
|
|
9978
10056
|
const isExist = this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + match[0]) : ids.indexOf(match[0]);
|
|
9979
10057
|
/*Validate for appropriate predecessor*/
|
|
9980
10058
|
if (match[0] && isExist !== -1) {
|
|
@@ -10005,10 +10083,18 @@ class Dependency {
|
|
|
10005
10083
|
offsetUnit: offsetUnits.durationUnit,
|
|
10006
10084
|
offset: offsetUnits.duration
|
|
10007
10085
|
};
|
|
10008
|
-
|
|
10009
|
-
|
|
10086
|
+
let fromData = this.parent.connectorLineModule.getRecordByID(obj.to);
|
|
10087
|
+
let toData = this.parent.connectorLineModule.getRecordByID(obj.from);
|
|
10088
|
+
let isValid;
|
|
10089
|
+
if (this.parent.connectorLineEditModule && toData && fromData) {
|
|
10090
|
+
isValid = this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
|
|
10091
|
+
if (isValid)
|
|
10092
|
+
collection.push(obj);
|
|
10093
|
+
}
|
|
10094
|
+
else {
|
|
10010
10095
|
collection.push(obj);
|
|
10011
10096
|
}
|
|
10097
|
+
match.splice(0);
|
|
10012
10098
|
});
|
|
10013
10099
|
return collection;
|
|
10014
10100
|
}
|
|
@@ -10023,6 +10109,9 @@ class Dependency {
|
|
|
10023
10109
|
const predecessors = data.ganttProperties.predecessor;
|
|
10024
10110
|
const durationUnitTexts = this.parent.durationUnitTexts;
|
|
10025
10111
|
let resultString = '';
|
|
10112
|
+
let temp1;
|
|
10113
|
+
let match;
|
|
10114
|
+
match = [];
|
|
10026
10115
|
if (predecessors) {
|
|
10027
10116
|
const length = predecessors.length;
|
|
10028
10117
|
for (let i = 0; i < length; i++) {
|
|
@@ -10032,6 +10121,15 @@ class Dependency {
|
|
|
10032
10121
|
: data.ganttProperties.rowUniqueID;
|
|
10033
10122
|
if (currentValue.from !== id.toString()) {
|
|
10034
10123
|
temp = currentValue.from + currentValue.type;
|
|
10124
|
+
if (typeof (data.ganttProperties.taskId) === "string") {
|
|
10125
|
+
match[0] = temp.slice(0, -2);
|
|
10126
|
+
match[1] = temp.slice(-2);
|
|
10127
|
+
temp1 = match[0] + " " + match[1];
|
|
10128
|
+
}
|
|
10129
|
+
else {
|
|
10130
|
+
temp1 = temp;
|
|
10131
|
+
}
|
|
10132
|
+
temp = temp1;
|
|
10035
10133
|
if (currentValue.offset !== 0) {
|
|
10036
10134
|
temp += currentValue.offset > 0 ? ('+' + currentValue.offset + ' ') : (currentValue.offset + ' ');
|
|
10037
10135
|
const multiple = currentValue.offset !== 1;
|
|
@@ -10119,9 +10217,7 @@ class Dependency {
|
|
|
10119
10217
|
const length = predecessorsCollection.length;
|
|
10120
10218
|
for (let count = 0; count < length; count++) {
|
|
10121
10219
|
ganttRecord = predecessorsCollection[count];
|
|
10122
|
-
|
|
10123
|
-
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
10124
|
-
}
|
|
10220
|
+
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
10125
10221
|
}
|
|
10126
10222
|
}
|
|
10127
10223
|
/**
|
|
@@ -10171,9 +10267,22 @@ class Dependency {
|
|
|
10171
10267
|
*/
|
|
10172
10268
|
updatedRecordsDateByPredecessor() {
|
|
10173
10269
|
const flatData = this.parent.flatData;
|
|
10174
|
-
|
|
10270
|
+
const totLength = this.parent.flatData.length;
|
|
10271
|
+
for (let count = 0; count < totLength; count++) {
|
|
10175
10272
|
if (flatData[count].ganttProperties.predecessor) {
|
|
10176
10273
|
this.validatePredecessorDates(flatData[count]);
|
|
10274
|
+
if (flatData[count].hasChildRecords && this.parent.editModule) {
|
|
10275
|
+
this.parent.editModule['updateChildItems'](flatData[count]);
|
|
10276
|
+
}
|
|
10277
|
+
}
|
|
10278
|
+
}
|
|
10279
|
+
}
|
|
10280
|
+
updateParentPredecessor() {
|
|
10281
|
+
if (this.parent.enablePredecessorValidation) {
|
|
10282
|
+
const parentPredecessorLength = this.parentPredecessors.length;
|
|
10283
|
+
for (let i = parentPredecessorLength - 1; i >= 0; i--) {
|
|
10284
|
+
let item = this.parentPredecessors[i];
|
|
10285
|
+
this.validatePredecessorDates(item);
|
|
10177
10286
|
}
|
|
10178
10287
|
}
|
|
10179
10288
|
}
|
|
@@ -10204,6 +10313,10 @@ class Dependency {
|
|
|
10204
10313
|
const predecessor = predecessors[count];
|
|
10205
10314
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor.from);
|
|
10206
10315
|
record = this.parent.connectorLineModule.getRecordByID(predecessor.to);
|
|
10316
|
+
if (this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
|
|
10317
|
+
&& (ganttRecord.hasChildRecords || record.hasChildRecords)) {
|
|
10318
|
+
this.parentPredecessors.push(ganttRecord);
|
|
10319
|
+
}
|
|
10207
10320
|
if (record.ganttProperties.isAutoSchedule || this.parent.validateManualTasksOnLinking) {
|
|
10208
10321
|
this.validateChildGanttRecord(parentGanttRecord, record);
|
|
10209
10322
|
}
|
|
@@ -10244,8 +10357,8 @@ class Dependency {
|
|
|
10244
10357
|
this.dateValidateModule.calculateEndDate(childGanttRecord);
|
|
10245
10358
|
}
|
|
10246
10359
|
this.parent.dataOperation.updateWidthLeft(childGanttRecord);
|
|
10247
|
-
if (childGanttRecord.parentItem && this.parent.
|
|
10248
|
-
|
|
10360
|
+
if (!this.parent.isLoad && childGanttRecord.parentItem && this.parent.isInPredecessorValidation &&
|
|
10361
|
+
this.parent.getParentTask(childGanttRecord.parentItem).ganttProperties.isAutoSchedule) {
|
|
10249
10362
|
if (this.parentIds.indexOf(childGanttRecord.parentItem.uniqueID) === -1) {
|
|
10250
10363
|
this.parentIds.push(childGanttRecord.parentItem.uniqueID);
|
|
10251
10364
|
this.parentRecord.push(childGanttRecord.parentItem);
|
|
@@ -10599,8 +10712,19 @@ class ConnectorLine {
|
|
|
10599
10712
|
*/
|
|
10600
10713
|
createConnectorLineObject(parentGanttData, childGanttData, predecessor) {
|
|
10601
10714
|
const connectorObj = {};
|
|
10602
|
-
|
|
10603
|
-
|
|
10715
|
+
let updatedRecords;
|
|
10716
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport) {
|
|
10717
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].exportType &&
|
|
10718
|
+
this.parent.pdfExportModule['helper']['exportProps'].exportType === 'CurrentViewData') {
|
|
10719
|
+
updatedRecords = this.expandedRecords;
|
|
10720
|
+
}
|
|
10721
|
+
else {
|
|
10722
|
+
updatedRecords = this.parent.flatData;
|
|
10723
|
+
}
|
|
10724
|
+
}
|
|
10725
|
+
else {
|
|
10726
|
+
updatedRecords = this.expandedRecords;
|
|
10727
|
+
}
|
|
10604
10728
|
const parentIndex = updatedRecords.indexOf(parentGanttData);
|
|
10605
10729
|
const childIndex = updatedRecords.indexOf(childGanttData);
|
|
10606
10730
|
const parentGanttRecord = parentGanttData.ganttProperties;
|
|
@@ -10923,6 +11047,63 @@ class ConnectorLine {
|
|
|
10923
11047
|
isMilestoneValue = (data.milestoneParent && data.milestoneChild) ? 0 : data.milestoneParent ? -5 : data.milestoneChild ? 5 : 0;
|
|
10924
11048
|
}
|
|
10925
11049
|
const heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
|
|
11050
|
+
let borderTopWidth = 0;
|
|
11051
|
+
let addTop = 0;
|
|
11052
|
+
if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex]) {
|
|
11053
|
+
let fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
|
|
11054
|
+
let toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
|
|
11055
|
+
let fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
|
|
11056
|
+
let toRecordIsManual = this.parent.currentViewData[data.childIndex].ganttProperties.isAutoSchedule;
|
|
11057
|
+
let isValid = true;
|
|
11058
|
+
if (((fromRecordIsParent && fromRecordIsManual) && !toRecordIsParent) || ((toRecordIsParent && toRecordIsManual) &&
|
|
11059
|
+
!fromRecordIsParent) || (fromRecordIsParent && fromRecordIsManual && toRecordIsManual && toRecordIsParent)
|
|
11060
|
+
|| (!fromRecordIsParent && !toRecordIsParent)) {
|
|
11061
|
+
isValid = false;
|
|
11062
|
+
}
|
|
11063
|
+
if (isValid) {
|
|
11064
|
+
if (((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
|
|
11065
|
+
addTop = -11;
|
|
11066
|
+
}
|
|
11067
|
+
else if (!((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
|
|
11068
|
+
if (data.childIndex > data.parentIndex) {
|
|
11069
|
+
if (!fromRecordIsParent && toRecordIsParent) {
|
|
11070
|
+
borderTopWidth = -11;
|
|
11071
|
+
}
|
|
11072
|
+
else {
|
|
11073
|
+
borderTopWidth = 11;
|
|
11074
|
+
addTop = -11;
|
|
11075
|
+
}
|
|
11076
|
+
}
|
|
11077
|
+
else {
|
|
11078
|
+
if ((fromRecordIsParent && !toRecordIsParent)) {
|
|
11079
|
+
borderTopWidth = -11;
|
|
11080
|
+
}
|
|
11081
|
+
else {
|
|
11082
|
+
borderTopWidth = 11;
|
|
11083
|
+
addTop = -11;
|
|
11084
|
+
}
|
|
11085
|
+
}
|
|
11086
|
+
}
|
|
11087
|
+
if (this.parent.currentViewData[data.parentIndex].ganttProperties.isMilestone) {
|
|
11088
|
+
if (data.parentIndex > data.childIndex) {
|
|
11089
|
+
addTop = -5;
|
|
11090
|
+
borderTopWidth = 10;
|
|
11091
|
+
}
|
|
11092
|
+
else if (data.type === 'SS' || data.type === 'FF') {
|
|
11093
|
+
addTop = -5;
|
|
11094
|
+
}
|
|
11095
|
+
}
|
|
11096
|
+
else if (this.parent.currentViewData[data.childIndex].ganttProperties.isMilestone) {
|
|
11097
|
+
if (data.parentIndex > data.childIndex) {
|
|
11098
|
+
addTop = 5;
|
|
11099
|
+
borderTopWidth = -10;
|
|
11100
|
+
}
|
|
11101
|
+
else if (data.type === 'SS' || data.type === 'FF') {
|
|
11102
|
+
addTop = 5;
|
|
11103
|
+
}
|
|
11104
|
+
}
|
|
11105
|
+
}
|
|
11106
|
+
}
|
|
10926
11107
|
if (this.getParentPosition(data)) {
|
|
10927
11108
|
connectorContainer = '<div id="ConnectorLine' + data.connectorLineId + '" style="background-color:black">';
|
|
10928
11109
|
let div = '<div class="' + connectorLineContainer +
|
|
@@ -10942,7 +11123,7 @@ class ConnectorLine {
|
|
|
10942
11123
|
'border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div>';
|
|
10943
11124
|
const duplicateStingThree = this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>' + eLine +
|
|
10944
11125
|
'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>';
|
|
11126
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
10946
11127
|
const duplicateStingFour = leftArrow + 'left:' +
|
|
10947
11128
|
(((data.childLeft + data.childWidth) - (data.parentLeft)) + 10) + 'px;' +
|
|
10948
11129
|
this.getBorderStyles('right', 10);
|
|
@@ -10950,7 +11131,7 @@ class ConnectorLine {
|
|
|
10950
11131
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
10951
11132
|
if (this.getParentPosition(data) === 'FSType1') {
|
|
10952
11133
|
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;' +
|
|
11134
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
10954
11135
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
|
|
10955
11136
|
div = div + eLine;
|
|
10956
11137
|
div = div + 'left:' + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
|
|
@@ -10960,7 +11141,7 @@ class ConnectorLine {
|
|
|
10960
11141
|
div = div + eLine;
|
|
10961
11142
|
div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;' +
|
|
10962
11143
|
'width:0px;' + this.getBorderStyles('right', this.lineStroke) +
|
|
10963
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11144
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
10964
11145
|
div = div + eLine;
|
|
10965
11146
|
div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;width:10px;' +
|
|
10966
11147
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -10970,7 +11151,7 @@ class ConnectorLine {
|
|
|
10970
11151
|
'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
|
|
10971
11152
|
}
|
|
10972
11153
|
if (this.getParentPosition(data) === 'FSType2') {
|
|
10973
|
-
div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) +
|
|
11154
|
+
div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) + addTop +
|
|
10974
11155
|
this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
10975
11156
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
|
|
10976
11157
|
div = div + eLine;
|
|
@@ -10980,7 +11161,7 @@ class ConnectorLine {
|
|
|
10980
11161
|
div = div + eLine;
|
|
10981
11162
|
div = div + 'left:' + (data.parentWidth + 10 - this.lineStroke) + 'px;' +
|
|
10982
11163
|
this.getBorderStyles('left', this.lineStroke) + 'width:0px;' +
|
|
10983
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11164
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
10984
11165
|
div = div + eLine;
|
|
10985
11166
|
div = div + 'left:' + (data.parentWidth - (((data.parentLeft + data.parentWidth) - data.childLeft) + 20)) + 'px;' +
|
|
10986
11167
|
'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
|
|
@@ -11002,7 +11183,7 @@ class ConnectorLine {
|
|
|
11002
11183
|
}
|
|
11003
11184
|
if (this.getParentPosition(data) === 'FSType3') {
|
|
11004
11185
|
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;' +
|
|
11186
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11006
11187
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
|
|
11007
11188
|
div = div + rightArrow;
|
|
11008
11189
|
div = div + 'left:10px;' + this.getBorderStyles('left', 10) +
|
|
@@ -11012,7 +11193,7 @@ class ConnectorLine {
|
|
|
11012
11193
|
div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) +
|
|
11013
11194
|
'position:relative;top:' + (-(6 + (5 + this.lineStroke) + Math.round(this.lineStroke / 2))) + 'px;"></div>';
|
|
11014
11195
|
div = div + eLine;
|
|
11015
|
-
div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
|
|
11196
|
+
div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
|
|
11016
11197
|
'position:relative;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;"></div>';
|
|
11017
11198
|
div = div + eLine;
|
|
11018
11199
|
div = div + 'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
|
|
@@ -11032,7 +11213,7 @@ class ConnectorLine {
|
|
|
11032
11213
|
}
|
|
11033
11214
|
if (this.getParentPosition(data) === 'FSType4') {
|
|
11034
11215
|
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;' +
|
|
11216
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11036
11217
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
|
|
11037
11218
|
div = div + rightArrow;
|
|
11038
11219
|
div = div + 'left:' + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
|
|
@@ -11048,7 +11229,7 @@ class ConnectorLine {
|
|
|
11048
11229
|
div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;left:' +
|
|
11049
11230
|
(data.childLeft - (data.parentLeft + data.parentWidth) - 20) + 'px;width:0px;' +
|
|
11050
11231
|
this.getBorderStyles('left', this.lineStroke) +
|
|
11051
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11232
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11052
11233
|
div = div + eLine;
|
|
11053
11234
|
div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'top:' +
|
|
11054
11235
|
(-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
@@ -11058,7 +11239,7 @@ class ConnectorLine {
|
|
|
11058
11239
|
}
|
|
11059
11240
|
if (this.getParentPosition(data) === 'SSType4') {
|
|
11060
11241
|
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;' +
|
|
11242
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11062
11243
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
|
|
11063
11244
|
div = div + rightArrow;
|
|
11064
11245
|
div = div + 'left:' + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
|
|
@@ -11071,7 +11252,7 @@ class ConnectorLine {
|
|
|
11071
11252
|
}
|
|
11072
11253
|
if (this.getParentPosition(data) === 'SSType3') {
|
|
11073
11254
|
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;' +
|
|
11255
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11075
11256
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
|
|
11076
11257
|
div = div + rightArrow;
|
|
11077
11258
|
div = div + 'left:10px;' + duplicateStingTwo;
|
|
@@ -11084,14 +11265,14 @@ class ConnectorLine {
|
|
|
11084
11265
|
}
|
|
11085
11266
|
if (this.getParentPosition(data) === 'SSType2') {
|
|
11086
11267
|
div = div + 'left:' + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11087
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11268
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11088
11269
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
|
|
11089
11270
|
div = div + eLine;
|
|
11090
11271
|
div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
|
|
11091
11272
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11092
11273
|
div = div + eLine;
|
|
11093
11274
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11094
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11275
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11095
11276
|
div = div + eLine;
|
|
11096
11277
|
div = div + 'width:' + setInnerElementWidthSSType2 + 'px;' +
|
|
11097
11278
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11104,7 +11285,7 @@ class ConnectorLine {
|
|
|
11104
11285
|
}
|
|
11105
11286
|
if (this.getParentPosition(data) === 'SSType1') {
|
|
11106
11287
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11107
|
-
((data.parentIndex * data.rowHeight) +
|
|
11288
|
+
((data.parentIndex * data.rowHeight) + addTop +
|
|
11108
11289
|
this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11109
11290
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
|
|
11110
11291
|
div = div + eLine;
|
|
@@ -11112,7 +11293,7 @@ class ConnectorLine {
|
|
|
11112
11293
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11113
11294
|
div = div + eLine;
|
|
11114
11295
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11115
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11296
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11116
11297
|
div = div + eLine;
|
|
11117
11298
|
div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11118
11299
|
div = div + rightArrow;
|
|
@@ -11122,7 +11303,7 @@ class ConnectorLine {
|
|
|
11122
11303
|
}
|
|
11123
11304
|
if (this.getParentPosition(data) === 'FFType1') {
|
|
11124
11305
|
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;' +
|
|
11306
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11126
11307
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
|
|
11127
11308
|
div = div + eLine;
|
|
11128
11309
|
div = div + 'left:' + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
|
|
@@ -11133,7 +11314,7 @@ class ConnectorLine {
|
|
|
11133
11314
|
div = div + eLine;
|
|
11134
11315
|
div = div + 'left:' + (((data.parentLeft + data.parentWidth) -
|
|
11135
11316
|
(data.childLeft + data.childWidth)) + 20) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11136
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11317
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11137
11318
|
div = div + eLine;
|
|
11138
11319
|
div = div + 'left:' + (isMilestone ? 4 : 10) + 'px;width:' + (isMilestone ?
|
|
11139
11320
|
(((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + (16 + this.lineStroke)) :
|
|
@@ -11146,7 +11327,7 @@ class ConnectorLine {
|
|
|
11146
11327
|
}
|
|
11147
11328
|
if (this.getParentPosition(data) === 'FFType2') {
|
|
11148
11329
|
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;' +
|
|
11330
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11150
11331
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
|
|
11151
11332
|
div = div + eLine;
|
|
11152
11333
|
div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'width:' +
|
|
@@ -11157,7 +11338,7 @@ class ConnectorLine {
|
|
|
11157
11338
|
div = div + eLine;
|
|
11158
11339
|
div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 20) +
|
|
11159
11340
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11160
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) +
|
|
11341
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) +
|
|
11161
11342
|
'position:relative;"></div>';
|
|
11162
11343
|
div = div + eLine;
|
|
11163
11344
|
div = div + 'left:' + (isMilestone ? (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 4) :
|
|
@@ -11172,7 +11353,7 @@ class ConnectorLine {
|
|
|
11172
11353
|
}
|
|
11173
11354
|
if (this.getParentPosition(data) === 'FFType3') {
|
|
11174
11355
|
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;' +
|
|
11356
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11176
11357
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
|
|
11177
11358
|
div = div + duplicateStingOne;
|
|
11178
11359
|
div = div + eLine;
|
|
@@ -11185,7 +11366,7 @@ class ConnectorLine {
|
|
|
11185
11366
|
div = div + 'left:' + (((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + 20) +
|
|
11186
11367
|
'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;' +
|
|
11187
11368
|
'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11188
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11369
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11189
11370
|
div = div + eLine;
|
|
11190
11371
|
div = div + (isMilestoneParent ? ('left:' + (((data.parentLeft + data.parentWidth) -
|
|
11191
11372
|
(data.childLeft + data.childWidth)) - 1) + 'px;width:21') : ('left:' + ((data.parentLeft + data.parentWidth) -
|
|
@@ -11195,7 +11376,7 @@ class ConnectorLine {
|
|
|
11195
11376
|
}
|
|
11196
11377
|
if (this.getParentPosition(data) === 'FFType4') {
|
|
11197
11378
|
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;' +
|
|
11379
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11199
11380
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
|
|
11200
11381
|
div = div + leftArrow;
|
|
11201
11382
|
div = div + ('left:' + ((data.childLeft + data.childWidth) -
|
|
@@ -11214,7 +11395,7 @@ class ConnectorLine {
|
|
|
11214
11395
|
div = div + 'left:' + (((data.childLeft + data.childWidth) -
|
|
11215
11396
|
(data.parentLeft + data.parentWidth)) + 20) + 'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) +
|
|
11216
11397
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11217
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11398
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11218
11399
|
div = div + eLine;
|
|
11219
11400
|
div = div + (isMilestoneParent ? ('left:-1px;width:' + (((data.childLeft + data.childWidth) -
|
|
11220
11401
|
(data.parentLeft + data.parentWidth)) + (21 + this.lineStroke))) : ('width:' + (((data.childLeft + data.childWidth) -
|
|
@@ -11224,7 +11405,7 @@ class ConnectorLine {
|
|
|
11224
11405
|
}
|
|
11225
11406
|
if (this.getParentPosition(data) === 'SFType4') {
|
|
11226
11407
|
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;' +
|
|
11408
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
11228
11409
|
'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
|
|
11229
11410
|
div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
|
|
11230
11411
|
'border-bottom-width:' + (5 + this.lineStroke) +
|
|
@@ -11237,7 +11418,7 @@ class ConnectorLine {
|
|
|
11237
11418
|
div = div + eLine;
|
|
11238
11419
|
div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + 30) + 'px;top:' +
|
|
11239
11420
|
(-(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>';
|
|
11421
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11241
11422
|
div = div + eLine;
|
|
11242
11423
|
div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
11243
11424
|
(((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
|
|
@@ -11252,7 +11433,7 @@ class ConnectorLine {
|
|
|
11252
11433
|
}
|
|
11253
11434
|
if (this.getParentPosition(data) === 'SFType3') {
|
|
11254
11435
|
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;' +
|
|
11436
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11256
11437
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
|
|
11257
11438
|
div = div + duplicateStingOne;
|
|
11258
11439
|
div = div + eLine;
|
|
@@ -11262,7 +11443,7 @@ class ConnectorLine {
|
|
|
11262
11443
|
div = div + eLine;
|
|
11263
11444
|
div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' +
|
|
11264
11445
|
this.getBorderStyles('left', this.lineStroke) +
|
|
11265
|
-
this.getBorderStyles('top', (heightValue - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11446
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11266
11447
|
div = div + eLine;
|
|
11267
11448
|
div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
11268
11449
|
((data.parentLeft - (data.childLeft + data.childWidth + 20)) + this.lineStroke) + 'px;' +
|
|
@@ -11270,13 +11451,13 @@ class ConnectorLine {
|
|
|
11270
11451
|
}
|
|
11271
11452
|
if (this.getParentPosition(data) === 'SFType1') {
|
|
11272
11453
|
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;' +
|
|
11454
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11274
11455
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
|
|
11275
11456
|
div = div + eLine;
|
|
11276
11457
|
div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11277
11458
|
div = div + eLine;
|
|
11278
11459
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11279
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11460
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11280
11461
|
div = div + eLine;
|
|
11281
11462
|
div = div + 'width:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
|
|
11282
11463
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11295,7 +11476,7 @@ class ConnectorLine {
|
|
|
11295
11476
|
}
|
|
11296
11477
|
if (this.getParentPosition(data) === 'SFType2') {
|
|
11297
11478
|
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;' +
|
|
11479
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11299
11480
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
|
|
11300
11481
|
div = div + eLine;
|
|
11301
11482
|
div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
@@ -11303,7 +11484,7 @@ class ConnectorLine {
|
|
|
11303
11484
|
div = div + eLine;
|
|
11304
11485
|
div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
11305
11486
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11306
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11487
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11307
11488
|
div = div + eLine;
|
|
11308
11489
|
div = div + (isMilestone ? ('left:4px;width:' + (((data.parentLeft) - (data.childLeft + data.childWidth))
|
|
11309
11490
|
- (14 - this.lineStroke))) : ('left:10px;width:' + (((data.parentLeft) -
|
|
@@ -11551,11 +11732,11 @@ class Splitter$1 {
|
|
|
11551
11732
|
}
|
|
11552
11733
|
/**
|
|
11553
11734
|
* @param {SplitterSettingsModel} splitter .
|
|
11554
|
-
|
|
11735
|
+
|
|
11555
11736
|
* @returns {string} .
|
|
11556
11737
|
* @private
|
|
11557
11738
|
*/
|
|
11558
|
-
calculateSplitterPosition(splitter$$1
|
|
11739
|
+
calculateSplitterPosition(splitter$$1) {
|
|
11559
11740
|
if (!isNullOrUndefined(this.splitterObject) && this.parent.enablePersistence) {
|
|
11560
11741
|
return this.splitterObject.paneSettings[0].size;
|
|
11561
11742
|
}
|
|
@@ -11571,8 +11752,7 @@ class Splitter$1 {
|
|
|
11571
11752
|
}
|
|
11572
11753
|
else if (!isNullOrUndefined(splitter$$1.columnIndex) && splitter$$1.columnIndex >= 0) {
|
|
11573
11754
|
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');
|
|
11755
|
+
return this.getSpliterPositionInPercentage(this.getTotalColumnWidthByIndex(splitter$$1.columnIndex).toString() + 'px');
|
|
11576
11756
|
}
|
|
11577
11757
|
else {
|
|
11578
11758
|
return this.getSpliterPositionInPercentage((splitter$$1.columnIndex * 130) + 'px');
|
|
@@ -11608,10 +11788,10 @@ class Splitter$1 {
|
|
|
11608
11788
|
*/
|
|
11609
11789
|
getTotalColumnWidthByIndex(index) {
|
|
11610
11790
|
let width = 0;
|
|
11611
|
-
const tr = this.parent.
|
|
11791
|
+
const tr = this.parent.ganttColumns;
|
|
11612
11792
|
index = tr.length > index ? index : tr.length;
|
|
11613
11793
|
for (let column = 0; column < index; column++) {
|
|
11614
|
-
width = width + tr[column].
|
|
11794
|
+
width = width + parseInt(tr[column].width);
|
|
11615
11795
|
}
|
|
11616
11796
|
return width;
|
|
11617
11797
|
}
|
|
@@ -11622,7 +11802,7 @@ class Splitter$1 {
|
|
|
11622
11802
|
updateSplitterPosition() {
|
|
11623
11803
|
this.splitterObject.separatorSize = this.parent.splitterSettings.separatorSize >= 4 ?
|
|
11624
11804
|
this.parent.splitterSettings.separatorSize : 4;
|
|
11625
|
-
const splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings
|
|
11805
|
+
const splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings);
|
|
11626
11806
|
this.splitterObject.paneSettings[0].min = this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum);
|
|
11627
11807
|
this.splitterObject.dataBind();
|
|
11628
11808
|
this.splitterObject.paneSettings[0].size = splitterPosition;
|
|
@@ -12038,7 +12218,8 @@ class Tooltip$1 {
|
|
|
12038
12218
|
*/
|
|
12039
12219
|
getPredecessorTooltipData(args) {
|
|
12040
12220
|
const predeceesorParent = args.target.parentElement.id;
|
|
12041
|
-
const taskIds = predeceesorParent.match(
|
|
12221
|
+
const taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
|
|
12222
|
+
taskIds.shift();
|
|
12042
12223
|
let fromTask;
|
|
12043
12224
|
let toTask;
|
|
12044
12225
|
if (this.parent.viewType === 'ResourceView') {
|
|
@@ -12333,7 +12514,7 @@ class FocusModule {
|
|
|
12333
12514
|
if (ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectedRowIndex !== -1) {
|
|
12334
12515
|
const selectedItem = ganttObj.currentViewData[ganttObj.selectedRowIndex];
|
|
12335
12516
|
const focusedRowIndex = this.parent.ganttChartModule.focusedRowIndex;
|
|
12336
|
-
const selectingRowIndex =
|
|
12517
|
+
const selectingRowIndex = expandedRecords.indexOf(selectedItem);
|
|
12337
12518
|
const currentSelectingRecord = e.action === 'downArrow' ? expandedRecords[selectingRowIndex + 1] :
|
|
12338
12519
|
expandedRecords[selectingRowIndex - 1];
|
|
12339
12520
|
ganttObj.selectionModule.selectRow(ganttObj.currentViewData.indexOf(currentSelectingRecord), false, true);
|
|
@@ -12730,6 +12911,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12730
12911
|
if (this.enableValidation) {
|
|
12731
12912
|
this.dataOperation.updateGanttData();
|
|
12732
12913
|
}
|
|
12914
|
+
this.predecessorModule.updateParentPredecessor();
|
|
12733
12915
|
if (this.dataSource instanceof Object && isCountRequired(this)) {
|
|
12734
12916
|
const count = getValue('count', this.dataSource);
|
|
12735
12917
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
@@ -12742,6 +12924,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12742
12924
|
if (this.enableValidation) {
|
|
12743
12925
|
this.dataOperation.updateGanttData();
|
|
12744
12926
|
}
|
|
12927
|
+
this.predecessorModule.updateParentPredecessor();
|
|
12745
12928
|
this.treeGridPane.classList.remove('e-temp-content');
|
|
12746
12929
|
remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
|
|
12747
12930
|
this.notify('dataReady', {});
|
|
@@ -13052,7 +13235,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13052
13235
|
{
|
|
13053
13236
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
13054
13237
|
bottomTier: { unit: 'Minutes', format: 'mm', count: 30 }, timelineUnitSize: 66, level: 22,
|
|
13055
|
-
timelineViewMode: 'Hour', weekStartDay:
|
|
13238
|
+
timelineViewMode: 'Hour', weekStartDay: 0, updateTimescaleView: true, weekendBackground: null, showTooltip: true
|
|
13056
13239
|
},
|
|
13057
13240
|
{
|
|
13058
13241
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
@@ -14391,7 +14574,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14391
14574
|
setSplitterPosition(value, type) {
|
|
14392
14575
|
const tempSplitterSettings = {};
|
|
14393
14576
|
tempSplitterSettings[type] = value;
|
|
14394
|
-
const splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings
|
|
14577
|
+
const splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings);
|
|
14395
14578
|
const pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
|
|
14396
14579
|
const pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
|
|
14397
14580
|
this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
|
|
@@ -14473,7 +14656,10 @@ let Gantt = class Gantt extends Component {
|
|
|
14473
14656
|
if (this.viewType === 'ResourceView') {
|
|
14474
14657
|
this.editModule.addRowPosition = rowPosition;
|
|
14475
14658
|
this.editModule.addRowIndex = rowIndex;
|
|
14476
|
-
|
|
14659
|
+
let resources;
|
|
14660
|
+
if (!isNullOrUndefined(data)) {
|
|
14661
|
+
resources = data[this.taskFields.resourceInfo];
|
|
14662
|
+
}
|
|
14477
14663
|
let id;
|
|
14478
14664
|
let parentTask;
|
|
14479
14665
|
if (!isNullOrUndefined(resources) && resources.length) {
|
|
@@ -14970,6 +15156,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14970
15156
|
*/
|
|
14971
15157
|
showColumn(keys, showBy) {
|
|
14972
15158
|
this.treeGrid.showColumns(keys, showBy);
|
|
15159
|
+
this.updateTreeColumns();
|
|
14973
15160
|
}
|
|
14974
15161
|
/**
|
|
14975
15162
|
* Hides a column by column name.
|
|
@@ -14981,6 +15168,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14981
15168
|
*/
|
|
14982
15169
|
hideColumn(keys, hideBy) {
|
|
14983
15170
|
this.treeGrid.hideColumns(keys, hideBy);
|
|
15171
|
+
this.updateTreeColumns();
|
|
14984
15172
|
}
|
|
14985
15173
|
/**
|
|
14986
15174
|
* To set scroll top for chart scroll container.
|
|
@@ -15715,8 +15903,7 @@ class CellEdit {
|
|
|
15715
15903
|
}
|
|
15716
15904
|
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
15717
15905
|
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
15718
|
-
|| field === taskSettings.
|
|
15719
|
-
|| field === taskSettings.work || field === 'taskType')) {
|
|
15906
|
+
|| field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
15720
15907
|
args.cancel = true;
|
|
15721
15908
|
}
|
|
15722
15909
|
else {
|
|
@@ -16514,6 +16701,9 @@ class TaskbarEdit extends DateProcessor {
|
|
|
16514
16701
|
}
|
|
16515
16702
|
}
|
|
16516
16703
|
mouseClickHandler(e) {
|
|
16704
|
+
if (!this.parent.editSettings.allowTaskbarEditing) {
|
|
16705
|
+
return;
|
|
16706
|
+
}
|
|
16517
16707
|
const targetElement = this.getElementByPosition(e);
|
|
16518
16708
|
const element = parentsUntil$1(targetElement, taskBarMainContainer);
|
|
16519
16709
|
if (this.parent.selectionModule && this.parent.selectionModule.enableSelectMultiTouch) {
|
|
@@ -17043,10 +17233,13 @@ class TaskbarEdit extends DateProcessor {
|
|
|
17043
17233
|
startScrollTimer(direction) {
|
|
17044
17234
|
this.stopScrollTimer();
|
|
17045
17235
|
this.scrollTimer = window.setInterval(() => {
|
|
17046
|
-
if (direction === 'right'
|
|
17236
|
+
if (direction === 'right') {
|
|
17047
17237
|
this.timerCount = (this.timerCount + 1) >= this.parent.timelineModule.totalTimelineWidth ?
|
|
17048
17238
|
this.parent.timelineModule.totalTimelineWidth : (this.timerCount + 1);
|
|
17049
17239
|
}
|
|
17240
|
+
else if (direction === 'bottom') {
|
|
17241
|
+
this.timerCount = this.timerCount + 1;
|
|
17242
|
+
}
|
|
17050
17243
|
else {
|
|
17051
17244
|
this.timerCount = (this.timerCount - 1) < 0 ? 0 : (this.timerCount - 1);
|
|
17052
17245
|
}
|
|
@@ -18154,8 +18347,14 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18154
18347
|
}
|
|
18155
18348
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
18156
18349
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
18157
|
-
|
|
18158
|
-
|
|
18350
|
+
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
18351
|
+
this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
|
|
18352
|
+
this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
18353
|
+
}
|
|
18354
|
+
else {
|
|
18355
|
+
this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
|
|
18356
|
+
this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
|
|
18357
|
+
}
|
|
18159
18358
|
this.elementOffsetWidth = this.taskBarEditElement.offsetWidth;
|
|
18160
18359
|
this.elementOffsetHeight = this.taskBarEditElement.offsetHeight;
|
|
18161
18360
|
}
|
|
@@ -18323,6 +18522,7 @@ class DialogEdit {
|
|
|
18323
18522
|
this.addedRecord = null;
|
|
18324
18523
|
this.dialogEditValidationFlag = false;
|
|
18325
18524
|
this.ganttResources = [];
|
|
18525
|
+
this.isValidData = true;
|
|
18326
18526
|
/**
|
|
18327
18527
|
* @private
|
|
18328
18528
|
*/
|
|
@@ -18563,7 +18763,7 @@ class DialogEdit {
|
|
|
18563
18763
|
tempData[field] = 0;
|
|
18564
18764
|
tempData.ganttProperties.work = tempData[field];
|
|
18565
18765
|
}
|
|
18566
|
-
else if (columns[i].field ===
|
|
18766
|
+
else if (columns[i].field === taskSettings.type) {
|
|
18567
18767
|
tempData[field] = this.parent.taskType;
|
|
18568
18768
|
tempData.ganttProperties.taskType = tempData[field];
|
|
18569
18769
|
}
|
|
@@ -18606,6 +18806,24 @@ class DialogEdit {
|
|
|
18606
18806
|
*/
|
|
18607
18807
|
openEditDialog(taskId) {
|
|
18608
18808
|
const ganttObj = this.parent;
|
|
18809
|
+
if (!isNullOrUndefined(taskId)) {
|
|
18810
|
+
if (!isNullOrUndefined(taskId['ganttProperties'])) {
|
|
18811
|
+
if (typeof taskId['ganttProperties']['taskId'] === 'string') {
|
|
18812
|
+
this.numericOrString = "stringedit";
|
|
18813
|
+
}
|
|
18814
|
+
else {
|
|
18815
|
+
this.numericOrString = "numericedit";
|
|
18816
|
+
}
|
|
18817
|
+
}
|
|
18818
|
+
if (isNullOrUndefined(taskId['ganttProperties']) && !isNullOrUndefined(taskId)) {
|
|
18819
|
+
if (isNaN(Number(taskId)) || this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
18820
|
+
this.numericOrString = "stringedit";
|
|
18821
|
+
}
|
|
18822
|
+
else {
|
|
18823
|
+
this.numericOrString = "numericedit";
|
|
18824
|
+
}
|
|
18825
|
+
}
|
|
18826
|
+
}
|
|
18609
18827
|
if (typeof taskId === 'object' && !isNullOrUndefined(taskId)) {
|
|
18610
18828
|
this.rowIndex = this.parent.currentViewData.indexOf(taskId);
|
|
18611
18829
|
if (this.rowIndex > -1) {
|
|
@@ -18639,11 +18857,11 @@ class DialogEdit {
|
|
|
18639
18857
|
this.beforeOpenArgs.rowIndex = this.rowIndex;
|
|
18640
18858
|
const dialogMaxWidth = this.parent.isAdaptive ? '' : '600px';
|
|
18641
18859
|
const dialog = this.parent.createElement('div', { id: ganttObj.element.id + '_dialog', styles: 'max-width:' + dialogMaxWidth });
|
|
18860
|
+
dialog.classList.add('e-gantt-dialog');
|
|
18642
18861
|
ganttObj.element.appendChild(dialog);
|
|
18643
18862
|
dialogModel.animationSettings = { effect: 'None' };
|
|
18644
18863
|
dialogModel.header = this.localeObj.getConstant(this.isEdit ? 'editDialogTitle' : 'addDialogTitle');
|
|
18645
18864
|
dialogModel.isModal = true;
|
|
18646
|
-
dialogModel.cssClass = 'e-gantt-dialog';
|
|
18647
18865
|
dialogModel.allowDragging = this.parent.isAdaptive ? false : true;
|
|
18648
18866
|
dialogModel.showCloseIcon = true;
|
|
18649
18867
|
const position = this.parent.isAdaptive ? { X: 'top', Y: 'left' } : { X: 'center', Y: 'center' };
|
|
@@ -18996,6 +19214,13 @@ class DialogEdit {
|
|
|
18996
19214
|
placeholder: column.headerText,
|
|
18997
19215
|
floatLabelType: 'Auto'
|
|
18998
19216
|
};
|
|
19217
|
+
if (!isNullOrUndefined(this.parent.taskFields.id) && !isNullOrUndefined(this.parent.columnMapping.id)
|
|
19218
|
+
&& !isNullOrUndefined(this.numericOrString)) {
|
|
19219
|
+
if (taskSettings.id === column.field) {
|
|
19220
|
+
column.editType = this.numericOrString;
|
|
19221
|
+
}
|
|
19222
|
+
}
|
|
19223
|
+
|
|
18999
19224
|
switch (column.editType) {
|
|
19000
19225
|
case 'booleanedit':
|
|
19001
19226
|
{
|
|
@@ -19010,7 +19235,7 @@ class DialogEdit {
|
|
|
19010
19235
|
case 'stringedit':
|
|
19011
19236
|
{
|
|
19012
19237
|
const textBox = common;
|
|
19013
|
-
if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.startDate ||
|
|
19238
|
+
if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.id || column.field === ganttObj.columnMapping.startDate ||
|
|
19014
19239
|
column.field === ganttObj.columnMapping.endDate) {
|
|
19015
19240
|
textBox.change = (args) => {
|
|
19016
19241
|
this.validateScheduleFields(args, column, ganttObj);
|
|
@@ -19067,7 +19292,7 @@ class DialogEdit {
|
|
|
19067
19292
|
break;
|
|
19068
19293
|
}
|
|
19069
19294
|
case 'dropdownedit':
|
|
19070
|
-
if (column.field ===
|
|
19295
|
+
if (column.field === ganttObj.columnMapping.type || column.field === ganttObj.columnMapping.manual) {
|
|
19071
19296
|
const dataKey = 'dataSource';
|
|
19072
19297
|
const fieldsKey = 'fields';
|
|
19073
19298
|
const types = [
|
|
@@ -19095,12 +19320,18 @@ class DialogEdit {
|
|
|
19095
19320
|
return fieldsModel;
|
|
19096
19321
|
}
|
|
19097
19322
|
validateScheduleFields(args, column, ganttObj) {
|
|
19098
|
-
|
|
19323
|
+
let dialog;
|
|
19324
|
+
if (!isNullOrUndefined(ganttObj.editModule.dialogModule.dialog)) {
|
|
19325
|
+
dialog = ganttObj.editModule.dialogModule.dialog;
|
|
19326
|
+
}
|
|
19099
19327
|
let targetId = null;
|
|
19100
19328
|
let inputElement;
|
|
19101
19329
|
const currentData = ganttObj.editModule.dialogModule.editedRecord;
|
|
19102
19330
|
let cellValue = null;
|
|
19103
19331
|
let colName = null;
|
|
19332
|
+
let formObject;
|
|
19333
|
+
const ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
19334
|
+
const strViewType = this.parent.viewType;
|
|
19104
19335
|
if (!isNullOrUndefined(args.element)) {
|
|
19105
19336
|
inputElement = args.element;
|
|
19106
19337
|
targetId = inputElement.getAttribute('id');
|
|
@@ -19122,6 +19353,22 @@ class DialogEdit {
|
|
|
19122
19353
|
else {
|
|
19123
19354
|
cellValue = inputElement.value;
|
|
19124
19355
|
colName = targetId.replace(ganttObj.element.id, '');
|
|
19356
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
19357
|
+
let customFn = (args) => {
|
|
19358
|
+
if (strViewType === 'ResourceView') {
|
|
19359
|
+
return ids.indexOf('T' + args['value']) === -1 && ids.indexOf('R' + args['value']) === -1;
|
|
19360
|
+
}
|
|
19361
|
+
else {
|
|
19362
|
+
return ids.indexOf(args['value']) === -1;
|
|
19363
|
+
}
|
|
19364
|
+
};
|
|
19365
|
+
let options = {
|
|
19366
|
+
rules: {
|
|
19367
|
+
[this.parent.taskFields.id]: { required: true, minLength: [customFn, 'ID is already present, please enter new value'] }
|
|
19368
|
+
}
|
|
19369
|
+
};
|
|
19370
|
+
formObject = new FormValidator('#' + this.parent.element.id + 'GeneralTabContainer', options);
|
|
19371
|
+
}
|
|
19125
19372
|
}
|
|
19126
19373
|
if (colName.search('Segments') === 0) {
|
|
19127
19374
|
colName = colName.replace('SegmentsTabContainer', '');
|
|
@@ -19345,7 +19592,7 @@ class DialogEdit {
|
|
|
19345
19592
|
this.validateDuration(currentData);
|
|
19346
19593
|
}
|
|
19347
19594
|
}
|
|
19348
|
-
if (columnName ===
|
|
19595
|
+
if (columnName === taskSettings.type) {
|
|
19349
19596
|
this.parent.setRecordValue('taskType', value, ganttProp, true);
|
|
19350
19597
|
}
|
|
19351
19598
|
if (taskSettings.manual === columnName) {
|
|
@@ -19700,9 +19947,6 @@ class DialogEdit {
|
|
|
19700
19947
|
item.content = this.renderGeneralTab(item.content);
|
|
19701
19948
|
}
|
|
19702
19949
|
else if (item.content === 'Dependency') {
|
|
19703
|
-
if (this.editedRecord.hasChildRecords) {
|
|
19704
|
-
item.disabled = true;
|
|
19705
|
-
}
|
|
19706
19950
|
item.content = this.renderPredecessorTab(item.content);
|
|
19707
19951
|
}
|
|
19708
19952
|
else if (item.content === 'Resources') {
|
|
@@ -19807,6 +20051,7 @@ class DialogEdit {
|
|
|
19807
20051
|
}
|
|
19808
20052
|
isCheckIsDisabled(column) {
|
|
19809
20053
|
let disabled = false;
|
|
20054
|
+
let stringOrNumber;
|
|
19810
20055
|
if (column.allowEditing === false || column.isPrimaryKey || this.parent.readOnly) {
|
|
19811
20056
|
if (this.parent.customColumns.indexOf(column.field) !== -1) {
|
|
19812
20057
|
disabled = true;
|
|
@@ -19816,8 +20061,19 @@ class DialogEdit {
|
|
|
19816
20061
|
column.field === this.parent.taskFields.duration || column.field === this.parent.taskFields.progress ||
|
|
19817
20062
|
column.field === this.parent.taskFields.startDate || column.field === this.parent.taskFields.endDate ||
|
|
19818
20063
|
column.field === this.parent.taskFields.baselineStartDate || column.field === this.parent.taskFields.baselineEndDate ||
|
|
19819
|
-
column.field === this.parent.taskFields.work || column.field ===
|
|
19820
|
-
|
|
20064
|
+
column.field === this.parent.taskFields.work || column.field === this.parent.taskFields.type) {
|
|
20065
|
+
for (let i = 0; i < this.parent.currentViewData['length']; i++) {
|
|
20066
|
+
if (!isNullOrUndefined(this.parent.currentViewData[i].ganttProperties.taskId)) {
|
|
20067
|
+
stringOrNumber = this.parent.currentViewData[i].ganttProperties.taskId;
|
|
20068
|
+
break;
|
|
20069
|
+
}
|
|
20070
|
+
}
|
|
20071
|
+
if (typeof (stringOrNumber) === "string") {
|
|
20072
|
+
disabled = false;
|
|
20073
|
+
}
|
|
20074
|
+
else {
|
|
20075
|
+
disabled = true;
|
|
20076
|
+
}
|
|
19821
20077
|
}
|
|
19822
20078
|
}
|
|
19823
20079
|
}
|
|
@@ -19829,13 +20085,30 @@ class DialogEdit {
|
|
|
19829
20085
|
if ((column.field === this.parent.taskFields.endDate && ((!isNullOrUndefined(this.editedRecord['isManual']) &&
|
|
19830
20086
|
this.editedRecord['isManual'] == false) || this.parent.taskMode == 'Auto')) || column.field === this.parent.taskFields.duration ||
|
|
19831
20087
|
column.field === this.parent.taskFields.progress || column.field === this.parent.taskFields.work ||
|
|
19832
|
-
column.field ===
|
|
20088
|
+
column.field === this.parent.taskFields.type) {
|
|
19833
20089
|
disabled = true;
|
|
19834
20090
|
}
|
|
19835
20091
|
}
|
|
19836
20092
|
}
|
|
19837
20093
|
return disabled;
|
|
19838
20094
|
}
|
|
20095
|
+
isParentValid(data) {
|
|
20096
|
+
if (data.length > 0) {
|
|
20097
|
+
for (let i = 0; i < data.length; i++) {
|
|
20098
|
+
if (data[i].uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20099
|
+
this.isValidData = false;
|
|
20100
|
+
break;
|
|
20101
|
+
}
|
|
20102
|
+
if (data[i].hasChildRecords) {
|
|
20103
|
+
this.isParentValid(data[i].childRecords);
|
|
20104
|
+
}
|
|
20105
|
+
if (!this.isValidData) {
|
|
20106
|
+
break;
|
|
20107
|
+
}
|
|
20108
|
+
}
|
|
20109
|
+
}
|
|
20110
|
+
return this.isValidData;
|
|
20111
|
+
}
|
|
19839
20112
|
renderPredecessorTab(itemName) {
|
|
19840
20113
|
const ganttObj = this.parent;
|
|
19841
20114
|
const gridModel = this.beforeOpenArgs[itemName];
|
|
@@ -19944,7 +20217,20 @@ class DialogEdit {
|
|
|
19944
20217
|
const rowResource = ganttData.ganttProperties.resourceInfo;
|
|
19945
20218
|
const inputModel = this.beforeOpenArgs[itemName];
|
|
19946
20219
|
const resourceTreeGridId = ganttObj.element.id + '' + itemName + 'TabContainer';
|
|
19947
|
-
|
|
20220
|
+
let resourceData = [];
|
|
20221
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
20222
|
+
for (let i = 0; i < ganttObj.currentViewData.length; i++) {
|
|
20223
|
+
for (let j = 0; j < ganttObj.resources.length; j++) {
|
|
20224
|
+
if (ganttObj.currentViewData[i][ganttObj.taskFields.id] === ganttObj.resources[j][resourceSettings.id] &&
|
|
20225
|
+
(ganttObj.currentViewData[i].hasChildRecords || isNullOrUndefined(ganttObj.currentViewData[i].parentItem))) {
|
|
20226
|
+
resourceData.push(ganttObj.resources[j]);
|
|
20227
|
+
}
|
|
20228
|
+
}
|
|
20229
|
+
}
|
|
20230
|
+
}
|
|
20231
|
+
else {
|
|
20232
|
+
resourceData = extend([], [], ganttObj.resources, true);
|
|
20233
|
+
}
|
|
19948
20234
|
this.parent.dataOperation.updateResourceUnit(resourceData);
|
|
19949
20235
|
if (!isNullOrUndefined(rowResource)) {
|
|
19950
20236
|
let count;
|
|
@@ -20111,7 +20397,26 @@ class DialogEdit {
|
|
|
20111
20397
|
this.preTableCollection = [];
|
|
20112
20398
|
for (let i = 0; i < flatData.length; i++) {
|
|
20113
20399
|
const data = flatData[i];
|
|
20114
|
-
|
|
20400
|
+
let currentFlatData = data;
|
|
20401
|
+
if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20402
|
+
this.isValidData = false;
|
|
20403
|
+
}
|
|
20404
|
+
else {
|
|
20405
|
+
do {
|
|
20406
|
+
if (currentFlatData.parentItem) {
|
|
20407
|
+
currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
|
|
20408
|
+
if (currentFlatData.uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20409
|
+
this.isValidData = false;
|
|
20410
|
+
break;
|
|
20411
|
+
}
|
|
20412
|
+
}
|
|
20413
|
+
} while (currentFlatData.parentItem);
|
|
20414
|
+
}
|
|
20415
|
+
if (data.hasChildRecords && this.isValidData) {
|
|
20416
|
+
this.isValidData = this.isParentValid(data.childRecords);
|
|
20417
|
+
}
|
|
20418
|
+
if (!this.isValidData) {
|
|
20419
|
+
this.isValidData = true;
|
|
20115
20420
|
continue;
|
|
20116
20421
|
}
|
|
20117
20422
|
const taskId = this.parent.viewType === 'ResourceView' ? data.ganttProperties.taskId.toString()
|
|
@@ -20316,6 +20621,10 @@ class DialogEdit {
|
|
|
20316
20621
|
if (inputElement) {
|
|
20317
20622
|
const fieldName = inputElement.id.replace(ganttObj.element.id, '');
|
|
20318
20623
|
const controlObj = div.querySelector('#' + ganttObj.element.id + fieldName).ej2_instances[0];
|
|
20624
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit" && fieldName === this.parent.taskFields.id) {
|
|
20625
|
+
const valueString = controlObj.value.toString();
|
|
20626
|
+
controlObj.value = valueString;
|
|
20627
|
+
}
|
|
20319
20628
|
const column = ganttObj.columnByField[fieldName];
|
|
20320
20629
|
if (!isNullOrUndefined(column.edit) && isNullOrUndefined(column.edit.params)) {
|
|
20321
20630
|
let read = column.edit.read;
|
|
@@ -20351,6 +20660,7 @@ class DialogEdit {
|
|
|
20351
20660
|
this.parent.setRecordValue('duration', fromRecord.ganttProperties.duration, toRecord.ganttProperties, true);
|
|
20352
20661
|
this.parent.setRecordValue('durationUnit', fromRecord.ganttProperties.durationUnit, toRecord.ganttProperties, true);
|
|
20353
20662
|
this.parent.setRecordValue('work', fromRecord.ganttProperties.work, toRecord.ganttProperties, true);
|
|
20663
|
+
this.parent.setRecordValue('type', fromRecord.ganttProperties.taskType, toRecord.ganttProperties, true);
|
|
20354
20664
|
if (!isNullOrUndefined(this.parent.taskFields.startDate)) {
|
|
20355
20665
|
this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.startDate);
|
|
20356
20666
|
}
|
|
@@ -20373,6 +20683,9 @@ class DialogEdit {
|
|
|
20373
20683
|
if (!isNullOrUndefined(this.parent.taskFields.manual)) {
|
|
20374
20684
|
this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.manual);
|
|
20375
20685
|
}
|
|
20686
|
+
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
20687
|
+
this.parent.dataOperation.updateMappingData(this.rowData, "type");
|
|
20688
|
+
}
|
|
20376
20689
|
}
|
|
20377
20690
|
updatePredecessorTab(preElement) {
|
|
20378
20691
|
const gridObj = preElement.ej2_instances[0];
|
|
@@ -20614,8 +20927,7 @@ class ConnectorLineEdit {
|
|
|
20614
20927
|
this.parent.connectorLineModule.removeConnectorLineById('parent' + predecessor[from] + 'child' + predecessor[to]);
|
|
20615
20928
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[from]);
|
|
20616
20929
|
childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[to]);
|
|
20617
|
-
if (
|
|
20618
|
-
(childGanttRecord && childGanttRecord.expanded === true)) {
|
|
20930
|
+
if (parentGanttRecord || childGanttRecord) {
|
|
20619
20931
|
connectorObj =
|
|
20620
20932
|
this.parent.predecessorModule.updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
|
|
20621
20933
|
if (!isNullOrUndefined(connectorObj)) {
|
|
@@ -20654,14 +20966,36 @@ class ConnectorLineEdit {
|
|
|
20654
20966
|
idFromPredecessor(pre) {
|
|
20655
20967
|
const preArray = pre.split(',');
|
|
20656
20968
|
const preIdArray = [];
|
|
20969
|
+
let values;
|
|
20970
|
+
let match = [];
|
|
20657
20971
|
for (let j = 0; j < preArray.length; j++) {
|
|
20658
20972
|
const strArray = [];
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20973
|
+
values = preArray[j].split('+');
|
|
20974
|
+
if (preArray[j].indexOf('-') >= 0) {
|
|
20975
|
+
values = preArray[j].split('-');
|
|
20976
|
+
|
|
20977
|
+
}
|
|
20978
|
+
if (!isNullOrUndefined(values[0])) {
|
|
20979
|
+
const ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
20980
|
+
if (ids.indexOf(values[0]) === -1) {
|
|
20981
|
+
if (values[0].indexOf(" ") != -1) {
|
|
20982
|
+
match = values[0].split(" ");
|
|
20983
|
+
if (match.length === 1) {
|
|
20984
|
+
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
20985
|
+
}
|
|
20986
|
+
strArray.push(match[0]);
|
|
20987
|
+
}
|
|
20988
|
+
else {
|
|
20989
|
+
if (values[0].length === 1 || values[0].length === 2) {
|
|
20990
|
+
strArray.push(values[0]);
|
|
20991
|
+
}
|
|
20992
|
+
else {
|
|
20993
|
+
strArray.push(values[0].slice(0, -2));
|
|
20994
|
+
}
|
|
20995
|
+
}
|
|
20662
20996
|
}
|
|
20663
20997
|
else {
|
|
20664
|
-
|
|
20998
|
+
strArray.push(values[0]);
|
|
20665
20999
|
}
|
|
20666
21000
|
}
|
|
20667
21001
|
preIdArray.push((strArray.join('')));
|
|
@@ -20711,6 +21045,75 @@ class ConnectorLineEdit {
|
|
|
20711
21045
|
}
|
|
20712
21046
|
return true;
|
|
20713
21047
|
}
|
|
21048
|
+
// Get the root parent of the record
|
|
21049
|
+
getRootParent(rec) {
|
|
21050
|
+
let parentRec = rec;
|
|
21051
|
+
if (rec.parentItem) {
|
|
21052
|
+
parentRec = this.parent.flatData.filter((item) => {
|
|
21053
|
+
return item.uniqueID == rec.parentUniqueID;
|
|
21054
|
+
})[0];
|
|
21055
|
+
if (parentRec.parentItem) {
|
|
21056
|
+
parentRec = this.getRootParent(parentRec);
|
|
21057
|
+
}
|
|
21058
|
+
return parentRec;
|
|
21059
|
+
}
|
|
21060
|
+
return parentRec;
|
|
21061
|
+
}
|
|
21062
|
+
// To check whether the predecessor drawn is valid for parent task
|
|
21063
|
+
validateParentPredecessor(fromRecord, toRecord) {
|
|
21064
|
+
if (toRecord.hasChildRecords && !fromRecord.hasChildRecords) {
|
|
21065
|
+
if (fromRecord.parentUniqueID === toRecord.uniqueID) {
|
|
21066
|
+
return false;
|
|
21067
|
+
}
|
|
21068
|
+
else {
|
|
21069
|
+
do {
|
|
21070
|
+
if (fromRecord.parentItem) {
|
|
21071
|
+
fromRecord = this.parent.flatData[this.parent.ids.indexOf(fromRecord.parentItem.taskId)];
|
|
21072
|
+
if (fromRecord.uniqueID === toRecord.uniqueID) {
|
|
21073
|
+
return false;
|
|
21074
|
+
}
|
|
21075
|
+
}
|
|
21076
|
+
} while (fromRecord.parentItem);
|
|
21077
|
+
}
|
|
21078
|
+
}
|
|
21079
|
+
else if (!toRecord.hasChildRecords && fromRecord.hasChildRecords) {
|
|
21080
|
+
if (toRecord.parentUniqueID === fromRecord.uniqueID) {
|
|
21081
|
+
return false;
|
|
21082
|
+
}
|
|
21083
|
+
else {
|
|
21084
|
+
do {
|
|
21085
|
+
if (toRecord.parentItem) {
|
|
21086
|
+
toRecord = this.parent.flatData[this.parent.ids.indexOf(toRecord.parentItem.taskId)];
|
|
21087
|
+
if (toRecord.uniqueID === fromRecord.uniqueID) {
|
|
21088
|
+
return false;
|
|
21089
|
+
}
|
|
21090
|
+
}
|
|
21091
|
+
} while (toRecord.parentItem);
|
|
21092
|
+
}
|
|
21093
|
+
}
|
|
21094
|
+
else if (toRecord.hasChildRecords && fromRecord.hasChildRecords) {
|
|
21095
|
+
if (toRecord.parentItem && fromRecord.parentItem) {
|
|
21096
|
+
if (fromRecord.parentUniqueID === toRecord.uniqueID || fromRecord.uniqueID === toRecord.parentUniqueID) {
|
|
21097
|
+
return false;
|
|
21098
|
+
}
|
|
21099
|
+
}
|
|
21100
|
+
else {
|
|
21101
|
+
if (!toRecord.parentItem && fromRecord.parentItem) {
|
|
21102
|
+
let fromRootParent = this.parent.connectorLineEditModule.getRootParent(fromRecord);
|
|
21103
|
+
if (fromRootParent.uniqueID === toRecord.uniqueID) {
|
|
21104
|
+
return false;
|
|
21105
|
+
}
|
|
21106
|
+
}
|
|
21107
|
+
else if (toRecord.parentItem && !fromRecord.parentItem) {
|
|
21108
|
+
let toRootParent = this.parent.connectorLineEditModule.getRootParent(toRecord);
|
|
21109
|
+
if (toRootParent.uniqueID === fromRecord.uniqueID) {
|
|
21110
|
+
return false;
|
|
21111
|
+
}
|
|
21112
|
+
}
|
|
21113
|
+
}
|
|
21114
|
+
}
|
|
21115
|
+
return true;
|
|
21116
|
+
}
|
|
20714
21117
|
/**
|
|
20715
21118
|
* To validate predecessor relations
|
|
20716
21119
|
*
|
|
@@ -20720,7 +21123,7 @@ class ConnectorLineEdit {
|
|
|
20720
21123
|
* @private
|
|
20721
21124
|
*/
|
|
20722
21125
|
validatePredecessorRelation(ganttRecord, predecessorString) {
|
|
20723
|
-
|
|
21126
|
+
let flag = true;
|
|
20724
21127
|
const recordId = this.parent.viewType === 'ResourceView' ? ganttRecord.ganttProperties.taskId
|
|
20725
21128
|
: ganttRecord.ganttProperties.rowUniqueID;
|
|
20726
21129
|
let predecessorIdArray;
|
|
@@ -20728,10 +21131,12 @@ class ConnectorLineEdit {
|
|
|
20728
21131
|
if (!isNullOrUndefined(predecessorString) && predecessorString.length > 0) {
|
|
20729
21132
|
predecessorIdArray = this.idFromPredecessor(predecessorString);
|
|
20730
21133
|
for (let count = 0; count < predecessorIdArray.length; count++) {
|
|
20731
|
-
|
|
20732
|
-
|
|
20733
|
-
|
|
20734
|
-
|
|
21134
|
+
if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this.parent.taskFields.id]) {
|
|
21135
|
+
let num = this.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
|
|
21136
|
+
let fromRecord = this.parent.currentViewData[num];
|
|
21137
|
+
if (fromRecord && ganttRecord) {
|
|
21138
|
+
flag = this.validateParentPredecessor(fromRecord, ganttRecord);
|
|
21139
|
+
}
|
|
20735
21140
|
}
|
|
20736
21141
|
// Check if predecessor exist more then one
|
|
20737
21142
|
const tempIdArray = predecessorIdArray.slice(0);
|
|
@@ -21786,7 +22191,7 @@ class Edit$2 {
|
|
|
21786
22191
|
this.parent.dataOperation.updateMappingData(ganttData, 'duration');
|
|
21787
22192
|
this.parent.dataOperation.updateMappingData(ganttData, 'endDate');
|
|
21788
22193
|
}
|
|
21789
|
-
else if (key ===
|
|
22194
|
+
else if (key === tasks.type) {
|
|
21790
22195
|
ganttObj.setRecordValue('taskType', data[key], ganttData.ganttProperties, true);
|
|
21791
22196
|
//this.parent.dataOperation.updateMappingData(ganttData, 'taskType');
|
|
21792
22197
|
}
|
|
@@ -22095,6 +22500,10 @@ class Edit$2 {
|
|
|
22095
22500
|
}
|
|
22096
22501
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
22097
22502
|
}
|
|
22503
|
+
if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
22504
|
+
(args.action === "DrawConnectorLine" || args.action === "DialogEditing")) {
|
|
22505
|
+
this.updateChildItems(ganttRecord);
|
|
22506
|
+
}
|
|
22098
22507
|
this.updateParentItemOnEditing();
|
|
22099
22508
|
}
|
|
22100
22509
|
/** Update parent up-to zeroth level */
|
|
@@ -22551,9 +22960,16 @@ class Edit$2 {
|
|
|
22551
22960
|
}
|
|
22552
22961
|
for (let index = 0; index < currentLength; index++) {
|
|
22553
22962
|
const recordIndex = [];
|
|
22554
|
-
|
|
22963
|
+
let resourceID = parseInt(currentResource[index][this.parent.resourceFields.id], 10).toString();
|
|
22964
|
+
if (resourceID === "NaN") {
|
|
22965
|
+
resourceID = currentResource[index][this.parent.resourceFields.id];
|
|
22966
|
+
}
|
|
22555
22967
|
for (let i = 0; i < prevResource.length; i++) {
|
|
22556
|
-
|
|
22968
|
+
let prevResourceID = parseInt(prevResource[i][this.parent.resourceFields.id], 10).toString();
|
|
22969
|
+
if (prevResourceID === "NaN") {
|
|
22970
|
+
prevResourceID = prevResource[i][this.parent.resourceFields.id];
|
|
22971
|
+
}
|
|
22972
|
+
if (prevResourceID === resourceID) {
|
|
22557
22973
|
recordIndex.push(i);
|
|
22558
22974
|
break;
|
|
22559
22975
|
}
|
|
@@ -22565,7 +22981,11 @@ class Edit$2 {
|
|
|
22565
22981
|
}
|
|
22566
22982
|
}
|
|
22567
22983
|
else {
|
|
22568
|
-
|
|
22984
|
+
let record1 = parseInt(recordIndex[0].toString(), 10);
|
|
22985
|
+
if (record1.toString() === "NaN") {
|
|
22986
|
+
record1 = recordIndex[0].toString();
|
|
22987
|
+
}
|
|
22988
|
+
prevResource.splice(record1, 1);
|
|
22569
22989
|
}
|
|
22570
22990
|
}
|
|
22571
22991
|
const prevLength = prevResource ? prevResource.length : 0;
|
|
@@ -22884,6 +23304,14 @@ class Edit$2 {
|
|
|
22884
23304
|
for (let j = 0; j < ids.length; j++) {
|
|
22885
23305
|
deleteRecords.push(this.parent.flatData[this.parent.ids.indexOf(ids[j].toString())]);
|
|
22886
23306
|
}
|
|
23307
|
+
deleteRecords.push(this.parent.flatData[this.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
23308
|
+
}
|
|
23309
|
+
else {
|
|
23310
|
+
const resourceParent = this.parent.flatData.filter((data) => {
|
|
23311
|
+
return (parseInt(data.ganttProperties.taskId) == parseInt(selectedRecords[i].ganttProperties.taskId) &&
|
|
23312
|
+
data.hasChildRecords);
|
|
23313
|
+
})[0];
|
|
23314
|
+
deleteRecords.push(resourceParent);
|
|
22887
23315
|
}
|
|
22888
23316
|
}
|
|
22889
23317
|
this.deleteRow(deleteRecords);
|
|
@@ -23330,6 +23758,14 @@ class Edit$2 {
|
|
|
23330
23758
|
eventArgs.modifiedTaskData = getTaskData(args.updatedRecordCollection, null, null, this.parent);
|
|
23331
23759
|
setValue('action', args.action, eventArgs);
|
|
23332
23760
|
this.parent.isOnDelete = false;
|
|
23761
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
23762
|
+
const updateUnAssignedResources = eventArgs.data.filter((data) => {
|
|
23763
|
+
return !data.hasChildRecords;
|
|
23764
|
+
});
|
|
23765
|
+
for (let i = 0; i < updateUnAssignedResources.length; i++) {
|
|
23766
|
+
this.checkWithUnassignedTask(updateUnAssignedResources[i]);
|
|
23767
|
+
}
|
|
23768
|
+
}
|
|
23333
23769
|
this.parent.trigger('actionComplete', eventArgs);
|
|
23334
23770
|
this.deletedTaskDetails = [];
|
|
23335
23771
|
this.parent.initiateEditAction(false);
|
|
@@ -23341,12 +23777,34 @@ class Edit$2 {
|
|
|
23341
23777
|
* @private
|
|
23342
23778
|
*/
|
|
23343
23779
|
getNewTaskId() {
|
|
23344
|
-
const
|
|
23345
|
-
|
|
23346
|
-
|
|
23780
|
+
const ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
23781
|
+
const maxId = ids.length;
|
|
23782
|
+
let newTaskId = maxId + 1;
|
|
23783
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
23784
|
+
if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
|
|
23785
|
+
newTaskId = newTaskId + 1;
|
|
23786
|
+
if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
|
|
23787
|
+
do {
|
|
23788
|
+
newTaskId = newTaskId + 1;
|
|
23789
|
+
} while (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1);
|
|
23790
|
+
}
|
|
23791
|
+
}
|
|
23347
23792
|
}
|
|
23348
23793
|
else {
|
|
23349
|
-
|
|
23794
|
+
if (ids.indexOf(newTaskId.toString()) != -1) {
|
|
23795
|
+
newTaskId = newTaskId + 1;
|
|
23796
|
+
if (ids.indexOf(newTaskId.toString()) != -1) {
|
|
23797
|
+
do {
|
|
23798
|
+
newTaskId = newTaskId + 1;
|
|
23799
|
+
} while (ids.indexOf(newTaskId.toString()) != -1);
|
|
23800
|
+
}
|
|
23801
|
+
}
|
|
23802
|
+
}
|
|
23803
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
23804
|
+
return newTaskId = newTaskId.toString();
|
|
23805
|
+
}
|
|
23806
|
+
else {
|
|
23807
|
+
return newTaskId;
|
|
23350
23808
|
}
|
|
23351
23809
|
}
|
|
23352
23810
|
/**
|
|
@@ -23359,6 +23817,7 @@ class Edit$2 {
|
|
|
23359
23817
|
prepareNewlyAddedData(obj, rowPosition) {
|
|
23360
23818
|
const taskModel = this.parent.taskFields;
|
|
23361
23819
|
let id;
|
|
23820
|
+
let newTaskIDmd;
|
|
23362
23821
|
const ids = this.parent.ids;
|
|
23363
23822
|
/*Validate Task Id of data*/
|
|
23364
23823
|
if (obj[taskModel.id]) {
|
|
@@ -23366,7 +23825,13 @@ class Edit$2 {
|
|
|
23366
23825
|
obj[taskModel.id] = null;
|
|
23367
23826
|
}
|
|
23368
23827
|
else {
|
|
23369
|
-
|
|
23828
|
+
if (typeof (obj[taskModel.id]) === "string") {
|
|
23829
|
+
newTaskIDmd = obj[taskModel.id];
|
|
23830
|
+
}
|
|
23831
|
+
else {
|
|
23832
|
+
newTaskIDmd = parseInt(obj[taskModel.id], 10);
|
|
23833
|
+
}
|
|
23834
|
+
obj[taskModel.id] = isNullOrUndefined(newTaskIDmd) ? null : newTaskIDmd;
|
|
23370
23835
|
}
|
|
23371
23836
|
}
|
|
23372
23837
|
if (!obj[taskModel.id]) {
|
|
@@ -23606,7 +24071,7 @@ class Edit$2 {
|
|
|
23606
24071
|
recordIndex = currentItemIndex + dataChildCount + 1;
|
|
23607
24072
|
//Expand Add record's parent item for project view
|
|
23608
24073
|
if (!this.addRowSelectedItem.expanded && !this.parent.enableMultiTaskbar) {
|
|
23609
|
-
this.parent.expandByID(
|
|
24074
|
+
this.parent.expandByID(this.addRowSelectedItem.ganttProperties.rowUniqueID);
|
|
23610
24075
|
}
|
|
23611
24076
|
updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem) +
|
|
23612
24077
|
this.getVisibleChildRecordCount(this.addRowSelectedItem, 0, currentViewData) + 1;
|
|
@@ -23646,6 +24111,10 @@ class Edit$2 {
|
|
|
23646
24111
|
/* Record collection update */
|
|
23647
24112
|
flatRecords.splice(recordIndex, 0, record);
|
|
23648
24113
|
currentViewData.splice(updatedCollectionIndex, 0, record);
|
|
24114
|
+
if (this.parent.viewType === 'ResourceView' && typeof (record.ganttProperties.taskId) === "number") {
|
|
24115
|
+
let taskString = record.ganttProperties.taskId;
|
|
24116
|
+
ids.push(taskString.toString());
|
|
24117
|
+
}
|
|
23649
24118
|
ids.splice(recordIndex, 0, record.ganttProperties.rowUniqueID.toString());
|
|
23650
24119
|
if (this.parent.viewType === 'ResourceView') {
|
|
23651
24120
|
const taskId = record.level === 0 ? 'R' + record.ganttProperties.taskId : 'T' + record.ganttProperties.taskId;
|
|
@@ -23849,6 +24318,7 @@ class Edit$2 {
|
|
|
23849
24318
|
* @private
|
|
23850
24319
|
*/
|
|
23851
24320
|
addRecord(data, rowPosition, rowIndex) {
|
|
24321
|
+
let tempTaskID = this.parent.taskFields.id;
|
|
23852
24322
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
23853
24323
|
this.parent.isDynamicData = true;
|
|
23854
24324
|
const cAddedRecord = [];
|
|
@@ -23870,6 +24340,12 @@ class Edit$2 {
|
|
|
23870
24340
|
args = this.constructTaskAddedEventArgs(cAddedRecord, this.parent.editedRecords, 'beforeAdd');
|
|
23871
24341
|
this.parent.showSpinner();
|
|
23872
24342
|
this.parent.trigger('actionBegin', args, (args) => {
|
|
24343
|
+
if (!isNullOrUndefined(args.data[tempTaskID])) {
|
|
24344
|
+
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
24345
|
+
args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
|
|
24346
|
+
args.newTaskData[tempTaskID] = args.data[tempTaskID];
|
|
24347
|
+
}
|
|
24348
|
+
}
|
|
23873
24349
|
if (!args.cancel) {
|
|
23874
24350
|
if (isRemoteData(this.parent.dataSource)) {
|
|
23875
24351
|
const data = this.parent.dataSource;
|
|
@@ -24928,10 +25404,13 @@ class Filter$1 {
|
|
|
24928
25404
|
this.parent.on('actionComplete', this.actionComplete, this);
|
|
24929
25405
|
this.parent.on('columnMenuOpen', this.columnMenuOpen, this);
|
|
24930
25406
|
}
|
|
25407
|
+
wireEvents(a) {
|
|
25408
|
+
EventHandler.add(document.getElementById(a), 'click', this.mouseClickHandler, this);
|
|
25409
|
+
}
|
|
24931
25410
|
initiateFiltering(column) {
|
|
24932
25411
|
const treeColumn = this.parent.getColumnByField(column.field, this.parent.treeGridModule.treeGridColumns);
|
|
24933
25412
|
column.allowFiltering = column.allowFiltering === false ? false : true;
|
|
24934
|
-
if (column.allowFiltering && this.parent.filterSettings.type === 'Menu' && !column.filter) {
|
|
25413
|
+
if (column.allowFiltering && (this.parent.filterSettings.type === 'Menu' || this.parent.filterSettings.type === 'Excel') && !column.filter) {
|
|
24935
25414
|
column.filter = { ui: this.getCustomFilterUi(column) };
|
|
24936
25415
|
}
|
|
24937
25416
|
if (treeColumn) {
|
|
@@ -24961,6 +25440,14 @@ class Filter$1 {
|
|
|
24961
25440
|
}
|
|
24962
25441
|
return filterUI;
|
|
24963
25442
|
}
|
|
25443
|
+
mouseClickHandler(e) {
|
|
25444
|
+
if (closest(e.target, ".e-excelfilter")) {
|
|
25445
|
+
this.parent.treeGrid.grid.notify("click", e);
|
|
25446
|
+
}
|
|
25447
|
+
}
|
|
25448
|
+
unWireEvents() {
|
|
25449
|
+
EventHandler.remove(this.parent.element, 'click', this.mouseClickHandler);
|
|
25450
|
+
}
|
|
24964
25451
|
getDatePickerFilter(columnName) {
|
|
24965
25452
|
const parent = this.parent;
|
|
24966
25453
|
const timeValue = (columnName === parent.taskFields.startDate) || (columnName === parent.taskFields.baselineStartDate)
|
|
@@ -25079,6 +25566,15 @@ class Filter$1 {
|
|
|
25079
25566
|
}
|
|
25080
25567
|
}
|
|
25081
25568
|
actionComplete(args) {
|
|
25569
|
+
if (!isNullOrUndefined(args['filterModel'])) {
|
|
25570
|
+
if (!isNullOrUndefined(args['filterModel']['dialogObj'])) {
|
|
25571
|
+
if (!isNullOrUndefined(args['filterModel']['dialogObj']['element'])) {
|
|
25572
|
+
if (this.parent.filterSettings.type === 'Excel') {
|
|
25573
|
+
this.wireEvents(args['filterModel']['dialogObj']['element'].id);
|
|
25574
|
+
}
|
|
25575
|
+
}
|
|
25576
|
+
}
|
|
25577
|
+
}
|
|
25082
25578
|
if (args.requestType === filterAfterOpen) {
|
|
25083
25579
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25084
25580
|
this.filterMenuElement = getValue('filterModel.dlgObj.element', args);
|
|
@@ -25096,12 +25592,15 @@ class Filter$1 {
|
|
|
25096
25592
|
if ((args.columnName === predecessor && isNullOrUndefined(getValue(predecessor, filterValues)))
|
|
25097
25593
|
|| (args.columnName === resource && isNullOrUndefined(getValue(resource, filterValues)))) {
|
|
25098
25594
|
const element = this.filterMenuElement.querySelector('.e-dropdownlist');
|
|
25099
|
-
|
|
25100
|
-
|
|
25101
|
-
|
|
25595
|
+
let instanceObj;
|
|
25596
|
+
if (!isNullOrUndefined(element)) {
|
|
25597
|
+
instanceObj = getValue('ej2_instances[0]', element);
|
|
25598
|
+
instanceObj.index = 2;
|
|
25599
|
+
instanceObj.dataBind();
|
|
25600
|
+
}
|
|
25102
25601
|
}
|
|
25103
25602
|
else if (args.columnName === taskID && isNullOrUndefined(getValue(taskID, filterValues)) && this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25104
|
-
const element = this.filterMenuElement.querySelector('.e-
|
|
25603
|
+
const element = this.filterMenuElement.querySelector('.e-flmenu-input');
|
|
25105
25604
|
const instanceObj = getValue('ej2_instances[0]', element);
|
|
25106
25605
|
if (!isNullOrUndefined(instanceObj) && isNullOrUndefined(this.parent.columnByField[args.columnName].format)) {
|
|
25107
25606
|
instanceObj.format = 'n';
|
|
@@ -25109,45 +25608,9 @@ class Filter$1 {
|
|
|
25109
25608
|
}
|
|
25110
25609
|
}
|
|
25111
25610
|
}
|
|
25112
|
-
setPosition(li, ul) {
|
|
25113
|
-
const gridPos = this.parent.element.getBoundingClientRect();
|
|
25114
|
-
const liPos = li.getBoundingClientRect();
|
|
25115
|
-
let left = liPos.right + window.scrollX;
|
|
25116
|
-
const top = liPos.top + window.scrollY;
|
|
25117
|
-
if (gridPos.right < (left + ul.offsetWidth)) {
|
|
25118
|
-
if ((liPos.left - ul.offsetWidth) > gridPos.left) {
|
|
25119
|
-
left = (liPos.left - ul.offsetWidth);
|
|
25120
|
-
}
|
|
25121
|
-
else {
|
|
25122
|
-
left -= (left + ul.offsetWidth) - gridPos.right;
|
|
25123
|
-
}
|
|
25124
|
-
}
|
|
25125
|
-
ul.style.top = top + 'px';
|
|
25126
|
-
ul.style.left = left + 'px';
|
|
25127
|
-
}
|
|
25128
25611
|
updateFilterMenuPosition(element, args) {
|
|
25129
25612
|
addClass([element], 'e-gantt');
|
|
25130
|
-
document.querySelector('#' + this.parent.
|
|
25131
|
-
let targetElement;
|
|
25132
|
-
if (this.parent.showColumnMenu) {
|
|
25133
|
-
targetElement = document.querySelector('#treeGrid' + this.parent.controlId + '_gridcontrol_colmenu_Filter');
|
|
25134
|
-
element.style.zIndex = targetElement.parentElement.style.zIndex;
|
|
25135
|
-
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25136
|
-
this.setPosition(targetElement, getValue('filterModel.dlgObj.element', args));
|
|
25137
|
-
}
|
|
25138
|
-
else {
|
|
25139
|
-
this.setPosition(targetElement, getValue('filterModel.dialogObj.element', args));
|
|
25140
|
-
}
|
|
25141
|
-
}
|
|
25142
|
-
else {
|
|
25143
|
-
targetElement = this.parent.treeGrid.grid.getColumnHeaderByField(args.columnName).querySelector('.e-filtermenudiv');
|
|
25144
|
-
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25145
|
-
getFilterMenuPostion(targetElement, getValue('filterModel.dlgObj', args));
|
|
25146
|
-
}
|
|
25147
|
-
else {
|
|
25148
|
-
getFilterMenuPostion(targetElement, getValue('filterModel.dialogObj', args));
|
|
25149
|
-
}
|
|
25150
|
-
}
|
|
25613
|
+
document.querySelector('#' + this.parent.treeGrid.grid.element.id).appendChild(element);
|
|
25151
25614
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25152
25615
|
element.querySelector('.e-valid-input').focus();
|
|
25153
25616
|
}
|
|
@@ -25168,6 +25631,7 @@ class Filter$1 {
|
|
|
25168
25631
|
*/
|
|
25169
25632
|
destroy() {
|
|
25170
25633
|
this.removeEventListener();
|
|
25634
|
+
this.unWireEvents();
|
|
25171
25635
|
}
|
|
25172
25636
|
}
|
|
25173
25637
|
|
|
@@ -26171,7 +26635,7 @@ class Toolbar$3 {
|
|
|
26171
26635
|
const isDeleteSelected = gObj.selectionModule ? gObj.selectionModule.selectedRowIndexes.length > 0 ||
|
|
26172
26636
|
gObj.selectionModule.getSelectedRowCellIndexes().length > 0 ? true : false : false;
|
|
26173
26637
|
// eslint-disable-next-line
|
|
26174
|
-
edit.allowDeleting &&
|
|
26638
|
+
edit.allowDeleting && hasData && isDeleteSelected && !touchEdit ?
|
|
26175
26639
|
enableItems.push(gID + '_delete') : disableItems.push(gID + '_delete');
|
|
26176
26640
|
if (gObj.editSettings.mode === 'Auto' && !isNullOrUndefined(gObj.editModule.cellEditModule)
|
|
26177
26641
|
&& gObj.editModule.cellEditModule.isCellEdit) {
|
|
@@ -26282,7 +26746,6 @@ class NonWorkingDay {
|
|
|
26282
26746
|
this.nonworkingContainer = createElement('div', {
|
|
26283
26747
|
className: nonworkingContainer
|
|
26284
26748
|
});
|
|
26285
|
-
this.nonworkingContainer.setAttribute("role", "NonWorkingDays");
|
|
26286
26749
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer);
|
|
26287
26750
|
}
|
|
26288
26751
|
}
|
|
@@ -26488,7 +26951,7 @@ class EventMarker$1 {
|
|
|
26488
26951
|
this.eventMarkersContainer = createElement('div', {
|
|
26489
26952
|
className: eventMarkersContainer
|
|
26490
26953
|
});
|
|
26491
|
-
this.eventMarkersContainer.setAttribute("role", "
|
|
26954
|
+
this.eventMarkersContainer.setAttribute("role", "term");
|
|
26492
26955
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer);
|
|
26493
26956
|
}
|
|
26494
26957
|
this.eventMarkersContainer.innerHTML = '';
|
|
@@ -26641,7 +27104,7 @@ class CriticalPath {
|
|
|
26641
27104
|
showCriticalPath(isCritical) {
|
|
26642
27105
|
const modelIds = this.parent.ids;
|
|
26643
27106
|
const totalRecords = this.parent.flatData;
|
|
26644
|
-
if (isCritical && this.parent.flatData.length > 0
|
|
27107
|
+
if (isCritical && this.parent.flatData.length > 0) {
|
|
26645
27108
|
this.parent.enableCriticalPath = true;
|
|
26646
27109
|
const parentRecords = this.parent.treeGrid.parentData;
|
|
26647
27110
|
let checkEndDateTaskid;
|
|
@@ -26686,12 +27149,12 @@ class CriticalPath {
|
|
|
26686
27149
|
totalRecords[j].slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
26687
27150
|
totalRecords[j].ganttProperties.slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
26688
27151
|
if (totalRecords[j].ganttProperties.endDate >= checkEndDate) {
|
|
26689
|
-
checkBeyondEnddate.push(
|
|
27152
|
+
checkBeyondEnddate.push(totalRecords[j].ganttProperties.taskId);
|
|
26690
27153
|
}
|
|
26691
27154
|
if (totalRecords[j].ganttProperties.predecessor) {
|
|
26692
27155
|
if (totalRecords[j].ganttProperties.predecessor.length !== 0) {
|
|
26693
27156
|
totalPredecessorsCollection.push(totalRecords[j]);
|
|
26694
|
-
totalPredecessorsCollectionId.push(
|
|
27157
|
+
totalPredecessorsCollectionId.push((totalRecords[j].ganttProperties.taskId));
|
|
26695
27158
|
}
|
|
26696
27159
|
}
|
|
26697
27160
|
}
|
|
@@ -26707,7 +27170,14 @@ class CriticalPath {
|
|
|
26707
27170
|
predecessorIndex = modelIds.indexOf(checkBeyondEnddate[k].toString());
|
|
26708
27171
|
}
|
|
26709
27172
|
else {
|
|
26710
|
-
|
|
27173
|
+
let currentRecords = this.parent.currentViewData.filter((data) => {
|
|
27174
|
+
return parseInt(data.ganttProperties.taskId) == checkBeyondEnddate[k];
|
|
27175
|
+
});
|
|
27176
|
+
for (let i = 0; i < currentRecords.length; i++) {
|
|
27177
|
+
if (!currentRecords[i].hasChildRecords && currentRecords[i].ganttProperties.endDate >= this.maxEndDate) {
|
|
27178
|
+
predecessorIndex = currentRecords[i].index;
|
|
27179
|
+
}
|
|
27180
|
+
}
|
|
26711
27181
|
}
|
|
26712
27182
|
if (totalRecords[predecessorIndex].ganttProperties.progress < 100) {
|
|
26713
27183
|
totalRecords[predecessorIndex].isCritical = true;
|
|
@@ -26728,12 +27198,22 @@ class CriticalPath {
|
|
|
26728
27198
|
let from = -1;
|
|
26729
27199
|
let toPredecessor = -1;
|
|
26730
27200
|
let fromPredecessor = -1;
|
|
27201
|
+
let tempTaskId;
|
|
26731
27202
|
const currentIndex = x;
|
|
26732
27203
|
const predecessor = totalPredecessorsCollection[x].ganttProperties.predecessor;
|
|
26733
27204
|
const individualPredecessorLength = totalPredecessorsCollection[x].ganttProperties.predecessor.length;
|
|
26734
|
-
const taskid = (
|
|
27205
|
+
const taskid = ((totalPredecessorsCollection[x].ganttProperties.taskId));
|
|
26735
27206
|
for (let y = 0; y < individualPredecessorLength; y++) {
|
|
26736
|
-
if (
|
|
27207
|
+
if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) != "string") {
|
|
27208
|
+
tempTaskId = parseInt((predecessor[y].from), 10);
|
|
27209
|
+
}
|
|
27210
|
+
else if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) === "string") {
|
|
27211
|
+
tempTaskId = predecessor[y].from;
|
|
27212
|
+
}
|
|
27213
|
+
else {
|
|
27214
|
+
tempTaskId = predecessor[y].from;
|
|
27215
|
+
}
|
|
27216
|
+
if (tempTaskId === taskid) {
|
|
26737
27217
|
if (to === -1) {
|
|
26738
27218
|
if (!predecessor[y].offset) {
|
|
26739
27219
|
to = predecessor[y].to;
|
|
@@ -26755,7 +27235,16 @@ class CriticalPath {
|
|
|
26755
27235
|
}
|
|
26756
27236
|
}
|
|
26757
27237
|
}
|
|
26758
|
-
if (
|
|
27238
|
+
if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) != "string") {
|
|
27239
|
+
tempTaskId = parseInt((predecessor[y].to), 10);
|
|
27240
|
+
}
|
|
27241
|
+
else if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) === "string") {
|
|
27242
|
+
tempTaskId = predecessor[y].to;
|
|
27243
|
+
}
|
|
27244
|
+
else {
|
|
27245
|
+
tempTaskId = predecessor[y].to;
|
|
27246
|
+
}
|
|
27247
|
+
if (tempTaskId === taskid) {
|
|
26759
27248
|
if (from === -1) {
|
|
26760
27249
|
if (!predecessor[y].offset) {
|
|
26761
27250
|
from = predecessor[y].from;
|
|
@@ -26824,7 +27313,7 @@ class CriticalPath {
|
|
|
26824
27313
|
this.detailPredecessorCollection = collection;
|
|
26825
27314
|
this.predecessorCollectionTaskIds = collectionTaskId;
|
|
26826
27315
|
}
|
|
26827
|
-
if (isCritical === false && this.parent.flatData.length > 0
|
|
27316
|
+
if (isCritical === false && this.parent.flatData.length > 0) {
|
|
26828
27317
|
let pathIndex;
|
|
26829
27318
|
this.parent.enableCriticalPath = false;
|
|
26830
27319
|
for (let z = 0; z < this.criticalPathCollection.length; z++) {
|
|
@@ -26840,6 +27329,8 @@ class CriticalPath {
|
|
|
26840
27329
|
slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, flatRecords, modelRecordIds) {
|
|
26841
27330
|
const fromDateArray = fromDataObject[0]['fromdata'].split(',');
|
|
26842
27331
|
const fromDataPredecessor = fromDataObject[0]['fromDataPredecessor'].split(',');
|
|
27332
|
+
collectionTaskId = collectionTaskId.toString();
|
|
27333
|
+
collectionTaskId = collectionTaskId.split(',');
|
|
26843
27334
|
let fromDateArray1 = [];
|
|
26844
27335
|
let fromTaskIdIndex;
|
|
26845
27336
|
let indexFromTaskId;
|
|
@@ -26851,8 +27342,8 @@ class CriticalPath {
|
|
|
26851
27342
|
let ffslack;
|
|
26852
27343
|
for (let i = 0; i < fromDateArray.length; i++) {
|
|
26853
27344
|
fromDateArray1 = fromDateArray[i].split(':');
|
|
26854
|
-
fromTaskIdIndex = collectionTaskId.indexOf(
|
|
26855
|
-
totaskId = collectionTaskId.indexOf(
|
|
27345
|
+
fromTaskIdIndex = collectionTaskId.indexOf((fromDateArray1[0].toString()));
|
|
27346
|
+
totaskId = collectionTaskId.indexOf((fromDataObject[0]['todateID'].toString()));
|
|
26856
27347
|
if (this.parent.viewType === 'ProjectView') {
|
|
26857
27348
|
indexFromTaskId = modelRecordIds.indexOf(fromDateArray1[0].toString());
|
|
26858
27349
|
indexToTaskId = modelRecordIds.indexOf(fromDataObject[0]['todateID'].toString());
|
|
@@ -27197,6 +27688,7 @@ class CriticalPath {
|
|
|
27197
27688
|
finalCriticalPath(collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
|
|
27198
27689
|
let criticalPathIds = [];
|
|
27199
27690
|
let index;
|
|
27691
|
+
let predecessorFrom;
|
|
27200
27692
|
for (let x = collection.length - 1; x >= 0; x--) {
|
|
27201
27693
|
if (this.parent.viewType === 'ProjectView') {
|
|
27202
27694
|
index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
|
|
@@ -27240,7 +27732,13 @@ class CriticalPath {
|
|
|
27240
27732
|
/* eslint-disable-next-line */
|
|
27241
27733
|
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.endDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27242
27734
|
}
|
|
27243
|
-
if (
|
|
27735
|
+
if (typeof (flatRecords[index][this.parent.taskFields.id]) === 'number') {
|
|
27736
|
+
predecessorFrom = parseInt(predecessorLength[i].from, 10);
|
|
27737
|
+
}
|
|
27738
|
+
else {
|
|
27739
|
+
predecessorFrom = predecessorLength[i].from;
|
|
27740
|
+
}
|
|
27741
|
+
if (predecessorFrom === flatRecords[index][this.parent.taskFields.id] &&
|
|
27244
27742
|
flatRecords[toID].slack === noSlackValue && dateDifference <= 0) {
|
|
27245
27743
|
flatRecords[index].slack = noSlackValue;
|
|
27246
27744
|
flatRecords[index].ganttProperties.slack = noSlackValue;
|
|
@@ -27278,15 +27776,35 @@ class CriticalPath {
|
|
|
27278
27776
|
for (let i = 0; i < criticalPathIds.length; i++) {
|
|
27279
27777
|
let criticalData;
|
|
27280
27778
|
if (this.parent.viewType === 'ProjectView') {
|
|
27281
|
-
criticalData = this.parent.
|
|
27779
|
+
criticalData = this.parent.currentViewData[this.parent.ids.indexOf(criticalPathIds[i].toString())];
|
|
27282
27780
|
}
|
|
27283
27781
|
else {
|
|
27284
|
-
|
|
27782
|
+
let currentRecords = this.parent.currentViewData.filter((data) => {
|
|
27783
|
+
return (data.ganttProperties.taskId).toString() == criticalPathIds[i].toString();
|
|
27784
|
+
});
|
|
27785
|
+
for (let i = 0; i < currentRecords.length; i++) {
|
|
27786
|
+
if (currentRecords[i].ganttProperties.isCritical || currentRecords[i].ganttProperties.endDate >= this.maxEndDate) {
|
|
27787
|
+
criticalData = currentRecords[i];
|
|
27788
|
+
}
|
|
27789
|
+
}
|
|
27285
27790
|
}
|
|
27286
27791
|
const index = this.parent.currentViewData.indexOf(criticalData);
|
|
27287
27792
|
const element = this.parent.getRowByIndex(index);
|
|
27288
27793
|
let taskClass;
|
|
27289
27794
|
const columnFields = this.parent.taskFields;
|
|
27795
|
+
if (criticalData.parentItem) {
|
|
27796
|
+
const parentRecord = this.parent.currentViewData.filter((data) => {
|
|
27797
|
+
return criticalData.parentItem.uniqueID == data.uniqueID;
|
|
27798
|
+
});
|
|
27799
|
+
const parentIndex = this.parent.currentViewData.indexOf(parentRecord[0]);
|
|
27800
|
+
const parentElement = this.parent.getRowByIndex(parentIndex);
|
|
27801
|
+
let parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
|
|
27802
|
+
for (let i = 0; i < parentTaskbarElement.length; i++) {
|
|
27803
|
+
if (parentTaskbarElement[i].getAttribute('rowuniqueid') == criticalData['rowUniqueID']) {
|
|
27804
|
+
addClass(parentTaskbarElement[i].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
27805
|
+
}
|
|
27806
|
+
}
|
|
27807
|
+
}
|
|
27290
27808
|
/* eslint-disable-next-line */
|
|
27291
27809
|
if (this.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
27292
27810
|
taskClass = criticalUnscheduledTask;
|
|
@@ -27294,7 +27812,8 @@ class CriticalPath {
|
|
|
27294
27812
|
else {
|
|
27295
27813
|
taskClass = criticalChildProgressBarInnerDiv;
|
|
27296
27814
|
}
|
|
27297
|
-
if (element
|
|
27815
|
+
if (element && (this.parent.viewType === 'ProjectView' || (this.parent.viewType === 'ResourceView' &&
|
|
27816
|
+
!criticalData.hasChildRecords))) {
|
|
27298
27817
|
if (element.getElementsByClassName('e-milestone-top')[0]) {
|
|
27299
27818
|
addClass(element.querySelectorAll('.e-milestone-top'), criticalMilestoneTop);
|
|
27300
27819
|
}
|
|
@@ -27314,13 +27833,22 @@ class CriticalPath {
|
|
|
27314
27833
|
let currentdata;
|
|
27315
27834
|
let checking = [];
|
|
27316
27835
|
let checkint;
|
|
27836
|
+
let values;
|
|
27317
27837
|
for (let i = 0; i < this.criticalPathCollection.length; i++) {
|
|
27318
27838
|
index = collectionTaskId.indexOf(this.criticalPathCollection[i]);
|
|
27319
27839
|
currentdata = collection[index];
|
|
27320
27840
|
if (index !== -1 && currentdata['to']) {
|
|
27321
27841
|
checking = currentdata['to'].split(',');
|
|
27322
27842
|
for (let j = 0; j < checking.length; j++) {
|
|
27323
|
-
|
|
27843
|
+
values = checking[j].split('+');
|
|
27844
|
+
if (checking[j].indexOf('-') >= 0) {
|
|
27845
|
+
values = checking[j].split('-');
|
|
27846
|
+
|
|
27847
|
+
}
|
|
27848
|
+
checkint = (values[0].replace(":", ""));
|
|
27849
|
+
if (typeof (criticalPathIds[j]) === "number") {
|
|
27850
|
+
checkint = parseInt(values[0], 10);
|
|
27851
|
+
}
|
|
27324
27852
|
if (criticalPathIds.indexOf(checkint) !== -1) {
|
|
27325
27853
|
const lineElement = this.parent.element.querySelectorAll('#ConnectorLineparent' +
|
|
27326
27854
|
currentdata['taskid'] + 'child' + checkint);
|
|
@@ -27450,7 +27978,12 @@ class ContextMenu$2 {
|
|
|
27450
27978
|
}
|
|
27451
27979
|
switch (this.item) {
|
|
27452
27980
|
case 'TaskInformation':
|
|
27453
|
-
|
|
27981
|
+
if (isNaN(Number(this.rowData.ganttProperties.rowUniqueID))) {
|
|
27982
|
+
this.parent.openEditDialog(this.rowData.ganttProperties.rowUniqueID);
|
|
27983
|
+
}
|
|
27984
|
+
else {
|
|
27985
|
+
this.parent.openEditDialog(Number(this.rowData.ganttProperties.rowUniqueID));
|
|
27986
|
+
}
|
|
27454
27987
|
break;
|
|
27455
27988
|
case 'Above':
|
|
27456
27989
|
case 'Below':
|
|
@@ -28253,7 +28786,7 @@ class RowDD$1 {
|
|
|
28253
28786
|
}
|
|
28254
28787
|
rowDragStartHelper(args) {
|
|
28255
28788
|
this.parent.trigger('rowDragStartHelper', args);
|
|
28256
|
-
if (this.parent.readOnly
|
|
28789
|
+
if (this.parent.readOnly) {
|
|
28257
28790
|
args.cancel = true;
|
|
28258
28791
|
}
|
|
28259
28792
|
if (this.parent.viewType === 'ResourceView' && getValue('level', args.data[0]) === 0) {
|
|
@@ -28475,6 +29008,62 @@ class RowDD$1 {
|
|
|
28475
29008
|
this.updateSharedResourceTask();
|
|
28476
29009
|
}
|
|
28477
29010
|
}
|
|
29011
|
+
if (this.parent.taskFields.dependency) {
|
|
29012
|
+
let isValidPredecessor = true;
|
|
29013
|
+
let draggedParent;
|
|
29014
|
+
let toParent;
|
|
29015
|
+
if (draggedRecord.parentItem) {
|
|
29016
|
+
draggedParent = this.parent.currentViewData[this.parent.ids.indexOf(draggedRecord.parentItem.taskId)];
|
|
29017
|
+
}
|
|
29018
|
+
else {
|
|
29019
|
+
draggedParent = draggedRecord;
|
|
29020
|
+
}
|
|
29021
|
+
if (droppedRecord.parentItem) {
|
|
29022
|
+
toParent = this.parent.currentViewData[this.parent.ids.indexOf(droppedRecord.parentItem.taskId)];
|
|
29023
|
+
}
|
|
29024
|
+
else {
|
|
29025
|
+
toParent = droppedRecord;
|
|
29026
|
+
}
|
|
29027
|
+
let validateRecords;
|
|
29028
|
+
if (toParent.uniqueID === draggedParent.uniqueID || (draggedParent.parentItem &&
|
|
29029
|
+
toParent.uniqueID == this.parent.currentViewData[this.parent.ids.indexOf(draggedParent.parentItem.taskId)].uniqueID)) {
|
|
29030
|
+
validateRecords = this.parent.currentViewData.filter((data) => {
|
|
29031
|
+
if ((data.ganttProperties.predecessor && data.ganttProperties.predecessor.length > 0)) {
|
|
29032
|
+
for (let i = 0; i < data.ganttProperties.predecessor.length; i++) {
|
|
29033
|
+
return (parseInt(data.ganttProperties.predecessor[i].to) === parseInt(toParent.ganttProperties.taskId) ||
|
|
29034
|
+
parseInt(data.ganttProperties.predecessor[i].from) === parseInt(toParent.ganttProperties.taskId));
|
|
29035
|
+
}
|
|
29036
|
+
}
|
|
29037
|
+
return null;
|
|
29038
|
+
});
|
|
29039
|
+
let predName = [];
|
|
29040
|
+
for (let i = 0; i < validateRecords.length; i++) {
|
|
29041
|
+
predName = [];
|
|
29042
|
+
if (validateRecords[i].ganttProperties.predecessor) {
|
|
29043
|
+
for (let k = 0; k < validateRecords[i].ganttProperties.predecessor.length; k++) {
|
|
29044
|
+
if (parseInt(validateRecords[i].ganttProperties.taskId) !==
|
|
29045
|
+
parseInt(validateRecords[i].ganttProperties.predecessor[k].from)) {
|
|
29046
|
+
predName.push(validateRecords[i].ganttProperties.predecessor[k].from);
|
|
29047
|
+
}
|
|
29048
|
+
else {
|
|
29049
|
+
predName.push(validateRecords[i].ganttProperties.predecessor[k].to);
|
|
29050
|
+
}
|
|
29051
|
+
}
|
|
29052
|
+
}
|
|
29053
|
+
for (let j = 0; j < predName.length; j++) {
|
|
29054
|
+
let name = predName[j].replace(/\D/g, '');
|
|
29055
|
+
let toRec = this.parent.currentViewData.filter((data) => {
|
|
29056
|
+
return parseInt(data.ganttProperties.taskId) == parseInt(name);
|
|
29057
|
+
});
|
|
29058
|
+
isValidPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(validateRecords[i], toRec[0]);
|
|
29059
|
+
if (!isValidPredecessor) {
|
|
29060
|
+
this.parent.dataOperation['resetDependency'](validateRecords[i]);
|
|
29061
|
+
this.parent.dataOperation['resetDependency'](toRec[0]);
|
|
29062
|
+
}
|
|
29063
|
+
}
|
|
29064
|
+
}
|
|
29065
|
+
}
|
|
29066
|
+
}
|
|
28478
29067
|
// method to update the edited parent records
|
|
28479
29068
|
for (let j = 0; j < this.updateParentRecords.length; j++) {
|
|
28480
29069
|
this.parent.dataOperation.updateParentItems(this.updateParentRecords[j]);
|
|
@@ -28855,7 +29444,7 @@ class RowDD$1 {
|
|
|
28855
29444
|
}
|
|
28856
29445
|
let idx;
|
|
28857
29446
|
const ganttData = dataSource.length > 0 && this.parent.viewType !== 'ResourceView' ?
|
|
28858
|
-
dataSource : this.parent.
|
|
29447
|
+
dataSource : this.parent.flatData;
|
|
28859
29448
|
for (let i = 0; i < ganttData.length; i++) {
|
|
28860
29449
|
if (this.parent.viewType === 'ResourceView') {
|
|
28861
29450
|
if (ganttData[i].ganttProperties.rowUniqueID === deletedRow.ganttProperties.rowUniqueID) {
|
|
@@ -32176,215 +32765,217 @@ class PdfGanttPredecessor {
|
|
|
32176
32765
|
let childPageData;
|
|
32177
32766
|
let parentY = 0;
|
|
32178
32767
|
let childY = 0;
|
|
32179
|
-
|
|
32180
|
-
|
|
32181
|
-
|
|
32182
|
-
startPage
|
|
32183
|
-
|
|
32184
|
-
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
if (this.
|
|
32188
|
-
|
|
32768
|
+
if (childTask && parentTask) {
|
|
32769
|
+
switch (this.type) {
|
|
32770
|
+
case 'FS':
|
|
32771
|
+
if (childTask.startPage > -1 && parentTask.endPage > -1) {
|
|
32772
|
+
startPage = pages[parentTask.endPage];
|
|
32773
|
+
endPage = pages[childTask.startPage];
|
|
32774
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
32775
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
32776
|
+
if (this.parentIndex < this.childIndex) {
|
|
32777
|
+
if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
|
|
32778
|
+
predecessorType = 'FSType1';
|
|
32779
|
+
}
|
|
32780
|
+
else {
|
|
32781
|
+
predecessorType = 'FSType2';
|
|
32782
|
+
}
|
|
32189
32783
|
}
|
|
32190
32784
|
else {
|
|
32191
|
-
|
|
32785
|
+
if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
|
|
32786
|
+
predecessorType = 'FSType3';
|
|
32787
|
+
}
|
|
32788
|
+
else {
|
|
32789
|
+
predecessorType = 'FSType4';
|
|
32790
|
+
}
|
|
32192
32791
|
}
|
|
32193
32792
|
}
|
|
32194
32793
|
else {
|
|
32195
|
-
|
|
32196
|
-
predecessorType = 'FSType3';
|
|
32197
|
-
}
|
|
32198
|
-
else {
|
|
32199
|
-
predecessorType = 'FSType4';
|
|
32200
|
-
}
|
|
32794
|
+
return;
|
|
32201
32795
|
}
|
|
32202
|
-
|
|
32203
|
-
|
|
32204
|
-
|
|
32205
|
-
|
|
32206
|
-
|
|
32207
|
-
|
|
32208
|
-
|
|
32209
|
-
|
|
32210
|
-
|
|
32211
|
-
|
|
32212
|
-
|
|
32213
|
-
|
|
32214
|
-
|
|
32215
|
-
|
|
32796
|
+
break;
|
|
32797
|
+
case 'SF':
|
|
32798
|
+
if (childTask.endPage > -1 && parentTask.startPage > -1) {
|
|
32799
|
+
startPage = pages[parentTask.startPage];
|
|
32800
|
+
endPage = pages[childTask.endPage];
|
|
32801
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
32802
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
32803
|
+
if (this.parentIndex < this.childIndex) {
|
|
32804
|
+
if (this.parentLeft > this.childLeft + this.childWidth) {
|
|
32805
|
+
predecessorType = 'SFType1';
|
|
32806
|
+
}
|
|
32807
|
+
else {
|
|
32808
|
+
predecessorType = 'SFType2';
|
|
32809
|
+
}
|
|
32216
32810
|
}
|
|
32217
32811
|
else {
|
|
32218
|
-
|
|
32812
|
+
if (this.parentLeft > this.childLeft + this.childWidth) {
|
|
32813
|
+
predecessorType = 'SFType3';
|
|
32814
|
+
}
|
|
32815
|
+
else {
|
|
32816
|
+
predecessorType = 'SFType4';
|
|
32817
|
+
}
|
|
32219
32818
|
}
|
|
32220
32819
|
}
|
|
32221
32820
|
else {
|
|
32222
|
-
|
|
32223
|
-
predecessorType = 'SFType3';
|
|
32224
|
-
}
|
|
32225
|
-
else {
|
|
32226
|
-
predecessorType = 'SFType4';
|
|
32227
|
-
}
|
|
32821
|
+
return;
|
|
32228
32822
|
}
|
|
32229
|
-
|
|
32230
|
-
|
|
32231
|
-
|
|
32232
|
-
|
|
32233
|
-
|
|
32234
|
-
|
|
32235
|
-
|
|
32236
|
-
|
|
32237
|
-
|
|
32238
|
-
|
|
32239
|
-
|
|
32240
|
-
|
|
32241
|
-
|
|
32242
|
-
|
|
32823
|
+
break;
|
|
32824
|
+
case 'FF':
|
|
32825
|
+
if (childTask.endPage > -1 && parentTask.endPage > -1) {
|
|
32826
|
+
startPage = pages[parentTask.endPage];
|
|
32827
|
+
endPage = pages[childTask.endPage];
|
|
32828
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
32829
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.endPage - pdfGantt.chartPageIndex];
|
|
32830
|
+
if (this.parentIndex < this.childIndex) {
|
|
32831
|
+
if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
|
|
32832
|
+
predecessorType = 'FFType1';
|
|
32833
|
+
}
|
|
32834
|
+
else {
|
|
32835
|
+
predecessorType = 'FFType2';
|
|
32836
|
+
}
|
|
32243
32837
|
}
|
|
32244
32838
|
else {
|
|
32245
|
-
|
|
32839
|
+
if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
|
|
32840
|
+
predecessorType = 'FFType3';
|
|
32841
|
+
}
|
|
32842
|
+
else {
|
|
32843
|
+
predecessorType = 'FFType4';
|
|
32844
|
+
}
|
|
32246
32845
|
}
|
|
32247
32846
|
}
|
|
32248
32847
|
else {
|
|
32249
|
-
|
|
32250
|
-
predecessorType = 'FFType3';
|
|
32251
|
-
}
|
|
32252
|
-
else {
|
|
32253
|
-
predecessorType = 'FFType4';
|
|
32254
|
-
}
|
|
32848
|
+
return;
|
|
32255
32849
|
}
|
|
32256
|
-
|
|
32257
|
-
|
|
32258
|
-
|
|
32259
|
-
|
|
32260
|
-
|
|
32261
|
-
|
|
32262
|
-
|
|
32263
|
-
|
|
32264
|
-
|
|
32265
|
-
|
|
32266
|
-
|
|
32267
|
-
|
|
32268
|
-
|
|
32269
|
-
|
|
32850
|
+
break;
|
|
32851
|
+
case 'SS':
|
|
32852
|
+
if (childTask.startPage > -1 && parentTask.startPage > -1) {
|
|
32853
|
+
startPage = pages[parentTask.startPage];
|
|
32854
|
+
endPage = pages[childTask.startPage];
|
|
32855
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.startPage - pdfGantt.chartPageIndex];
|
|
32856
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
32857
|
+
if (this.parentIndex < this.childIndex) {
|
|
32858
|
+
if (this.parentLeft >= this.childLeft) {
|
|
32859
|
+
predecessorType = 'SSType1';
|
|
32860
|
+
}
|
|
32861
|
+
else {
|
|
32862
|
+
predecessorType = 'SSType2';
|
|
32863
|
+
}
|
|
32270
32864
|
}
|
|
32271
32865
|
else {
|
|
32272
|
-
|
|
32866
|
+
if (this.parentLeft >= this.childLeft) {
|
|
32867
|
+
predecessorType = 'SSType3';
|
|
32868
|
+
}
|
|
32869
|
+
else {
|
|
32870
|
+
predecessorType = 'SSType4';
|
|
32871
|
+
}
|
|
32273
32872
|
}
|
|
32274
32873
|
}
|
|
32275
32874
|
else {
|
|
32276
|
-
|
|
32277
|
-
predecessorType = 'SSType3';
|
|
32278
|
-
}
|
|
32279
|
-
else {
|
|
32280
|
-
predecessorType = 'SSType4';
|
|
32281
|
-
}
|
|
32875
|
+
return;
|
|
32282
32876
|
}
|
|
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
|
-
|
|
32375
|
-
|
|
32376
|
-
|
|
32377
|
-
|
|
32378
|
-
|
|
32379
|
-
|
|
32380
|
-
|
|
32381
|
-
|
|
32382
|
-
|
|
32383
|
-
|
|
32384
|
-
|
|
32385
|
-
point6 = sspoint4;
|
|
32386
|
-
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32387
|
-
break;
|
|
32877
|
+
break;
|
|
32878
|
+
}
|
|
32879
|
+
let midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
|
|
32880
|
+
midPoint = pixelToPoint(midPoint);
|
|
32881
|
+
/* eslint-disable-next-line */
|
|
32882
|
+
let point1, point2, point3, point4, point5, point6;
|
|
32883
|
+
point1 = point2 = point3 = point4 = point5 = point6 = new PointF();
|
|
32884
|
+
const parentTaskpoint = Object.assign({}, parentTask.taskStartPoint);
|
|
32885
|
+
const childTaskpoint = Object.assign({}, childTask.taskStartPoint);
|
|
32886
|
+
parentY = parentTaskpoint.y + parentPageData.startPoint.y;
|
|
32887
|
+
childY = childTaskpoint.y + childPageData.startPoint.y;
|
|
32888
|
+
const ffpoint1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth), parentY + midPoint);
|
|
32889
|
+
const sspoint1 = new PointF(pixelToPoint(this.parentLeft) - 1, parentY + midPoint);
|
|
32890
|
+
const ffpoint3 = new PointF(pixelToPoint(this.childLeft - 20), childY + midPoint);
|
|
32891
|
+
const ffpoint4 = new PointF(pixelToPoint(this.childLeft - 6 - this.lineWidth) - 1, childY + midPoint);
|
|
32892
|
+
const sspoint4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 6 + this.lineWidth) + 1, childY + midPoint);
|
|
32893
|
+
switch (predecessorType) {
|
|
32894
|
+
case 'FSType1':
|
|
32895
|
+
case 'FSType3':
|
|
32896
|
+
point1 = ffpoint1;
|
|
32897
|
+
point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
|
|
32898
|
+
point3 = ffpoint3;
|
|
32899
|
+
point4 = ffpoint4;
|
|
32900
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32901
|
+
break;
|
|
32902
|
+
case 'FSType2':
|
|
32903
|
+
point1 = ffpoint1;
|
|
32904
|
+
point2 = new PointF(point1.x + 10, parentY + midPoint);
|
|
32905
|
+
point3 = new PointF(point1.x + 10, childY + 2);
|
|
32906
|
+
point4 = new PointF(pixelToPoint(this.childLeft - 20), childY + 2);
|
|
32907
|
+
point5 = ffpoint3;
|
|
32908
|
+
point6 = ffpoint4;
|
|
32909
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32910
|
+
break;
|
|
32911
|
+
case 'FSType4':
|
|
32912
|
+
point1 = ffpoint1;
|
|
32913
|
+
point2 = new PointF(point1.x + 10, parentY + midPoint);
|
|
32914
|
+
point3 = new PointF(point1.x + 10, parentY + 2);
|
|
32915
|
+
point4 = new PointF(pixelToPoint(this.childLeft - 20), parentY + 2);
|
|
32916
|
+
point5 = ffpoint3;
|
|
32917
|
+
point6 = ffpoint4;
|
|
32918
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32919
|
+
break;
|
|
32920
|
+
case 'FFType1':
|
|
32921
|
+
case 'FFType3':
|
|
32922
|
+
point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
|
|
32923
|
+
point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
|
|
32924
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32925
|
+
point4 = sspoint4;
|
|
32926
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32927
|
+
break;
|
|
32928
|
+
case 'FFType2':
|
|
32929
|
+
case 'FFType4':
|
|
32930
|
+
point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
|
|
32931
|
+
point2 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth + 20), parentY + midPoint);
|
|
32932
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32933
|
+
point4 = sspoint4;
|
|
32934
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32935
|
+
break;
|
|
32936
|
+
case 'SSType1':
|
|
32937
|
+
case 'SSType3':
|
|
32938
|
+
point1 = sspoint1;
|
|
32939
|
+
point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
|
|
32940
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32941
|
+
point4 = ffpoint4;
|
|
32942
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32943
|
+
break;
|
|
32944
|
+
case 'SSType2':
|
|
32945
|
+
case 'SSType4':
|
|
32946
|
+
point1 = sspoint1;
|
|
32947
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
32948
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32949
|
+
point4 = ffpoint4;
|
|
32950
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32951
|
+
break;
|
|
32952
|
+
case 'SFType1':
|
|
32953
|
+
case 'SFType3':
|
|
32954
|
+
point1 = sspoint1;
|
|
32955
|
+
point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
|
|
32956
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
32957
|
+
point4 = sspoint4;
|
|
32958
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
32959
|
+
break;
|
|
32960
|
+
case 'SFType2':
|
|
32961
|
+
point1 = sspoint1;
|
|
32962
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
32963
|
+
point3 = new PointF(point2.x, childY + 2);
|
|
32964
|
+
point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), childY + 2);
|
|
32965
|
+
point5 = new PointF(point4.x, childY + midPoint);
|
|
32966
|
+
point6 = sspoint4;
|
|
32967
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32968
|
+
break;
|
|
32969
|
+
case 'SFType4':
|
|
32970
|
+
point1 = sspoint1;
|
|
32971
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
32972
|
+
point3 = new PointF(point2.x, parentY + 2);
|
|
32973
|
+
point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + 2);
|
|
32974
|
+
point5 = new PointF(point4.x, childY + midPoint);
|
|
32975
|
+
point6 = sspoint4;
|
|
32976
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
32977
|
+
break;
|
|
32978
|
+
}
|
|
32388
32979
|
}
|
|
32389
32980
|
}
|
|
32390
32981
|
/**
|