Skip to content

Commit a187bfd

Browse files
committed
[update] version 7.1.12
1 parent 3a16b9e commit a187bfd

16 files changed

+137
-39
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# dhtmlxGantt #
22

33
[![dhtmlx.com](https://img.shields.io/badge/made%20by-DHTMLX-blue)](https://dhtmlx.com/)
4-
[![npm: v.7.1.11](https://img.shields.io/badge/npm-v.7.1.11-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
4+
[![npm: v.7.1.12](https://img.shields.io/badge/npm-v.7.1.12-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
55
[![License: GPL v2](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
66

77
[Getting started](#getting-started) | [Features](#features) | [Follow us](#followus) | [License](#license) | [Useful links](#links)
@@ -128,7 +128,7 @@ Like our page on [Facebook](https://www.facebook.com/dhtmlx/) :thumbsup:
128128
<a name="license"></a>
129129
## License ##
130130

131-
dhtmlxGantt v.7.1.11 Standard
131+
dhtmlxGantt v.7.1.12 Standard
132132

133133
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
134134

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gantt",
3-
"version": "7.1.11",
3+
"version": "7.1.12",
44
"homepage": "https://dhtmlx.com/docs/products/dhtmlxGantt/",
55
"description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.",
66
"main": [

codebase/dhtmlxgantt.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for dhtmlxGantt 7.1.11
1+
// Type definitions for dhtmlxGantt 7.1.12
22
// Project: https://dhtmlx.com/docs/products/dhtmlxGantt
33

44
type GanttCallback = (...args: any[]) => any;

codebase/dhtmlxgantt.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/dhtmlxgantt.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/sources/dhtmlxgantt.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.11 Standard
4+
dhtmlxGantt v.7.1.12 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/dhtmlxgantt.js

+108-22
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33

4-
dhtmlxGantt v.7.1.11 Standard
4+
dhtmlxGantt v.7.1.12 Standard
55

66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

@@ -7530,6 +7530,13 @@ module.exports = function (gantt) {
75307530
modifiedDate.setTime(modifiedDate.getTime() + 60 * 60 * 1000 * (24 - modifiedDate.getHours()));
75317531
}
75327532

7533+
var worktimeCalculation = inc > 1;
7534+
7535+
if (worktimeCalculation && getHoursCondition) {
7536+
// try to shift the modified Date to 00:00
7537+
modifiedDate.setHours(0);
7538+
}
7539+
75337540
return modifiedDate;
75347541
},
75357542
add: function add(date, inc, mode) {
@@ -8699,7 +8706,8 @@ module.exports = function (gantt) {
86998706
};
87008707

87018708
var getDefaultTaskDate = function getDefaultTaskDate(item, parent_id) {
8702-
var parent = parent_id && parent_id != gantt.config.root_id ? gantt.getTask(parent_id) : false,
8709+
var parentExists = parent_id && parent_id != gantt.config.root_id && gantt.isTaskExists(parent_id);
8710+
var parent = parentExists ? gantt.getTask(parent_id) : false,
87038711
startDate = null;
87048712

87058713
if (parent) {
@@ -12830,11 +12838,12 @@ var createDatastoreFacade = function createDatastoreFacade() {
1283012838
store.select(id); // GS-730. Split task is not included in the tree,
1283112839
// so the datastore renderer will think that the task is not visible
1283212840

12833-
if (oldSelectId && store.pull[oldSelectId].$split_subtask) {
12841+
if (oldSelectId && store.pull[oldSelectId].$split_subtask && oldSelectId != id) {
1283412842
this.refreshTask(oldSelectId);
1283512843
}
1283612844

12837-
if (store.pull[id].$split_subtask) {
12845+
if (store.pull[id].$split_subtask && oldSelectId != id) {
12846+
// GS-1850. Do not repaint split task after double click
1283812847
this.refreshTask(id);
1283912848
}
1284012849
}
@@ -12896,7 +12905,13 @@ var createLinksStoreFacade = function createLinksStoreFacade() {
1289612905
return this.$data.linksStore.exists(id);
1289712906
},
1289812907
addLink: function addLink(link) {
12899-
return this.$data.linksStore.addItem(link);
12908+
var newLink = this.$data.linksStore.addItem(link); // GS-1222. Update fullOrder otherwise the link won't appear after render
12909+
12910+
if (this.$data.linksStore.isSilent()) {
12911+
this.$data.linksStore.fullOrder.push(newLink);
12912+
}
12913+
12914+
return newLink;
1290012915
},
1290112916
updateLink: function updateLink(id, data) {
1290212917
if (!utils.defined(data)) data = this.getLink(id);
@@ -13135,7 +13150,7 @@ function createLayoutFacade() {
1313513150
} else {
1313613151
var grid = getGrid(gantt);
1313713152

13138-
if (grid || !grid.$config.hidden) {
13153+
if (grid && !grid.$config.hidden) {
1313913154
return grid;
1314013155
} else {
1314113156
return null;
@@ -13156,6 +13171,11 @@ function createLayoutFacade() {
1315613171
baseCell = getGrid(gantt);
1315713172
} else {
1315813173
baseCell = getBaseCell(gantt);
13174+
} // GS-1827. If there is no grid and timeline, there is no scrollbar for them
13175+
13176+
13177+
if (!baseCell) {
13178+
return null;
1315913179
}
1316013180

1316113181
var verticalScrollbar = getAttachedScrollbar(gantt, baseCell, "scrollY");
@@ -13165,7 +13185,7 @@ function createLayoutFacade() {
1316513185
function getHorizontalScrollbar(gantt) {
1316613186
var baseCell = getBaseCell(gantt);
1316713187

13168-
if (baseCell.id == "grid") {
13188+
if (!baseCell || baseCell.id == "grid") {
1316913189
return null; // if the timeline is not displayed, do not return the scrollbar
1317013190
}
1317113191

@@ -20252,11 +20272,53 @@ var Layout = function (_super) {
2025220272
}
2025320273

2025420274
var autosize = this._getAutosizeMode(this.$config.autosize);
20275+
/* // possible to rollback set content size when autisize is disabled, not sure if need to
20276+
contentViews.forEach(function(view){
20277+
const parent = view.$parent;
20278+
if(!autosize.x){
20279+
if(parent.$config.$originalWidthStored){
20280+
parent.$config.$originalWidthStored = false;
20281+
parent.$config.width = parent.$config.$originalWidth;
20282+
parent.$config.$originalWidth = undefined;
20283+
}
20284+
}
20285+
20286+
if(!autosize.y){
20287+
if(parent.$config.$originalHeightStored){
20288+
parent.$config.$originalHeightStored = false;
20289+
parent.$config.height = parent.$config.$originalHeight;
20290+
parent.$config.$originalHeight = undefined;
20291+
}
20292+
}
20293+
});*/
20294+
2025520295

2025620296
var scrollChanged = this._resizeScrollbars(autosize, scrollbars);
2025720297

2025820298
if (this.$config.autosize) {
2025920299
this.autosize(this.$config.autosize);
20300+
contentViews.forEach(function (view) {
20301+
var parent = view.$parent;
20302+
var sizes = parent.getContentSize(autosize);
20303+
20304+
if (autosize.x) {
20305+
if (!parent.$config.$originalWidthStored) {
20306+
parent.$config.$originalWidthStored = true;
20307+
parent.$config.$originalWidth = parent.$config.width;
20308+
}
20309+
20310+
parent.$config.width = sizes.width;
20311+
}
20312+
20313+
if (autosize.y) {
20314+
if (!parent.$config.$originalHeightStored) {
20315+
parent.$config.$originalHeightStored = true;
20316+
parent.$config.$originalHeight = parent.$config.height;
20317+
}
20318+
20319+
parent.$config.height = sizes.height;
20320+
}
20321+
});
2026020322
scrollChanged = true;
2026120323
}
2026220324

@@ -22738,6 +22800,11 @@ module.exports = function (gantt) {
2273822800
lightboxDiv.firstChild.style.cursor = "pointer";
2273922801

2274022802
gantt._init_dnd_events();
22803+
} // GS-1428: If there is lightbox node, we need to remove it from the DOM
22804+
22805+
22806+
if (this._lightbox) {
22807+
this.resetLightbox();
2274122808
}
2274222809

2274322810
document.body.insertBefore(lightboxDiv, document.body.firstChild);
@@ -33201,7 +33268,13 @@ CalendarWorkTimeStrategy.prototype = {
3320133268
return timestamp;
3320233269
},
3320333270
_checkIfWorkingUnit: function _checkIfWorkingUnit(date, unit) {
33204-
if (!this["_is_work_" + unit]) return true;
33271+
// GS-596: If unit is larger than day or has a custom logic
33272+
if (!this["_is_work_" + unit]) {
33273+
var from = this.$gantt.date["".concat(unit, "_start")](new Date(date));
33274+
var to = this.$gantt.date.add(from, 1, unit);
33275+
return this.hasDuration(from, to);
33276+
}
33277+
3320533278
return this["_is_work_" + unit](date);
3320633279
},
3320733280
//checkings for particular time units
@@ -33913,23 +33986,23 @@ CalendarWorkTimeStrategy.prototype = {
3391333986
_addInterval: function _addInterval(start, duration, unit, step, stopAction) {
3391433987
var added = 0;
3391533988
var current = start;
33916-
var previous = new Date(current.valueOf() - 1);
33917-
var timezoneDifferenceWithPrevious = current.getTimezoneOffset() - previous.getTimezoneOffset();
33989+
var dstShift = false;
3391833990

3391933991
while (added < duration && !(stopAction && stopAction(current))) {
33920-
var next = this._nextDate(current, unit, step);
33992+
var next = this._nextDate(current, unit, step); // GS-1501. Correct hours after DST change
3392133993

33922-
if (timezoneDifferenceWithPrevious < 0 && step > 0) {
33923-
// the step parameter is for backward scheduling and startDate calcuation
33924-
next.setTime(next.getTime() + 60 * 1000 * timezoneDifferenceWithPrevious);
33925-
timezoneDifferenceWithPrevious = false;
33926-
}
3392733994

33928-
var timezoneDifference = next.getTimezoneOffset() - current.getTimezoneOffset();
33995+
if (unit == "day") {
33996+
dstShift = dstShift || !current.getHours() && next.getHours();
3392933997

33930-
if (timezoneDifference < 0 && step > 0 && unit != "day") {
33931-
// the step parameter is for backward scheduling and startDate calcuation
33932-
next.setTime(next.getTime() + 60 * 1000 * timezoneDifference);
33998+
if (dstShift) {
33999+
next.setHours(0);
34000+
34001+
if (next.getHours()) {// the day when the timezone is changed, try to correct hours next time
34002+
} else {
34003+
dstShift = false;
34004+
}
34005+
}
3393334006
}
3393434007

3393534008
var dateValue = new Date(next.valueOf() + 1);
@@ -33940,7 +34013,7 @@ CalendarWorkTimeStrategy.prototype = {
3394034013

3394134014
var workTimeCheck = this._isWorkTime(dateValue, unit);
3394234015

33943-
if (workTimeCheck) {
34016+
if (workTimeCheck && !dstShift) {
3394434017
added++;
3394534018
}
3394634019

@@ -38276,6 +38349,19 @@ module.exports = function (gantt) {
3827638349
var multiSelect = gantt.config.multiselect;
3827738350

3827838351
var singleSelection = function () {
38352+
// GS-719: If the multiselect extension is added we still need a way
38353+
// to open the inline editors after clicking on the cells in the grid
38354+
var controller = gantt.ext.inlineEditors;
38355+
var state = controller.getState();
38356+
var cell = controller.locateCell(e.target);
38357+
38358+
if (gantt.config.inline_editors_multiselect_open && cell && controller.getEditorConfig(cell.columnName)) {
38359+
if (controller.isVisible() && state.id == cell.id && state.columnName == cell.columnName) {// do nothing if editor is already active in this cell
38360+
} else {
38361+
controller.startEdit(cell.id, cell.columnName);
38362+
}
38363+
}
38364+
3827938365
this.setFirstSelected(target_ev);
3828038366

3828138367
if (!this.isSelected(target_ev)) {
@@ -40050,7 +40136,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
4005040136

4005140137
function DHXGantt() {
4005240138
this.constants = __webpack_require__(/*! ../constants */ "./sources/constants/index.js");
40053-
this.version = "7.1.11";
40139+
this.version = "7.1.12";
4005440140
this.license = "gpl";
4005540141
this.templates = {};
4005640142
this.ext = {};

codebase/sources/skins/dhtmlxgantt_broadway.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.11 Standard
4+
dhtmlxGantt v.7.1.12 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_contrast_black.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.11 Standard
4+
dhtmlxGantt v.7.1.12 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_contrast_white.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.11 Standard
4+
dhtmlxGantt v.7.1.12 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_material.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.11 Standard
4+
dhtmlxGantt v.7.1.12 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_meadow.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.11 Standard
4+
dhtmlxGantt v.7.1.12 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_skyblue.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.11 Standard
4+
dhtmlxGantt v.7.1.12 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_terrace.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.11 Standard
4+
dhtmlxGantt v.7.1.12 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dhtmlx-gantt",
3-
"version": "7.1.11",
3+
"version": "7.1.12",
44
"description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.",
55
"main": "codebase/dhtmlxgantt.js",
66
"types": "codebase/dhtmlxgantt.d.ts",

whatsnew.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
### 7.1.12
2+
3+
Fix the incorrect work of the gantt.isWorkTime() method with the "week" time unit
4+
Fix the issue that prevented tasks and links from being rendered when they were added via the gantt.silent() method
5+
Fix the issue that caused the "Task not found" error message to be shown after data loading in some cases
6+
Fix the incorrect work of the gantt.changeLightboxType() method that left old lightbox elements in DOM
7+
Fix the incorrect calculation of the end dates of tasks when the tasks overlap after the Summer/Winter clock change
8+
Fix the issue that caused the Resource Grid to disappear when the user edited a resource value using the cell editor
9+
Fix the script error that happened when the Gantt layout contained the "resourceGrid"/"resourceTimeline" views but not included the "grid"/"timeline" views
10+
Fix the incorrect work of the autosize config when the Gantt layout contained Resource Panel
11+
Fix the lightbox for split tasks, the lightbox now should be displayed when you double-click on a split task
12+
113
### 7.1.11
214

315
Fix sourcemaps for compressed Gantt files

0 commit comments

Comments
 (0)