Skip to content

Commit 4571c26

Browse files
committed
[update] version 9.0.11
1 parent babe687 commit 4571c26

15 files changed

+228
-187
lines changed

README.md

Lines changed: 2 additions & 2 deletions
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.10](https://img.shields.io/badge/npm-v.9.0.10-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
4+
[![npm: v.9.0.11](https://img.shields.io/badge/npm-v.9.0.11-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.10 Standard
120+
dhtmlxGantt v.9.0.11 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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gantt",
3-
"version": "9.0.10",
3+
"version": "9.0.11",
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for dhtmlxGantt 9.0.10
1+
// Type definitions for dhtmlxGantt 9.0.11
22
// Project: https://dhtmlx.com/docs/products/dhtmlxGantt
33

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

codebase/dhtmlxgantt.es.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for dhtmlxGantt 9.0.10
1+
// Type definitions for dhtmlxGantt 9.0.11
22
// Project: https://dhtmlx.com/docs/products/dhtmlxGantt
33

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

codebase/dhtmlxgantt.es.js

Lines changed: 109 additions & 108 deletions
Large diffs are not rendered by default.

codebase/dhtmlxgantt.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/dhtmlxgantt.js

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/dhtmlxgantt.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/sources/dhtmlxgantt.es.js

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @license
22

3-
dhtmlxGantt v.9.0.10 Standard
3+
dhtmlxGantt v.9.0.11 Standard
44

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

@@ -952,9 +952,9 @@ class EventsManager2 {
952952
const gantt3 = this._gantt;
953953
this._trace = [];
954954
gantt3.$root.classList.remove("gantt_noselect");
955-
if (this._originalReadonly !== void 0) {
955+
if (this._originalReadonly !== void 0 && this._mouseDown) {
956956
gantt3.config.readonly = this._originalReadonly;
957-
if (this._mouseDown && gantt3.config.drag_timeline && gantt3.config.drag_timeline.render) {
957+
if (gantt3.config.drag_timeline && gantt3.config.drag_timeline.render) {
958958
gantt3.render();
959959
}
960960
}
@@ -5068,7 +5068,7 @@ const config = () => {
50685068
return result;
50695069
};
50705070
var isWindowAwailable = typeof window !== "undefined";
5071-
const env = { isIE: isWindowAwailable && (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0), isIE6: isWindowAwailable && (!XMLHttpRequest && navigator.userAgent.indexOf("MSIE") >= 0), isIE7: isWindowAwailable && (navigator.userAgent.indexOf("MSIE 7.0") >= 0 && navigator.userAgent.indexOf("Trident") < 0), isIE8: isWindowAwailable && (navigator.userAgent.indexOf("MSIE 8.0") >= 0 && navigator.userAgent.indexOf("Trident") >= 0), isOpera: isWindowAwailable && navigator.userAgent.indexOf("Opera") >= 0, isChrome: isWindowAwailable && navigator.userAgent.indexOf("Chrome") >= 0, isKHTML: isWindowAwailable && (navigator.userAgent.indexOf("Safari") >= 0 || navigator.userAgent.indexOf("Konqueror") >= 0), isFF: isWindowAwailable && navigator.userAgent.indexOf("Firefox") >= 0, isIPad: isWindowAwailable && navigator.userAgent.search(/iPad/gi) >= 0, isEdge: isWindowAwailable && navigator.userAgent.indexOf("Edge") != -1, isNode: !isWindowAwailable || typeof navigator == "undefined" || false === "test" };
5071+
const env = { isIE: isWindowAwailable && (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0), isOpera: isWindowAwailable && (navigator.userAgent.indexOf("Opera") >= 0 || navigator.userAgent.indexOf("OPR") >= 0), isChrome: isWindowAwailable && navigator.userAgent.indexOf("Chrome") >= 0, isSafari: isWindowAwailable && (navigator.userAgent.indexOf("Safari") >= 0 || navigator.userAgent.indexOf("Konqueror") >= 0), isFF: isWindowAwailable && navigator.userAgent.indexOf("Firefox") >= 0, isIPad: isWindowAwailable && navigator.userAgent.search(/iPad/gi) >= 0, isEdge: isWindowAwailable && navigator.userAgent.indexOf("Edge") != -1, isNode: !isWindowAwailable || typeof navigator == "undefined" || false === "test", isSalesforce: isWindowAwailable && (!!scope["Sfdc"] || !!scope["$A"] || scope["Aura"]) };
50725072
function serialize(data2) {
50735073
if (typeof data2 === "string" || typeof data2 === "number") {
50745074
return data2;
@@ -11852,8 +11852,12 @@ WorkTimeCalendarMerger.prototype = { _getIntervals: function(hoursArray) {
1185211852
}, _mergeHoursConfig: function(firstHours, secondHours) {
1185311853
return this._mergeAdjacentIntervals(this._intersectHourRanges(firstHours, secondHours));
1185411854
}, merge: function(first, second) {
11855-
var firstConfig = copy(first.getConfig().parsed);
11856-
var secondConfig = copy(second.getConfig().parsed);
11855+
const firstCalendar = copy(first.getConfig());
11856+
const secondCalendar = copy(second.getConfig());
11857+
const firstConfig = firstCalendar.parsed;
11858+
const secondConfig = secondCalendar.parsed;
11859+
firstConfig.customWeeks = firstCalendar.customWeeks;
11860+
secondConfig.customWeeks = secondCalendar.customWeeks;
1185711861
var mergedSettings = { hours: this._toHoursArray(this._mergeHoursConfig(firstConfig.hours, secondConfig.hours)), dates: {}, customWeeks: {} };
1185811862
const processCalendar = (config1, config2) => {
1185911863
for (let i2 in config1.dates) {
@@ -11882,7 +11886,11 @@ WorkTimeCalendarMerger.prototype = { _getIntervals: function(hoursArray) {
1188211886
}
1188311887
if (secondConfig.customWeeks) {
1188411888
for (var i in secondConfig.customWeeks) {
11885-
mergedSettings.customWeeks[i] = secondConfig.customWeeks[i];
11889+
if (mergedSettings.customWeeks[i]) {
11890+
mergedSettings.customWeeks[i + "_second"] = secondConfig.customWeeks[i];
11891+
} else {
11892+
mergedSettings.customWeeks[i] = secondConfig.customWeeks[i];
11893+
}
1188611894
}
1188711895
}
1188811896
return mergedSettings;
@@ -13272,7 +13280,7 @@ CalendarManager.prototype = { _calendars: {}, _convertWorkTimeSettings: function
1327213280
} else {
1327313281
resourceProperty = legacyResourceCalendarConfig.getResourceProperty(config2);
1327413282
}
13275-
if (Array.isArray(task[resourceProperty])) {
13283+
if (Array.isArray(task[resourceProperty]) && task[resourceProperty].length) {
1327613284
if (config2.dynamic_resource_calendars) {
1327713285
calendarId = dynamicResourceCalendars.getCalendarIdFromMultipleResources(task[resourceProperty], this);
1327813286
} else {
@@ -14086,8 +14094,7 @@ function addResizeListener(gantt2) {
1408614094
resizeWatcher.setAttribute("role", "none");
1408714095
resizeWatcher.setAttribute("aria-hidden", true);
1408814096
}
14089-
var salesforce_environment = !!window["Sfdc"] || !!window["$A"] || window["Aura"];
14090-
if (salesforce_environment) {
14097+
if (gantt2.env.isSalesforce) {
1409114098
gantt2.config.container_resize_method = "timeout";
1409214099
}
1409314100
gantt2.$root.appendChild(resizeWatcher);
@@ -14543,7 +14550,7 @@ function i18nFactory() {
1454314550
}
1454414551
function DHXGantt() {
1454514552
this.constants = constants;
14546-
this.version = "9.0.10";
14553+
this.version = "9.0.11";
1454714554
this.license = "gpl";
1454814555
this.templates = {};
1454914556
this.ext = {};
@@ -14698,6 +14705,8 @@ function messages(gantt2) {
1469814705
messageBox.area = document.createElement("div");
1469914706
messageBox.area.className = "gantt_message_area";
1470014707
messageBox.area.style[messageBox.position] = "5px";
14708+
}
14709+
if (!isChildOf(messageBox.area, document.body)) {
1470114710
document.body.appendChild(messageBox.area);
1470214711
}
1470314712
messageBox.hide(text.id);
@@ -15477,17 +15486,17 @@ var layerFactory = function(gantt2) {
1547715486
layer.id = layer.id || uid();
1547815487
this.tempCollection.push(layer);
1547915488
}
15480-
var container = this.container();
15481-
var pending = this.tempCollection;
15482-
for (var i = 0; i < pending.length; i++) {
15489+
const container = this.container();
15490+
const pending = this.tempCollection;
15491+
for (let i = 0; i < pending.length; i++) {
1548315492
layer = pending[i];
15484-
if (!this.container() && !(layer && layer.container && isChildOf(layer.container, document.body))) continue;
15485-
var node = layer.container, id = layer.id, topmost = layer.topmost;
15493+
if (!this.container() && !(layer && layer.container && layer.container.isConnected)) continue;
15494+
let node = layer.container, id = layer.id, topmost = layer.topmost;
1548615495
if (!node.parentNode) {
1548715496
if (topmost) {
1548815497
container.appendChild(node);
1548915498
} else {
15490-
var rel = relativeRoot ? relativeRoot() : container.firstChild;
15499+
let rel = relativeRoot ? relativeRoot() : container.firstChild;
1549115500
if (rel && rel.parentNode == container) container.insertBefore(node, rel);
1549215501
else container.appendChild(node);
1549315502
}
@@ -20970,7 +20979,7 @@ function createGridLineRender(gantt2) {
2097020979
for (var i = 0; i < columns.length; i++) {
2097120980
var column = columns[i];
2097220981
if (column.onrender) {
20973-
var cellNode = rowNode.querySelector("[data-column-name=" + column.name + "]");
20982+
var cellNode = rowNode.querySelector(`[data-column-name="${column.name}"]`);
2097420983
if (cellNode) {
2097520984
var content = column.onrender(item, cellNode);
2097620985
if (content && typeof content === "string") {
@@ -24940,8 +24949,7 @@ function lightbox(gantt2) {
2494024949
gantt2._lightbox_root = gantt2.$root;
2494124950
function setParentNode() {
2494224951
const cspEnvironment = gantt2.config.csp === true;
24943-
const salesforceEnvironment = !!window["Sfdc"] || !!window["$A"] || window["Aura"] || "$shadowResolver$" in document.body;
24944-
if (cspEnvironment || salesforceEnvironment) {
24952+
if (cspEnvironment || gantt2.env.isSalesforce) {
2494524953
gantt2._lightbox_root = gantt2.$root;
2494624954
} else {
2494724955
gantt2._lightbox_root = document.body;
@@ -25262,22 +25270,27 @@ function lightbox(gantt2) {
2526225270
return mapping;
2526325271
};
2526425272
gantt2.getLightboxValues = function() {
25265-
var task = {};
25273+
let task = {};
2526625274
if (gantt2.isTaskExists(this._lightbox_id)) {
2526725275
task = this.mixin({}, this.getTask(this._lightbox_id));
2526825276
}
25269-
var sns = this._get_typed_lightbox_config();
25270-
for (var i = 0; i < sns.length; i++) {
25271-
var node = gantt2._lightbox_root.querySelector("#" + sns[i].id);
25277+
const sns = this._get_typed_lightbox_config();
25278+
const sortedSns = [...sns].sort((a, b) => {
25279+
if (a.name === "time") return 1;
25280+
if (b.name === "time") return -1;
25281+
return 0;
25282+
});
25283+
for (let i = 0; i < sortedSns.length; i++) {
25284+
let node = gantt2._lightbox_root.querySelector("#" + sortedSns[i].id);
2527225285
node = node ? node.nextSibling : node;
25273-
var block = this.form_blocks[sns[i].type];
25286+
let block = this.form_blocks[sortedSns[i].type];
2527425287
if (!block) continue;
25275-
var res = block.get_value.call(this, node, task, sns[i]);
25276-
var map_to = gantt2._resolve_default_mapping(sns[i]);
25288+
let res = block.get_value.call(this, node, task, sortedSns[i]);
25289+
let map_to = gantt2._resolve_default_mapping(sortedSns[i]);
2527725290
if (typeof map_to == "string" && map_to != "auto") {
2527825291
task[map_to] = res;
2527925292
} else if (typeof map_to == "object") {
25280-
for (var property in map_to) {
25293+
for (let property in map_to) {
2528125294
if (map_to[property]) task[map_to[property]] = res[property];
2528225295
}
2528325296
}

codebase/sources/dhtmlxgantt.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)