11/*
22@license
33
4- dhtmlxGantt v.7.0.2 Standard
4+ dhtmlxGantt v.7.0.3 Standard
55
66This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77
@@ -15007,7 +15007,7 @@ module.exports = function(gantt){
1500715007
1500815008 if(mapping){
1500915009 return mapping;
15010- }else if(gantt.config.keyboard_navigation_cells){
15010+ }else if(gantt.config.keyboard_navigation_cells && gantt.ext.keyboardNavigation ){
1501115011 return keyNavMappings;
1501215012 }else{
1501315013 return defaultMapping;
@@ -29733,7 +29733,7 @@ CalendarWorkTimeStrategy.prototype = {
2973329733 equals: function (calendar) {
2973429734 if(!(calendar instanceof CalendarWorkTimeStrategy)){
2973529735 return false;
29736- }
29736+ }
2973729737
2973829738 var mySettings = this.getConfig();
2973929739 var thatSettings = calendar.getConfig();
@@ -29757,7 +29757,7 @@ CalendarWorkTimeStrategy.prototype = {
2975729757 var otherHours = mySettings.dates[timestamp];
2975829758
2975929759 // day settings not equal
29760- if(myHours !== otherHours &&
29760+ if(myHours !== otherHours &&
2976129761 // but still can be two arrays with the equivalent hour settings
2976229762 !(Array.isArray(myHours) && Array.isArray(otherHours) && this._arraysEqual(myHours, otherHours))
2976329763 ){
@@ -29821,7 +29821,7 @@ CalendarWorkTimeStrategy.prototype = {
2982129821 if(parsed[2]){
2982229822 value += parseInt(parsed[2]);
2982329823 }
29824-
29824+
2982529825 timestampRanges.push(value);
2982629826 });
2982729827
@@ -30171,7 +30171,7 @@ CalendarWorkTimeStrategy.prototype = {
3017130171
3017230172 /**
3017330173 * Check whether this calendar has working time. Calendar has working time only if there are regular working days of week
30174- *
30174+ *
3017530175 */
3017630176 hasWorkTime: function () {
3017730177 var worktime = this.getConfig();
@@ -30188,7 +30188,7 @@ CalendarWorkTimeStrategy.prototype = {
3018830188 var hasRegularHours = this._checkWorkHours(worktime.hours);
3018930189
3019030190 var result = false;
30191- daysOfWeek.forEach(function(day){
30191+ daysOfWeek.forEach(( function(day){
3019230192 if(result){
3019330193 return;
3019430194 }
@@ -30201,7 +30201,7 @@ CalendarWorkTimeStrategy.prototype = {
3020130201 // workday uses custom hours
3020230202 result = this._checkWorkHours(dayConfig);
3020330203 }
30204- });
30204+ }).bind(this)) ;
3020530205
3020630206 return result;
3020730207
@@ -32016,13 +32016,13 @@ module.exports = function(gantt){
3201632016 });
3201732017
3201832018 gantt.attachEvent("onGanttRender", function(){
32019- gantt.eventRemove(document , "keydown", keyDownHandler);
32019+ gantt.eventRemove(gantt.$root , "keydown", keyDownHandler);
3202032020 gantt.eventRemove(gantt.$container, "focus", focusHandler);
3202132021 gantt.eventRemove(gantt.$container, "mousedown", mousedownHandler);
3202232022
3202332023 if(gantt.config.keyboard_navigation){
3202432024
32025- gantt.event(document , "keydown", keyDownHandler);
32025+ gantt.event(gantt.$root , "keydown", keyDownHandler);
3202632026 gantt.event(gantt.$container, "focus", focusHandler);
3202732027 gantt.event(gantt.$container, "mousedown", mousedownHandler);
3202832028 gantt.$container.setAttribute("tabindex", "0");
@@ -32137,44 +32137,12 @@ module.exports = function(gantt){
3213732137 return true;
3213832138 });
3213932139
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-
3215032140 var interval = setInterval(function(){
3215132141 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()){
3217332143 dispatcher.enable();
32174- }else if(!enable && dispatcher.isEnabled()){
32175- dispatcher.disable();
3217632144 }
32177-
32145+ return;
3217832146 }, 500);
3217932147
3218032148 gantt.attachEvent("onDestroy", function(){
@@ -32604,13 +32572,11 @@ module.exports = function(gantt) {
3260432572
3260532573 enable: function () {
3260632574 this.isActive = true;
32607- this.globalNode.enable();
3260832575 this.setActiveNode(this.getActiveNode());
3260932576 },
3261032577
3261132578 disable: function () {
3261232579 this.isActive = false;
32613- this.globalNode.disable();
3261432580 },
3261532581
3261632582 isEnabled: function () {
@@ -32768,13 +32734,6 @@ module.exports = function(gantt) {
3276832734
3276932735 },
3277032736
32771- disable: function () {
32772- gantt.$container.setAttribute("tabindex", "0");
32773- },
32774- enable: function () {
32775- if (gantt.$container)
32776- gantt.$container.removeAttribute("tabindex");
32777- },
3277832737 isEnabled: function () {
3277932738 return gantt.$container.hasAttribute("tabindex");
3278032739 },
@@ -35511,7 +35470,7 @@ exports.Undo = Undo;
3551135470
3551235471function DHXGantt(){
3551335472 this.constants = __webpack_require__(/*! ../constants */ "./sources/constants/index.js");
35514- this.version = "7.0.2 ";
35473+ this.version = "7.0.3 ";
3551535474 this.license = "gpl";
3551635475 this.templates = {};
3551735476 this.ext = {};
0 commit comments