Skip to content

Commit 742ac4e

Browse files
committed
[update] version 9.0.3
1 parent d16999d commit 742ac4e

19 files changed

+582
-498
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.9.0.2](https://img.shields.io/badge/npm-v.9.0.2-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
4+
[![npm: v.9.0.3](https://img.shields.io/badge/npm-v.9.0.3-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) | [License](#license) | [Useful links](#links) | [Follow us](#followus)
@@ -117,7 +117,7 @@ Resource management, critical path calculation, auto scheduling, and other enhan
117117
<a name="license"></a>
118118
## License ##
119119

120-
dhtmlxGantt v.9.0.2 Standard
120+
dhtmlxGantt v.9.0.3 Standard
121121

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

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gantt",
3-
"version": "9.0.2",
3+
"version": "9.0.3",
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.css

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

codebase/dhtmlxgantt.d.ts

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

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

codebase/dhtmlxgantt.es.d.ts

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

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

codebase/dhtmlxgantt.es.js

+451-430
Large diffs are not rendered by default.

codebase/dhtmlxgantt.es.js.map

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

codebase/dhtmlxgantt.js

+14-14
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

+6-6
Original file line numberDiff line numberDiff line change
@@ -2018,8 +2018,8 @@ div.dhx_modal_cover {
20182018
}
20192019
.gantt_cal_light_wide .gantt_cal_lsection {
20202020
width: 120px;
2021-
justify-content: start;
2022-
align-items: start;
2021+
justify-content: flex-start;
2022+
align-items: flex-start;
20232023
flex-shrink: 0;
20242024
margin-top: 0;
20252025
margin-bottom: 0;
@@ -2034,7 +2034,7 @@ div.dhx_modal_cover {
20342034
flex: 1;
20352035
}
20362036
.gantt_cal_light_wide .gantt_section_time {
2037-
justify-content: start;
2037+
justify-content: flex-start;
20382038
}
20392039
.gantt_cal_light_wide .gantt_fullday {
20402040
margin-left: unset;
@@ -2432,7 +2432,7 @@ div.dhx_modal_cover {
24322432
}
24332433
.gantt_cal_qi_tcontrols {
24342434
display: flex;
2435-
justify-content: end;
2435+
justify-content: flex-end;
24362436
height: 8px;
24372437
}
24382438
.gantt_cal_qi_tcontrols .gantt_cal_qi_close_btn {
@@ -2490,7 +2490,7 @@ div.dhx_modal_cover {
24902490
position: relative;
24912491
display: flex;
24922492
flex-direction: row;
2493-
justify-content: start;
2493+
justify-content: flex-start;
24942494
align-items: center;
24952495
gap: 8px;
24962496
overflow: hidden;
@@ -2523,7 +2523,7 @@ div.dhx_modal_cover {
25232523
.gantt_cal_qi_controls {
25242524
display: flex;
25252525
flex-direction: row;
2526-
justify-content: start;
2526+
justify-content: flex-start;
25272527
align-items: center;
25282528
padding-top: 8px;
25292529
gap: 12px;

codebase/sources/dhtmlxgantt.es.js

+41-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @license
22

3-
dhtmlxGantt v.9.0.2 Standard
3+
dhtmlxGantt v.9.0.3 Standard
44

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

@@ -3555,7 +3555,7 @@ class QuickInfo {
35553555
for (let i = 0; i < buttons.length; i++) {
35563556
const ariaAttr = gantt3._waiAria.quickInfoButtonAttrString(gantt3.locale.labels[buttons[i]]);
35573557
html += `<div class="gantt_qi_big_icon ${buttons[i]} dhx_gantt_${buttons[i]}" title="${gantt3.locale.labels[buttons[i]]}" ${ariaAttr}>
3558-
<div class='dhx_menu_icon ${buttons[i]} gantt_menu_icon dhx_gantt_${buttons[i]}'></div>
3558+
<div class='dhx_menu_icon dhx_gantt_icon ${buttons[i]} gantt_menu_icon dhx_gantt_${buttons[i]}'></div>
35593559
<div>${gantt3.locale.labels[buttons[i]]}</div>
35603560
</div>`;
35613561
}
@@ -4221,7 +4221,7 @@ function tooltip(gantt2) {
42214221
});
42224222
}
42234223
const noTrack = { onBeforeUndo: "onAfterUndo", onBeforeRedo: "onAfterRedo" };
4224-
const batchActions = ["onTaskDragStart", "onAfterTaskUpdate", "onAfterTaskDelete", "onBeforeBatchUpdate"];
4224+
const batchActions = ["onTaskDragStart", "onAfterTaskUpdate", "onAfterParentExpand", "onAfterTaskDelete", "onBeforeBatchUpdate"];
42254225
class Monitor {
42264226
constructor(undo2, gantt2) {
42274227
this._batchAction = null;
@@ -4432,6 +4432,9 @@ class Monitor {
44324432
gantt2.attachEvent("onAfterTaskUpdate", (id, task) => {
44334433
this.onTaskUpdated(task);
44344434
});
4435+
gantt2.attachEvent("onAfterParentExpand", (id, task) => {
4436+
this.onTaskUpdated(task);
4437+
});
44354438
gantt2.attachEvent("onAfterTaskDelete", (id, task) => {
44364439
this.onTaskDeleted(task);
44374440
});
@@ -4755,7 +4758,13 @@ class Undo {
47554758
} else if (command.type === actions.update) {
47564759
const item = gantt2[getMethod](command.value.id);
47574760
for (const prop in command.value) {
4758-
if (!prop.startsWith("$") && !prop.startsWith("_")) {
4761+
const internalProperty = prop.startsWith("$") || prop.startsWith("_");
4762+
const whitelist = ["$open"];
4763+
let copyProperty = !internalProperty;
4764+
if (whitelist.indexOf(prop) > -1) {
4765+
copyProperty = true;
4766+
}
4767+
if (copyProperty) {
47594768
item[prop] = command.value[prop];
47604769
}
47614770
}
@@ -5784,7 +5793,7 @@ function DnD(gantt2) {
57845793
if (this._settings) mixin(this.config, this._settings, true);
57855794
this.traceDragEvents(obj, inputMethod);
57865795
gantt2._prevent_touch_scroll = true;
5787-
document.body.className += " gantt_noselect";
5796+
document.body.classList.add("gantt_noselect");
57885797
if (gantt2.config.touch) {
57895798
this.dragMove(obj, e, inputMethod.accessor);
57905799
}
@@ -5831,7 +5840,7 @@ function DnD(gantt2) {
58315840
}
58325841
this.config.started = false;
58335842
gantt2._touch_drag = false;
5834-
document.body.className = document.body.className.replace(" gantt_noselect", "");
5843+
document.body.classList.remove("gantt_noselect");
58355844
}, getPosition: function(e) {
58365845
var x = 0, y = 0;
58375846
if (e.pageX || e.pageY) {
@@ -6017,6 +6026,10 @@ var createTasksDatastoreFacade = function() {
60176026
if (!defined(parent)) parent = this.getParent(item) || 0;
60186027
if (!this.isTaskExists(parent)) parent = this.config.root_id;
60196028
this.setParent(item, parent);
6029+
if (this.getState().lightbox && this.isTaskExists(parent)) {
6030+
var parentObj = this.getTask(parent);
6031+
this.callEvent("onAfterParentExpand", [parent, parentObj]);
6032+
}
60206033
return this.$data.tasksStore.addItem(item, index, parent);
60216034
}, deleteTask: function(id) {
60226035
id = replaceValidZeroId(id, this.config.root_id);
@@ -13427,6 +13440,9 @@ function data(gantt2) {
1342713440
this.setParent(item, parent, true);
1342813441
var parentObj = this.getTask(parent);
1342913442
parentObj.$open = true;
13443+
if (!this.config.details_on_create) {
13444+
this.callEvent("onAfterParentExpand", [parent, parentObj]);
13445+
}
1343013446
}
1343113447
if (!this.callEvent("onTaskCreated", [item])) {
1343213448
return null;
@@ -14233,6 +14249,9 @@ function extend(gantt2) {
1423314249
if (this.resetLightbox) {
1423414250
this.resetLightbox();
1423514251
}
14252+
if (this.ext.inlineEditors) {
14253+
this.ext.inlineEditors.destructor();
14254+
}
1423614255
if (this._dp && this._dp.destructor) {
1423714256
this._dp.destructor();
1423814257
}
@@ -14295,7 +14314,7 @@ function i18nFactory() {
1429514314
}
1429614315
function DHXGantt() {
1429714316
this.constants = constants;
14298-
this.version = "9.0.2";
14317+
this.version = "9.0.3";
1429914318
this.license = "gpl";
1430014319
this.templates = {};
1430114320
this.ext = {};
@@ -19428,7 +19447,7 @@ function create(gantt2) {
1942819447
if (gantt2.isTaskExists(prev)) {
1942919448
this.startEdit(prev, this._columnName);
1943019449
}
19431-
}, destructor: function() {
19450+
}, detachStore: function() {
1943219451
handlers.forEach(function(handlerId) {
1943319452
store.detachEvent(handlerId);
1943419453
});
@@ -19439,6 +19458,8 @@ function create(gantt2) {
1943919458
ganttHandlers = [];
1944019459
store = null;
1944119460
this.hide();
19461+
}, destructor: function() {
19462+
this.detachStore();
1944219463
this.detachAllEvents();
1944319464
} };
1944419465
mixin(controller, keyboardMapping);
@@ -20696,11 +20717,6 @@ function createResourceTimelineBuilder(gantt2) {
2069620717
if (cachedTimes[timestamp] === false) {
2069720718
continue;
2069820719
}
20699-
var isWorkTime = calendar.isWorkTime({ date: date2, task, unit: scaleUnit });
20700-
if (!isWorkTime) {
20701-
cachedTimes[timestamp] = false;
20702-
continue;
20703-
}
2070420720
if (!timegrid[timestamp]) {
2070520721
timegrid[timestamp] = { tasks: [], assignments: [] };
2070620722
}
@@ -21496,7 +21512,7 @@ var initializer$2 = /* @__PURE__ */ function() {
2149621512
}
2149721513
}, onDestroyed: function(grid) {
2149821514
if (grid.$config.id == "grid") {
21499-
gantt2.ext.inlineEditors.destructor();
21515+
gantt2.ext.inlineEditors.detachStore();
2150021516
}
2150121517
this.clearEvents(grid, gantt2);
2150221518
}, initEvents: function(grid, gantt3) {
@@ -23304,6 +23320,16 @@ class TimelineZoom {
2330423320
const chartConfig = gantt3.copy(nextConfig);
2330523321
delete chartConfig.name;
2330623322
gantt3.mixin(gantt3.config, chartConfig, true);
23323+
const resourceViews = ["resourceTimeline", "resourceHistogram"];
23324+
resourceViews.forEach(function(name) {
23325+
const resourceView = gantt3.$ui.getView(name);
23326+
if (resourceView) {
23327+
const resourceConfig = resourceView.$getConfig();
23328+
if (!resourceConfig.fixed_scales) {
23329+
gantt3.mixin(resourceConfig, chartConfig, true);
23330+
}
23331+
}
23332+
});
2330723333
const isRendered = !!gantt3.$root && !!gantt3.$task;
2330823334
if (isRendered) {
2330923335
if (cursorOffset) {
@@ -24753,7 +24779,7 @@ function lightbox(gantt2) {
2475324779
}
2475424780
} else {
2475524781
index = src.getAttribute("data-index");
24756-
sec = src.parentNode;
24782+
sec = src.closest(".gantt_cal_lsection");
2475724783
src = src.firstChild;
2475824784
}
2475924785
}

codebase/sources/dhtmlxgantt.es.js.map

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

0 commit comments

Comments
 (0)