Commit c4ab91dd authored by 郭铭瑶's avatar 郭铭瑶 🤘

更新

parent 586ad073
......@@ -36,6 +36,7 @@ module.exports = {
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'#': resolve('static')
}
},
module: {
......
<template>
<a-locale-provider :locale="locale">
<div id="app">
<router-view/>
<router-view :key="$route.path"/>
</div>
</a-locale-provider>
</template>
......
......@@ -7,11 +7,12 @@
</template>
<script>
import gantt from 'dhtmlx-gantt'
import 'dhtmlx-gantt/codebase/ext/dhtmlxgantt_tooltip'
import gantt from '#/dhtmlx-gantt/codebase/dhtmlxgantt.js'
import '#/dhtmlx-gantt/codebase/ext/dhtmlxgantt_tooltip'
import GanttModal from './gantt-modal'
import './locale_cn'
import {config, template} from './gantt-config'
import '#/dhtmlx-gantt/codebase/dhtmlxgantt.css'
export default {
name: 'GanttChart',
components: {
......@@ -184,12 +185,26 @@ export default {
</script>
<style>
@import "dhtmlx-gantt/codebase/dhtmlxgantt.css";
.weekend {
background: #f4f7f4;
}
.gantt_selected .weekend {
background: #f7eb91;
/* background: #f7eb91; */
background: #e4ecf3;
}
.gantt_grid_data .gantt_row.gantt_selected,
.gantt_grid_data .gantt_row.odd.gantt_selected,
.gantt_task_row.gantt_selected,
.gantt_row.gantt_row_task:hover,
.gantt_row.odd.gantt_row_task:hover {
background: #eff4f9;
}
/* .gantt_row.gantt_row_task:hover > .gantt_cell,
.gantt_row.odd.gantt_row_task:hover > .gantt_cell {
color: #55bc8a;
} */
.gantt_task_row.gantt_selected .gantt_task_cell {
border-right-color: #eff4f9;
}
.baseline {
position: absolute;
......
......@@ -54,20 +54,18 @@ export default {
const result = []
data.forEach(item => {
// TODO 这里把没有任务的人员去掉了,看以后需不需要
if (item.task && item.task.length > 0) {
if (item.tasks && item.tasks.length > 0) {
result.push({
name: item.resource || '',
name: item.name || '',
id: item.id,
dataId: item.id,
text: '',
start_date: null,
end_date: null,
})
item.task.forEach(task => {
item.tasks.forEach(task => {
result.push({
id: task.tid,
dataId: task.id,
name: item.resource || '',
id: task.id,
name: item.name || '',
text: task.name || '',
start_date: this.$com.formatDate(task.start),
end_date: this.$com.formatDate(task.finish),
......@@ -116,11 +114,10 @@ export default {
const data = this.$com.confirm(res[0], 'data.content', [])
const baseData = this.$com.confirm(res[1], 'data.content.content1', [])
this.tasks.data = data.map(item => {
const plan = baseData.find(base => base.tid === item.tid)
const plan = baseData.find(base => base.id === item.id)
const result = {
id: item.tid,
dataId: item.id,
name: item.resource || '',
id: item.id,
name: (item.resource && item.resource.name) || '',
text: item.name || '',
start_date: this.$com.formatDate(item.start),
end_date: this.$com.formatDate(item.finish),
......@@ -143,8 +140,9 @@ export default {
tid: dataId,
speed: progress,
},
hideLoading: true,
}).then(res => {
this.$message.success('调整进度成功')
// this.$message.success('调整进度成功')
})
},
handleTaskChange({task, parentTask}) {
......
{
"name": "gantt",
"version": "6.2.7",
"homepage": "https://dhtmlx.com/docs/products/dhtmlxGantt/",
"description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.",
"main": [
"codebase/dhtmlxgantt.js",
"codebase/dhtmlxgantt.css"
],
"keywords": [
"gantt",
"chart",
"gantt chart",
"calendar",
"scheduler",
"dhtmlx",
"dhtmlxgantt",
"timeline",
"browser"
],
"license": "GPL-2.0"
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
@license
dhtmlxGantt v.6.2.7 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at sales@dhtmlx.com
(c) XB Software Ltd.
*/
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var a=e();for(var n in a)("object"==typeof exports?exports:t)[n]=a[n]}}(window,function(){return function(t){var e={};function a(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(n,r,function(e){return t[e]}.bind(null,r));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/codebase/",a(a.s=232)}({232:function(t,e){gantt.date.date_to_str=function(t,e){return function(a){return t.replace(/%[a-zA-Z]/g,function(t){switch(t){case"%d":return e?gantt.date.to_fixed(a.getUTCDate()):gantt.date.to_fixed(a.getDate());case"%m":return e?gantt.date.to_fixed(a.getUTCMonth()+1):gantt.date.to_fixed(a.getMonth()+1);case"%j":return e?a.getUTCDate():a.getDate();case"%n":return e?a.getUTCMonth()+1:a.getMonth()+1;case"%y":return e?gantt.date.to_fixed(a.getUTCFullYear()%100):gantt.date.to_fixed(a.getFullYear()%100);case"%Y":return e?a.getUTCFullYear():a.getFullYear();case"%D":return e?gantt.locale.date.day_short[a.getUTCDay()]:gantt.locale.date.day_short[a.getDay()];case"%l":return e?gantt.locale.date.day_full[a.getUTCDay()]:gantt.locale.date.day_full[a.getDay()];case"%M":return e?gantt.locale.date.month_short[a.getUTCMonth()]:gantt.locale.date.month_short[a.getMonth()];case"%F":return e?gantt.locale.date.month_full[a.getUTCMonth()]:gantt.locale.date.month_full[a.getMonth()];case"%h":return e?gantt.date.to_fixed((a.getUTCHours()+11)%12+1):gantt.date.to_fixed((a.getHours()+11)%12+1);case"%g":return e?(a.getUTCHours()+11)%12+1:(a.getHours()+11)%12+1;case"%G":return e?a.getUTCHours():a.getHours();case"%H":return e?gantt.date.to_fixed(a.getUTCHours()):gantt.date.to_fixed(a.getHours());case"%i":return e?gantt.date.to_fixed(a.getUTCMinutes()):gantt.date.to_fixed(a.getMinutes());case"%a":return e?a.getUTCHours()>11?"pm":"am":a.getHours()>11?"pm":"am";case"%A":return e?a.getUTCHours()>11?"PM":"AM":a.getHours()>11?"PM":"AM";case"%s":return e?gantt.date.to_fixed(a.getUTCSeconds()):gantt.date.to_fixed(a.getSeconds());case"%W":return e?gantt.date.to_fixed(gantt.date.getUTCISOWeek(a)):gantt.date.to_fixed(gantt.date.getISOWeek(a));default:return t}})}},gantt.date.str_to_date=function(t,e){return function(a){for(var n=[0,0,1,0,0,0],r=a.match(/[a-zA-Z]+|[0-9]+/g),o=t.match(/%[a-zA-Z]/g),u=0;u<o.length;u++)switch(o[u]){case"%j":case"%d":n[2]=r[u]||1;break;case"%n":case"%m":n[1]=(r[u]||1)-1;break;case"%y":n[0]=1*r[u]+(r[u]>50?1900:2e3);break;case"%g":case"%G":case"%h":case"%H":n[3]=r[u]||0;break;case"%i":n[4]=r[u]||0;break;case"%Y":n[0]=r[u]||0;break;case"%a":case"%A":n[3]=n[3]%12+("am"==(r[u]||"").toLowerCase()?0:12);break;case"%s":n[5]=r[u]||0;break;case"%M":n[1]=gantt.locale.date.month_short_hash[r[u]]||0;break;case"%F":n[1]=gantt.locale.date.month_full_hash[r[u]]||0}return e?new Date(Date.UTC(n[0],n[1],n[2],n[3],n[4],n[5])):new Date(n[0],n[1],n[2],n[3],n[4],n[5])}},gantt.config.task_attribute="data-task-id",gantt.config.link_attribute="data-link-id",gantt.config.grid_resizer_column_attribute="data-column-index",gantt.config.grid_resizer_attribute="data-grid-resizer"}})});
//# sourceMappingURL=dhtmlxgantt_csp.js.map
\ No newline at end of file
This diff is collapsed.
/*
@license
dhtmlxGantt v.6.2.7 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at sales@dhtmlx.com
(c) XB Software Ltd.
*/
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var l=t[o]={i:o,l:!1,exports:{}};return e[o].call(l.exports,l,l.exports,n),l.l=!0,l.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(o,l,function(t){return e[t]}.bind(null,l));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/codebase/",n(n.s=231)}({231:function(e,t){!function(){var e=gantt.getState;function t(){var e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;return e&&e===document.body}gantt.getState=function(){var n=e.apply(this,arguments);return n.fullscreen=t(),n};var n=!1,o={width:null,height:null,top:null,position:null,modified:!1};function l(e){e?(!function(){var e=gantt.$root;o.width=e.style.width,o.height=e.style.height,o.top=e.style.top,o.position=e.style.position,e.style.width="100vw",e.style.height="100vh",e.style.top="0",e.style.position="absolute",o.modified=!0}(),setTimeout(function(){gantt.render()})):(!function(){var e=gantt.$root;o.modified&&(e.style.width=o.width,e.style.height=o.height,e.style.top=o.top,e.style.position=o.position,o.modified=!1)}(),gantt.render())}function u(){if(gantt.$container){var e=t();l(e),e?(n=!0,setTimeout(function(){gantt.callEvent("onExpand")})):n&&(n=!1,setTimeout(function(){gantt.callEvent("onCollapse")}))}}function r(){return!gantt.$container||!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&((console.warning||console.log)("The `fullscreen` feature not being allowed, or full-screen mode not being supported"),!0)}gantt.attachEvent("onGanttReady",function(){gantt.event(document,"webkitfullscreenchange",u),gantt.event(document,"mozfullscreenchange",u),gantt.event(document,"MSFullscreenChange",u),gantt.event(document,"fullscreenChange",u),gantt.event(document,"fullscreenchange",u)}),gantt.expand=function(){if(!r()&&gantt.callEvent("onBeforeExpand",[])){var e=document.body;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}},gantt.collapse=function(){r()||t()&&gantt.callEvent("onBeforeCollapse",[])&&(document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen())}}()}})});
//# sourceMappingURL=dhtmlxgantt_fullscreen.js.map
\ No newline at end of file
This diff is collapsed.
/*
@license
dhtmlxGantt v.6.2.7 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at sales@dhtmlx.com
(c) XB Software Ltd.
*/
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var a in r)("object"==typeof exports?exports:t)[a]=r[a]}}(window,function(){return function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(a,n,function(e){return t[e]}.bind(null,n));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/codebase/",r(r.s=219)}({219:function(t,e){!function(){function t(t){if(!gantt.config.show_markers)return!1;if(!t.start_date)return!1;var e=gantt.getState();if(!(+t.start_date>+e.max_date||(!t.end_date||+t.end_date<+e.min_date)&&+t.start_date<+e.min_date)){var r=document.createElement("div");r.setAttribute("data-marker-id",t.id);var a="gantt_marker";gantt.templates.marker_class&&(a+=" "+gantt.templates.marker_class(t)),t.css&&(a+=" "+t.css),t.title&&(r.title=t.title),r.className=a;var n=gantt.posFromDate(t.start_date);if(r.style.left=n+"px",r.style.height=Math.max(gantt.getRowTop(gantt.getVisibleTaskCount()),0)+"px",t.end_date){var o=gantt.posFromDate(t.end_date);r.style.width=Math.max(o-n,0)+"px"}return t.text&&(r.innerHTML="<div class='gantt_marker_content' >"+t.text+"</div>"),r}}function e(){if(gantt.$task_data){var t=document.createElement("div");t.className="gantt_marker_area",gantt.$task_data.appendChild(t),gantt.$marker_area=t}}gantt._markers||(gantt._markers=gantt.createDatastore({name:"marker",initItem:function(t){return t.id=t.id||gantt.uid(),t}})),gantt.config.show_markers=!0,gantt.attachEvent("onBeforeGanttRender",function(){gantt.$marker_area||e()}),gantt.attachEvent("onDataRender",function(){gantt.$marker_area||(e(),gantt.renderMarkers())}),gantt.attachEvent("onGanttReady",function(){e(),gantt.$services.getService("layers").createDataRender({name:"marker",defaultContainer:function(){return gantt.$marker_area}}).addLayer(t)}),gantt.getMarker=function(t){return this._markers?this._markers.getItem(t):null},gantt.addMarker=function(t){return this._markers.addItem(t)},gantt.deleteMarker=function(t){return!!this._markers.exists(t)&&(this._markers.removeItem(t),!0)},gantt.updateMarker=function(t){this._markers.refresh(t)},gantt._getMarkers=function(){return this._markers.getItems()},gantt.renderMarkers=function(){this._markers.refresh()}}()}})});
//# sourceMappingURL=dhtmlxgantt_marker.js.map
\ No newline at end of file
This diff is collapsed.
/*
@license
dhtmlxGantt v.6.2.7 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at sales@dhtmlx.com
(c) XB Software Ltd.
*/
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var s in n)("object"==typeof exports?exports:t)[s]=n[s]}}(window,function(){return function(t){var e={};function n(s){if(e[s])return e[s].exports;var l=e[s]={i:s,l:!1,exports:{}};return t[s].call(l.exports,l,l.exports,n),l.l=!0,l.exports}return n.m=t,n.c=e,n.d=function(t,e,s){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var l in t)n.d(s,l,function(e){return t[e]}.bind(null,l));return s},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/codebase/",n(n.s=218)}({218:function(t,e){gantt.config.multiselect=!0,gantt.config.multiselect_one_level=!1,gantt._multiselect={_selected:{},_one_level:!1,_active:!0,_first_selected_when_shift:null,getDefaultSelected:function(){var t=this.getSelected();return t.length?t[t.length-1]:null},setFirstSelected:function(t){this._first_selected_when_shift=t},getFirstSelected:function(){return this._first_selected_when_shift},isActive:function(){return this.updateState(),this._active},updateState:function(){this._one_level=gantt.config.multiselect_one_level;var t=this._active;this._active=gantt.config.multiselect,this._active!=t&&this.reset()},reset:function(){this._selected={}},setLastSelected:function(t){gantt.$data.tasksStore.silent(function(){var e=gantt.$data.tasksStore;t?e.select(t+""):e.unselect(null)})},getLastSelected:function(){var t=gantt.$data.tasksStore.getSelectedId();return t&&gantt.isTaskExists(t)?t:null},select:function(t,e){return!!(t&&gantt.callEvent("onBeforeTaskMultiSelect",[t,!0,e])&&gantt.callEvent("onBeforeTaskSelected",[t]))&&(this._selected[t]=!0,this.setLastSelected(t),this.afterSelect(t),gantt.callEvent("onTaskMultiSelect",[t,!0,e]),gantt.callEvent("onTaskSelected",[t]),!0)},toggle:function(t,e){this._selected[t]?this.unselect(t,e):this.select(t,e)},unselect:function(t,e){t&&gantt.callEvent("onBeforeTaskMultiSelect",[t,!1,e])&&(this._selected[t]=!1,this.getLastSelected()==t&&this.setLastSelected(this.getDefaultSelected()),this.afterSelect(t),gantt.callEvent("onTaskMultiSelect",[t,!1,e]),gantt.callEvent("onTaskUnselected",[t]))},isSelected:function(t){return!(!gantt.isTaskExists(t)||!this._selected[t])},getSelected:function(){var t=[];for(var e in this._selected)this._selected[e]&&gantt.isTaskExists(e)?t.push(e):this._selected[e]=!1;return t.sort(function(t,e){return gantt.getGlobalTaskIndex(t)>gantt.getGlobalTaskIndex(e)?1:-1}),t},forSelected:function(t){for(var e=this.getSelected(),n=0;n<e.length;n++)t(e[n])},isSameLevel:function(t){if(!this._one_level)return!0;var e=this.getLastSelected();return!e||(!gantt.isTaskExists(e)||!gantt.isTaskExists(t)||!(gantt.calculateTaskLevel(gantt.getTask(e))!=gantt.calculateTaskLevel(gantt.getTask(t))))},afterSelect:function(t){gantt.isTaskExists(t)&&gantt.refreshTask(t)},doSelection:function(t){if(!this.isActive())return!1;if(gantt._is_icon_open_click(t))return!1;var e=gantt.locate(t);if(!e)return!1;if(!gantt.callEvent("onBeforeMultiSelect",[t]))return!1;var n=this.getSelected(),s=this.getFirstSelected(),l=!1,i=this.getLastSelected();if(t.shiftKey?gantt.isTaskExists(this.getFirstSelected())&&null!==this.getFirstSelected()||this.setFirstSelected(e):(t.ctrlKey||t.metaKey)&&this.isSelected(e)||this.setFirstSelected(e),t.ctrlKey||t.metaKey)e&&this.toggle(e,t);else if(t.shiftKey&&n.length)if(i){if(e){for(var a=gantt.getGlobalTaskIndex(this.getFirstSelected()),c=gantt.getGlobalTaskIndex(e),r=gantt.getGlobalTaskIndex(i),u=i;gantt.getGlobalTaskIndex(u)!==a;)this.unselect(u,t),u=a>r?gantt.getNext(u):gantt.getPrev(u);for(u=e;gantt.getGlobalTaskIndex(u)!==a;)this.select(u,t)&&!l&&(l=!0,s=u),u=a>c?gantt.getNext(u):gantt.getPrev(u)}}else i=e;else{this.isSelected(e)||this.select(e,t),n=this.getSelected();for(var o=0;o<n.length;o++)n[o]!==e&&this.unselect(n[o],t)}return this.isSelected(e)?this.setLastSelected(e):s?e==i&&this.setLastSelected(t.shiftKey?s:this.getDefaultSelected()):this.setLastSelected(null),this.getSelected().length||this.setLastSelected(null),this.getLastSelected()&&this.isSelected(this.getFirstSelected())||this.setFirstSelected(this.getLastSelected()),!0}},function(){var t=gantt.selectTask;gantt.selectTask=function(e){if(!e)return!1;var n=gantt._multiselect,s=e;return n.isActive()?(n.select(e,null)&&n.setLastSelected(e),n.setFirstSelected(n.getLastSelected())):s=t.call(this,e),s};var e=gantt.unselectTask;gantt.unselectTask=function(t){var n=gantt._multiselect,s=n.isActive();(t=t||n.getLastSelected())&&s&&(n.unselect(t,null),t==n.getLastSelected()&&n.setLastSelected(null),gantt.refreshTask(t),n.setFirstSelected(n.getLastSelected()));var l=t;return s||(l=e.call(this,t)),l},gantt.toggleTaskSelection=function(t){var e=gantt._multiselect;t&&e.isActive()&&(e.toggle(t),e.setFirstSelected(e.getLastSelected()))},gantt.getSelectedTasks=function(){var t=gantt._multiselect;return t.isActive(),t.getSelected()},gantt.eachSelectedTask=function(t){return this._multiselect.forSelected(t)},gantt.isSelectedTask=function(t){return this._multiselect.isSelected(t)},gantt.getLastSelectedTask=function(){return this._multiselect.getLastSelected()},gantt.attachEvent("onGanttReady",function(){gantt.$data.tasksStore.isSelected=function(t){return gantt._multiselect.isSelected(t)}})}(),gantt.attachEvent("onTaskIdChange",function(t,e){var n=gantt._multiselect;if(!n.isActive())return!0;gantt.isSelectedTask(t)&&(n.unselect(t,null),n.select(e,null))}),gantt.attachEvent("onAfterTaskDelete",function(t,e){var n=gantt._multiselect;if(!n.isActive())return!0;n._selected[t]&&(n.unselect(t,null),n._selected[t]=!1,n.setLastSelected(n.getDefaultSelected())),n.forSelected(function(t){gantt.isTaskExists(t)||n.unselect(t,null)})}),gantt.attachEvent("onBeforeTaskMultiSelect",function(t,e,n){var s=gantt._multiselect;return!(e&&s.isActive()&&s._one_level)||s.isSameLevel(t)}),gantt.attachEvent("onTaskClick",function(t,e){return gantt._multiselect.doSelection(e)&&gantt.callEvent("onMultiSelect",[e]),!0})}})});
//# sourceMappingURL=dhtmlxgantt_multiselect.js.map
\ No newline at end of file
/*
@license
dhtmlxGantt v.6.2.7 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at sales@dhtmlx.com
(c) XB Software Ltd.
*/
!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e=n();for(var i in e)("object"==typeof exports?exports:t)[i]=e[i]}}(window,function(){return function(t){var n={};function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(i,o,function(n){return t[n]}.bind(null,o));return i},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="/codebase/",e(e.s=217)}({217:function(t,n){function e(){var t=gantt.$task_data;return t&&t.offsetHeight&&t.offsetWidth?{parent:t,viewport:gantt.$task}:(t=gantt.$grid_data)&&t.offsetHeight&&t.offsetWidth?{parent:t,viewport:gantt.$grid}:{parent:gantt.$layout,viewport:gantt.$layout}}gantt.config.quickinfo_buttons=["icon_delete","icon_edit"],gantt.config.quick_info_detached=!0,gantt.config.show_quick_info=!0,gantt.attachEvent("onTaskClick",function(t){return setTimeout(function(){gantt.showQuickInfo(t)},0),!0}),function(){for(var t=["onEmptyClick","onViewChange","onLightbox","onBeforeTaskDelete","onBeforeDrag"],n=function(){return gantt._hideQuickInfo(),!0},e=0;e<t.length;e++)gantt.attachEvent(t[e],n)}(),function(){function t(){return gantt.hideQuickInfo(!0),gantt._quick_info_box=null,!0}gantt.attachEvent("onGanttReady",t),gantt.attachEvent("onDestroy",t)}(),gantt.templates.quick_info_title=function(t,n,e){return e.text.substr(0,50)},gantt.templates.quick_info_content=function(t,n,e){return e.details||e.text},gantt.templates.quick_info_date=function(t,n,e){return gantt.templates.task_time(t,n,e)},gantt.templates.quick_info_class=function(t,n,e){return""},gantt.showQuickInfo=function(t){if((t!=this._quick_info_box_id||!gantt.utils.dom.isChildOf(this._quick_info_box,document.body))&&this.config.show_quick_info){this.hideQuickInfo(!0);var n=e(),i=this._get_event_counter_part(t,6,n.viewport);i&&(this._quick_info_box=this._init_quick_info(i,t),this._quick_info_task=t,this._quick_info_box.className=gantt._prepare_quick_info_classname(t),this._fill_quick_data(t),this._show_quick_info(i,6),this.callEvent("onQuickInfo",[t]))}},gantt._hideQuickInfo=function(){gantt.hideQuickInfo()},gantt.hideQuickInfo=function(t){var n=this._quick_info_box;this._quick_info_box_id=0;var e=this._quick_info_task;if(this._quick_info_task=null,n&&n.parentNode){if(gantt.config.quick_info_detached)return this.callEvent("onAfterQuickInfo",[e]),n.parentNode.removeChild(n);n.className+=" gantt_qi_hidden","auto"==n.style.right?n.style.left="-350px":n.style.right="-350px",t&&(n.style.left=n.style.right="",n.parentNode.removeChild(n)),this.callEvent("onAfterQuickInfo",[e])}},gantt.event(window,"keydown",function(t){27==t.keyCode&&gantt.hideQuickInfo()}),gantt._show_quick_info=function(t,n){var i=gantt._quick_info_box;if(gantt.config.quick_info_detached){var o=e();i.parentNode&&"#document-fragment"!=i.parentNode.nodeName.toLowerCase()||o.parent.appendChild(i);var a=i.offsetWidth,c=i.offsetHeight,f=gantt.getScrollState(),_=o.viewport.offsetWidth+f.x-a;i.style.left=Math.min(Math.max(f.x,t.left-t.dx*(a-t.width)),_)+"px",i.style.top=t.top-(t.dy?c+t.height+2*n:0)+"px"}else i.style.top="20px",1==t.dx?(i.style.right="auto",i.style.left="-300px",setTimeout(function(){i.style.left="10px"},1)):(i.style.left="auto",i.style.right="-300px",setTimeout(function(){i.style.right="10px"},1)),i.className+=" gantt_qi_"+(1==t.dx?"left":"right"),gantt.$root.appendChild(i)},gantt._prepare_quick_info_classname=function(t){var n=gantt.getTask(t),e="gantt_cal_quick_info",i=this.templates.quick_info_class(n.start_date,n.end_date,n);return i&&(e+=" "+i),e},gantt._init_quick_info=function(t,n){var i=gantt.getTask(n);if("boolean"==typeof this._quick_info_readonly&&this.isReadonly(i)!==this._quick_info_readonly&&(gantt.hideQuickInfo(!0),this._quick_info_box=null),this._quick_info_readonly=this.isReadonly(i),!this._quick_info_box){var o=this._quick_info_box=document.createElement("div");this._waiAria.quickInfoAttr(o);var a='<div class="gantt_cal_qi_title" '+(r=gantt._waiAria.quickInfoHeaderAttrString())+'><div class="gantt_cal_qi_tcontent"></div><div class="gantt_cal_qi_tdate"></div></div><div class="gantt_cal_qi_content"></div>';a+='<div class="gantt_cal_qi_controls">';for(var c=gantt.config.quickinfo_buttons,f={icon_delete:!0,icon_edit:!0},_=0;_<c.length;_++)if(!this._quick_info_readonly||!f[c[_]]){var r=gantt._waiAria.quickInfoButtonAttrString(gantt.locale.labels[c[_]]);a+='<div class="gantt_qi_big_icon '+c[_]+'" title="'+gantt.locale.labels[c[_]]+'" '+r+"><div class='gantt_menu_icon "+c[_]+"'></div><div>"+gantt.locale.labels[c[_]]+"</div></div>"}a+="</div>",o.innerHTML=a;if(gantt.event(o,"click",function(t){t=t||event,gantt._qi_button_click(t.target||t.srcElement)}),gantt.event(o,"keypress",function(t){var n=(t=t||event).which||event.keyCode;13!=n&&32!=n||setTimeout(function(){gantt._qi_button_click(t.target||t.srcElement)},1)}),gantt.config.quick_info_detached){var u=e();gantt.event(u,"scroll",function(){gantt.hideQuickInfo()})}}return this._quick_info_box},gantt._qi_button_click=function(t){var n=gantt._quick_info_box;if(t&&t!=n){var e=t.className;if(-1!=e.indexOf("_icon")){var i=gantt._quick_info_box_id;gantt.$click.buttons[e.split(" ")[1].replace("icon_","")](i)}else gantt._qi_button_click(t.parentNode)}},gantt._get_event_counter_part=function(t,n,e){var i=gantt.getTaskNode(t);if(!i&&!(i=gantt.getTaskRowNode(t)))return null;var o=0,a=n+i.offsetTop+i.offsetHeight,c=i;if(this.utils.dom.isChildOf(c,e))for(;c&&c!==e;)o+=c.offsetLeft,c=c.offsetParent;var f=this.getScrollState();return c?{left:o,top:a,dx:o+i.offsetWidth/2-f.x>gantt.$container.offsetWidth/2?1:0,dy:a+i.offsetHeight/2-f.y>gantt.$container.offsetHeight/2?1:0,width:i.offsetWidth,height:i.offsetHeight}:null},gantt._fill_quick_data=function(t){var n=gantt.getTask(t),e=gantt._quick_info_box;gantt._quick_info_box_id=t;var i={content:gantt.templates.quick_info_title(n.start_date,n.end_date,n),date:gantt.templates.quick_info_date(n.start_date,n.end_date,n)},o=e.firstChild.firstChild;o.innerHTML=i.content,o.nextSibling.innerHTML=i.date,gantt._waiAria.quickInfoHeader(e,[i.content,i.date].join(" ")),e.firstChild.nextSibling.innerHTML=gantt.templates.quick_info_content(n.start_date,n.end_date,n)}}})});
//# sourceMappingURL=dhtmlxgantt_quick_info.js.map
\ No newline at end of file
This diff is collapsed.
/*
@license
dhtmlxGantt v.6.2.7 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at sales@dhtmlx.com
(c) XB Software Ltd.
*/
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var a in n)("object"==typeof exports?exports:t)[a]=n[a]}}(window,function(){return function(t){var e={};function n(a){if(e[a])return e[a].exports;var i=e[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(a,i,function(e){return t[e]}.bind(null,i));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/codebase/",n(n.s=216)}({216:function(t,e){gantt.config.smart_rendering=!0,gantt._smart_render={getViewPort:function(){var t=gantt.$ui.getView("timeline"),e=gantt.$ui.getView("grid"),n=gantt.$layout;t&&t.isVisible()?n=t:e&&e.isVisible()&&(n=e);var a=n.getSize(),i=gantt.getScrollState();return{y:i.y,y_end:i.y+a.y,x:i.x,x_end:i.x+a.x}},getScrollSizes:function(){var t=gantt.getScrollState();return t.x=t.x||0,t.y=t.y||gantt.getVisibleTaskCount()*gantt.config.row_height,t},isInViewPort:function(t,e){return!!(t.y<e.y_end&&t.y_end>e.y)},isTaskDisplayed:function(t,e){return!(!gantt.$keyboardNavigation||!gantt.$keyboardNavigation.dispatcher.isTaskFocused(t))||this.isInViewPort(this.getTaskPosition(t),this.getViewPort())},isLinkDisplayed:function(t,e){return this.isInViewPort(this.getLinkPosition(t,e),this.getViewPort())},getTaskPosition:function(t){var e=gantt.getTaskTop(t);return{y:e,y_end:e+gantt.config.row_height}},getLinkPosition:function(t,e){var n=gantt.getTaskTop(e.source),a=gantt.getTaskTop(e.target);return{y:Math.min(n,a),y_end:Math.max(n,a)+gantt.config.row_height}},getRange:function(t){t=t||0;for(var e=this.getViewPort(),n=Math.floor(Math.max(0,e.y)/gantt.config.row_height)-t,a=Math.ceil(Math.max(0,e.y_end)/gantt.config.row_height)+t,i=gantt.$data.tasksStore.getIndexRange(n,a),r=[],o=0;o<i.length;o++)r.push(i[o].id);return r},_redrawItems:function(t,e){for(var n={},a=0;a<e.length;a++)n[e[a].id]=!0;for(var i={},r=0;r<t.length;r++){var o=t[r];for(var s in o.rendered)if(n[s]){var c=o.rendered[s];c&&c.parentNode&&(i[s]=!0)}else o.hide(s);for(a=0;a<e.length;a++)i[e[a].id]||o.restore(e[a])}},_getVisibleTasks:function(){for(var t=this.getRange(),e=[],n=0;n<t.length;n++){var a=gantt.getTask(t[n]);a.$index=n,gantt.resetProjectDates(a),e.push(a)}return e},_getVisibleLinks:function(){for(var t=[],e=gantt.$data.linksStore.getIndexRange(),n=0;n<e.length;n++)this.isLinkDisplayed(e[n].id,e[n])&&t.push(e[n]);return t},_recalculateLinkedProjects:function(t){for(var e={},n=0;n<t.length;n++)e[t[n].source]=!0,e[t[n].target]=!0;for(var n in e)gantt.isTaskExists(n)&&gantt.resetProjectDates(gantt.getTask(n))},updateRender:function(){gantt.callEvent("onBeforeSmartRender",[]);var t=this._getVisibleTasks(),e=this._getVisibleLinks();this._recalculateLinkedProjects(e);var n=gantt.$services.getService("layers"),a=n.getDataRender("task"),i=n.getDataRender("link");this._redrawTasks(a.getLayers(),t),this._redrawItems(i.getLayers(),e),gantt.callEvent("onSmartRender",[])},_redrawTasks:function(t,e){this._redrawItems(t,e)},cached:{},_takeFromCache:function(t,e,n){this.cached[n]||(this.cached[n]=null);var a=this.cached[n];return void 0!==t?(a||(a=this.cached[n]={}),void 0===a[t]&&(a[t]=e(t)),a[t]):(a||(a=e()),a)},initCache:function(){for(var t=["getLinkPosition","getTaskPosition","isTaskDisplayed","isLinkDisplayed","getViewPort","getScrollSizes"],e=0;e<t.length;e++){var n=t[e],a=gantt.bind(this[n],this);this[n]=function(t,e){return function(n){return this._takeFromCache(n,t,e)}}(a,n)}this.invalidateCache(),this.initCache=function(){}},invalidateCache:function(){var t=this;function e(){t.cached.getViewPort=null,t.cached.getScrollSizes=null,t.cached.isTaskDisplayed=null,t.cached.isLinkDisplayed=null}function n(){e(),t.cached.isTaskDisplayed=null,t.cached.isLinkDisplayed=null,t.cached.getLinkPosition=null,t.cached.getTaskPosition=null}gantt.attachEvent("onClear",function(){n()}),gantt.attachEvent("onParse",function(){n()}),gantt.attachEvent("onAfterLinkUpdate",function(e){t.cached.isLinkDisplayed&&(t.cached.isLinkDisplayed[e]=void 0),t.cached.getLinkPosition&&(t.cached.getLinkPosition[e]=void 0)}),gantt.attachEvent("onAfterTaskAdd",n),gantt.attachEvent("onAfterTaskDelete",n),gantt.attachEvent("onAfterTaskUpdate",function(e){t.cached.isTaskDisplayed&&(t.cached.isTaskDisplayed[e]=void 0),t.cached.getTaskPosition&&(t.cached.getTaskPosition[e]=void 0)}),gantt.attachEvent("onGanttScroll",e),gantt.attachEvent("onDataRender",n),this.invalidateCache=function(){}}},gantt.attachEvent("onGanttScroll",function(t,e,n,a){gantt.config.smart_rendering&&(e==a&&t!=n||gantt._smart_render.updateRender())}),gantt.attachEvent("onDataRender",function(){gantt.config.smart_rendering&&gantt._smart_render.updateRender()}),function(){var t=gantt.attachEvent("onGanttReady",function(){var e=gantt.$services.getService("layers");e.getDataRender("task").filters.push(function(t,e){return!gantt.config.smart_rendering||!!gantt._smart_render.isTaskDisplayed(t,e)}),e.getDataRender("link").filters.push(function(t,e){return!gantt.config.smart_rendering||!!gantt._smart_render.isLinkDisplayed(t,e)}),gantt.detachEvent(t)})}()}})});
//# sourceMappingURL=dhtmlxgantt_smart_rendering.js.map
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
@license
dhtmlxGantt v.6.2.7 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at sales@dhtmlx.com
(c) XB Software Ltd.
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(window, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/codebase/sources/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./sources/ext/csp.js");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./sources/ext/csp.js":
/*!****************************!*\
!*** ./sources/ext/csp.js ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports) {
/*
Compatibility with Content Security Policy
https://github.com/denys86/gantt/commit/f64f62f14086a8ec33d5667cfc5dc3a7e775fd2a
Removes evil JS. Inline styles are still used for rendering, may need to allow them or redefine unsafe methods
style-src 'unsafe-inline'
*/
gantt.date.date_to_str = function(format,utc){
return function(date) {
return format.replace(/%[a-zA-Z]/g, function (a) {
switch (a) {
case "%d": return utc ? gantt.date.to_fixed(date.getUTCDate()) : gantt.date.to_fixed(date.getDate());
case "%m": return utc ? gantt.date.to_fixed((date.getUTCMonth() + 1)) : gantt.date.to_fixed((date.getMonth() + 1));
case "%j": return utc ? date.getUTCDate() : date.getDate();
case "%n": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);
case "%y": return utc ? gantt.date.to_fixed(date.getUTCFullYear() % 100) : gantt.date.to_fixed(date.getFullYear() % 100);
case "%Y": return utc ? date.getUTCFullYear() : date.getFullYear();
case "%D": return utc ? gantt.locale.date.day_short[date.getUTCDay()] : gantt.locale.date.day_short[date.getDay()];
case "%l": return utc ? gantt.locale.date.day_full[date.getUTCDay()] : gantt.locale.date.day_full[date.getDay()];
case "%M": return utc ? gantt.locale.date.month_short[date.getUTCMonth()] : gantt.locale.date.month_short[date.getMonth()];
case "%F": return utc ? gantt.locale.date.month_full[date.getUTCMonth()] : gantt.locale.date.month_full[date.getMonth()];
case "%h": return utc ? gantt.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : gantt.date.to_fixed((date.getHours() + 11) % 12 + 1);
case "%g": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);
case "%G": return utc ? date.getUTCHours() : date.getHours();
case "%H": return utc ? gantt.date.to_fixed(date.getUTCHours()) : gantt.date.to_fixed(date.getHours());
case "%i": return utc ? gantt.date.to_fixed(date.getUTCMinutes()) : gantt.date.to_fixed(date.getMinutes());
case "%a": return utc ? (date.getUTCHours() > 11 ? "pm" : "am") : (date.getHours() > 11 ? "pm" : "am");
case "%A": return utc ? (date.getUTCHours() > 11 ? "PM" : "AM") : (date.getHours() > 11 ? "PM" : "AM");
case "%s": return utc ? gantt.date.to_fixed(date.getUTCSeconds()) : gantt.date.to_fixed(date.getSeconds());
case "%W": return utc ? gantt.date.to_fixed(gantt.date.getUTCISOWeek(date)) : gantt.date.to_fixed(gantt.date.getISOWeek(date));
default: return a;
}
});
};
};
gantt.date.str_to_date = function(format,utc){
return function(date) {
var set = [0, 0, 1, 0, 0, 0];
var temp = date.match(/[a-zA-Z]+|[0-9]+/g);
var mask = format.match(/%[a-zA-Z]/g);
for (var i = 0; i < mask.length; i++) {
switch (mask[i]) {
case "%j":
case "%d":
set[2] = temp[i] || 1;
break;
case "%n":
case "%m":
set[1] = (temp[i] || 1) - 1;
break;
case "%y":
set[0] = temp[i] * 1 + (temp[i] > 50 ? 1900 : 2000);
break;
case "%g":
case "%G":
case "%h":
case "%H":
set[3] = temp[i] || 0;
break;
case "%i":
set[4] = temp[i] || 0;
break;
case "%Y":
set[0] = temp[i] || 0;
break;
case "%a":
case "%A":
set[3] = set[3] % 12 + ((temp[i] || '').toLowerCase() == 'am' ? 0 : 12);
break;
case "%s":
set[5] = temp[i] || 0;
break;
case "%M":
set[1] = gantt.locale.date.month_short_hash[temp[i]] || 0;
break;
case "%F":
set[1] = gantt.locale.date.month_full_hash[temp[i]] || 0;
break;
default:
break;
}
}
if (utc) {
return new Date(Date.UTC(set[0], set[1], set[2], set[3], set[4], set[5]));
}
return new Date(set[0], set[1], set[2], set[3], set[4], set[5]);
};
};
// custom DOM attributes may be stripped in some environemnts, make sure data attributes used instead
gantt.config.task_attribute = "data-task-id";
gantt.config.link_attribute = "data-link-id";
gantt.config.grid_resizer_column_attribute = "data-column-index";
gantt.config.grid_resizer_attribute = "data-grid-resizer";
/***/ })
/******/ });
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment