1
1
/*
2
2
@license
3
3
4
- dhtmlxGantt v.7.0.2 Standard
4
+ dhtmlxGantt v.7.0.3 Standard
5
5
6
6
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
7
7
@@ -15007,7 +15007,7 @@ module.exports = function(gantt){
15007
15007
15008
15008
if(mapping){
15009
15009
return mapping;
15010
- }else if(gantt.config.keyboard_navigation_cells){
15010
+ }else if(gantt.config.keyboard_navigation_cells && gantt.ext.keyboardNavigation ){
15011
15011
return keyNavMappings;
15012
15012
}else{
15013
15013
return defaultMapping;
@@ -29733,7 +29733,7 @@ CalendarWorkTimeStrategy.prototype = {
29733
29733
equals: function (calendar) {
29734
29734
if(!(calendar instanceof CalendarWorkTimeStrategy)){
29735
29735
return false;
29736
- }
29736
+ }
29737
29737
29738
29738
var mySettings = this.getConfig();
29739
29739
var thatSettings = calendar.getConfig();
@@ -29757,7 +29757,7 @@ CalendarWorkTimeStrategy.prototype = {
29757
29757
var otherHours = mySettings.dates[timestamp];
29758
29758
29759
29759
// day settings not equal
29760
- if(myHours !== otherHours &&
29760
+ if(myHours !== otherHours &&
29761
29761
// but still can be two arrays with the equivalent hour settings
29762
29762
!(Array.isArray(myHours) && Array.isArray(otherHours) && this._arraysEqual(myHours, otherHours))
29763
29763
){
@@ -29821,7 +29821,7 @@ CalendarWorkTimeStrategy.prototype = {
29821
29821
if(parsed[2]){
29822
29822
value += parseInt(parsed[2]);
29823
29823
}
29824
-
29824
+
29825
29825
timestampRanges.push(value);
29826
29826
});
29827
29827
@@ -30171,7 +30171,7 @@ CalendarWorkTimeStrategy.prototype = {
30171
30171
30172
30172
/**
30173
30173
* Check whether this calendar has working time. Calendar has working time only if there are regular working days of week
30174
- *
30174
+ *
30175
30175
*/
30176
30176
hasWorkTime: function () {
30177
30177
var worktime = this.getConfig();
@@ -30188,7 +30188,7 @@ CalendarWorkTimeStrategy.prototype = {
30188
30188
var hasRegularHours = this._checkWorkHours(worktime.hours);
30189
30189
30190
30190
var result = false;
30191
- daysOfWeek.forEach(function(day){
30191
+ daysOfWeek.forEach(( function(day){
30192
30192
if(result){
30193
30193
return;
30194
30194
}
@@ -30201,7 +30201,7 @@ CalendarWorkTimeStrategy.prototype = {
30201
30201
// workday uses custom hours
30202
30202
result = this._checkWorkHours(dayConfig);
30203
30203
}
30204
- });
30204
+ }).bind(this)) ;
30205
30205
30206
30206
return result;
30207
30207
@@ -32016,13 +32016,13 @@ module.exports = function(gantt){
32016
32016
});
32017
32017
32018
32018
gantt.attachEvent("onGanttRender", function(){
32019
- gantt.eventRemove(document , "keydown", keyDownHandler);
32019
+ gantt.eventRemove(gantt.$root , "keydown", keyDownHandler);
32020
32020
gantt.eventRemove(gantt.$container, "focus", focusHandler);
32021
32021
gantt.eventRemove(gantt.$container, "mousedown", mousedownHandler);
32022
32022
32023
32023
if(gantt.config.keyboard_navigation){
32024
32024
32025
- gantt.event(document , "keydown", keyDownHandler);
32025
+ gantt.event(gantt.$root , "keydown", keyDownHandler);
32026
32026
gantt.event(gantt.$container, "focus", focusHandler);
32027
32027
gantt.event(gantt.$container, "mousedown", mousedownHandler);
32028
32028
gantt.$container.setAttribute("tabindex", "0");
@@ -32137,44 +32137,12 @@ module.exports = function(gantt){
32137
32137
return true;
32138
32138
});
32139
32139
32140
- function getActiveNode(){
32141
-
32142
- var activeElement = document.activeElement;
32143
- if(activeElement === document.body && document.getSelection){
32144
- activeElement = document.getSelection().focusNode || document.body;
32145
- }
32146
-
32147
- return activeElement;
32148
- }
32149
-
32150
32140
var interval = setInterval(function(){
32151
32141
if(!gantt.config.keyboard_navigation) return;
32152
-
32153
- var enable;
32154
- var focusElement = getActiveNode();
32155
-
32156
- var parent = gantt.$container;
32157
- // halt key nav when focus is outside gantt or in quick info popup
32158
- if(!focusElement || gantt._locate_css(focusElement, "gantt_cal_quick_info")){
32159
- enable = false;
32160
- }else{
32161
- while(focusElement != parent && focusElement){
32162
- focusElement = focusElement.parentNode;
32163
- }
32164
-
32165
- if(focusElement == parent){
32166
- enable = true;
32167
- }else{
32168
- enable = false;
32169
- }
32170
- }
32171
-
32172
- if(enable && !dispatcher.isEnabled()){
32142
+ if(!dispatcher.isEnabled()){
32173
32143
dispatcher.enable();
32174
- }else if(!enable && dispatcher.isEnabled()){
32175
- dispatcher.disable();
32176
32144
}
32177
-
32145
+ return;
32178
32146
}, 500);
32179
32147
32180
32148
gantt.attachEvent("onDestroy", function(){
@@ -32604,13 +32572,11 @@ module.exports = function(gantt) {
32604
32572
32605
32573
enable: function () {
32606
32574
this.isActive = true;
32607
- this.globalNode.enable();
32608
32575
this.setActiveNode(this.getActiveNode());
32609
32576
},
32610
32577
32611
32578
disable: function () {
32612
32579
this.isActive = false;
32613
- this.globalNode.disable();
32614
32580
},
32615
32581
32616
32582
isEnabled: function () {
@@ -32768,13 +32734,6 @@ module.exports = function(gantt) {
32768
32734
32769
32735
},
32770
32736
32771
- disable: function () {
32772
- gantt.$container.setAttribute("tabindex", "0");
32773
- },
32774
- enable: function () {
32775
- if (gantt.$container)
32776
- gantt.$container.removeAttribute("tabindex");
32777
- },
32778
32737
isEnabled: function () {
32779
32738
return gantt.$container.hasAttribute("tabindex");
32780
32739
},
@@ -35511,7 +35470,7 @@ exports.Undo = Undo;
35511
35470
35512
35471
function DHXGantt(){
35513
35472
this.constants = __webpack_require__(/*! ../constants */ "./sources/constants/index.js");
35514
- this.version = "7.0.2 ";
35473
+ this.version = "7.0.3 ";
35515
35474
this.license = "gpl";
35516
35475
this.templates = {};
35517
35476
this.ext = {};
0 commit comments