jsgantt-improved
Advanced tools
Comparing version 2.6.5 to 2.7.0
@@ -19,6 +19,17 @@ "use strict"; | ||
]; | ||
var COLUMNS_TYPES = { | ||
'vShowRes': 'res', | ||
'vShowDur': 'dur', | ||
'vShowComp': 'comp', | ||
'vShowStartDate': 'startdate', | ||
'vShowEndDate': 'enddate', | ||
'vShowPlanStartDate': 'planstartdate', | ||
'vShowPlanEndDate': 'planenddate', | ||
'vShowCost': 'cost', | ||
'vShowAddEntries': 'addentries' | ||
}; | ||
exports.draw_header = function (column, i, vTmpRow, vTaskList, vEditable, vEventsChange, vEvents, vDateTaskTableDisplayFormat, vAdditionalHeaders, vFormat, vLangs, vLang, vResources, Draw) { | ||
var vTmpCell, vTmpDiv; | ||
if ('vShowRes' === column) { | ||
vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gresource'); | ||
vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gres'); | ||
var text = draw_utils_1.makeInput(vTaskList[i].getResource(), vEditable, 'resource', vTaskList[i].getResource(), vResources); | ||
@@ -31,3 +42,3 @@ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text); | ||
if ('vShowDur' === column) { | ||
vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gduration'); | ||
vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gdur'); | ||
var text = draw_utils_1.makeInput(vTaskList[i].getDuration(vFormat, vLangs[vLang]), vEditable, 'text', vTaskList[i].getDuration()); | ||
@@ -40,3 +51,3 @@ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text); | ||
if ('vShowComp' === column) { | ||
vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gpccomplete'); | ||
vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gcomp'); | ||
var text = draw_utils_1.makeInput(vTaskList[i].getCompStr(), vEditable, 'percentage', vTaskList[i].getCompVal()); | ||
@@ -117,18 +128,2 @@ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text); | ||
exports.draw_bottom = function (column, vTmpRow, vAdditionalHeaders) { | ||
if ('vShowRes' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gresource', '\u00A0'); | ||
if ('vShowDur' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gduration', '\u00A0'); | ||
if ('vShowComp' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gpccomplete', '\u00A0'); | ||
if ('vShowStartDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gstartdate', '\u00A0'); | ||
if ('vShowEndDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning genddate', '\u00A0'); | ||
if ('vShowPlanStartDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gplanstartdate', '\u00A0'); | ||
if ('vShowPlanEndDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gplanenddate', '\u00A0'); | ||
if ('vShowCost' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gcost', '\u00A0'); | ||
if ('vAdditionalHeaders' === column && vAdditionalHeaders) { | ||
@@ -141,49 +136,23 @@ for (var key in vAdditionalHeaders) { | ||
} | ||
if ('vShowAddEntries' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gaddentries', '\u00A0'); | ||
}; | ||
exports.draw_list_headings = function (column, vTmpRow, vAdditionalHeaders) { | ||
if ('vShowRes' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gresource', '\u00A0'); | ||
if ('vShowDur' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gduration', '\u00A0'); | ||
if ('vShowComp' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gpccomplete', '\u00A0'); | ||
if ('vShowStartDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gstartdate', '\u00A0'); | ||
if ('vShowEndDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning genddate', '\u00A0'); | ||
if ('vShowPlanStartDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gstartdate', '\u00A0'); | ||
if ('vShowPlanEndDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gplanenddate', '\u00A0'); | ||
if ('vShowCost' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gcost', '\u00A0'); | ||
if ('vAdditionalHeaders' === column && vAdditionalHeaders) { | ||
for (var key in vAdditionalHeaders) { | ||
var header = vAdditionalHeaders[key]; | ||
var css = header.class ? header.class : "gadditional-" + key; | ||
draw_utils_1.newNode(vTmpRow, 'td', null, "gspanning gadditional " + css, '\u00A0'); | ||
} | ||
else { | ||
var type = COLUMNS_TYPES[column]; | ||
draw_utils_1.newNode(vTmpRow, 'td', null, "gspanning g" + type, '\u00A0'); | ||
} | ||
if ('vShowAddEntries' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gaddentries', '\u00A0'); | ||
}; | ||
exports.draw_task_headings = function (column, vTmpRow, vLangs, vLang, vAdditionalHeaders) { | ||
if ('vShowRes' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gresource', vLangs[vLang]['resource']); | ||
if ('vShowDur' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gduration', vLangs[vLang]['duration']); | ||
if ('vShowComp' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gpccomplete', vLangs[vLang]['comp']); | ||
if ('vShowStartDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gstartdate', vLangs[vLang]['startdate']); | ||
if ('vShowEndDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading genddate', vLangs[vLang]['enddate']); | ||
if ('vShowPlanStartDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gplanstartdate', vLangs[vLang]['planstartdate']); | ||
if ('vShowPlanEndDate' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gplanenddate', vLangs[vLang]['planenddate']); | ||
if ('vShowCost' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gcost', vLangs[vLang]['cost']); | ||
// export const draw_list_headings = function (column, vTmpRow, vAdditionalHeaders, vEvents) { | ||
// let nodeCreated; | ||
// if ('vAdditionalHeaders' === column && vAdditionalHeaders) { | ||
// for (const key in vAdditionalHeaders) { | ||
// const header = vAdditionalHeaders[key]; | ||
// const css = header.class ? header.class : `gadditional-${key}`; | ||
// newNode(vTmpRow, 'td', null, `gspanning gadditional ${css}`, '\u00A0'); | ||
// } | ||
// } else { | ||
// const type = COLUMNS_TYPES[column]; | ||
// nodeCreated = newNode(vTmpRow, 'td', null, `gspanning g${type}`, '\u00A0'); | ||
// addListenerClickCell(nodeCreated, vEvents, { hader: true, column }, type); | ||
// } | ||
// } | ||
exports.draw_task_headings = function (column, vTmpRow, vLangs, vLang, vAdditionalHeaders, vEvents) { | ||
var nodeCreated; | ||
if ('vAdditionalHeaders' === column && vAdditionalHeaders) { | ||
@@ -194,8 +163,11 @@ for (var key in vAdditionalHeaders) { | ||
var css = header.class ? header.class : "gadditional-" + key; | ||
draw_utils_1.newNode(vTmpRow, 'td', null, "gtaskheading gadditional " + css, text); | ||
nodeCreated = draw_utils_1.newNode(vTmpRow, 'td', null, "gtaskheading gadditional " + css, text); | ||
} | ||
} | ||
if ('vShowAddEntries' === column) | ||
draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gaddentries', vLangs[vLang]['addentries']); | ||
else { | ||
var type = COLUMNS_TYPES[column]; | ||
nodeCreated = draw_utils_1.newNode(vTmpRow, 'td', null, "gtaskheading g" + type, vLangs[vLang][type]); | ||
events_1.addListenerClickCell(nodeCreated, vEvents, { hader: true, column: column }, type); | ||
} | ||
}; | ||
//# sourceMappingURL=draw_columns.js.map |
@@ -182,3 +182,3 @@ "use strict"; | ||
if (_this[column] == 1 || column === 'vAdditionalHeaders') { | ||
draw_columns_1.draw_task_headings(column, vTmpRow, _this.vLangs, _this.vLang, _this.vAdditionalHeaders); | ||
draw_columns_1.draw_task_headings(column, vTmpRow, _this.vLangs, _this.vLang, _this.vAdditionalHeaders, _this.vEvents); | ||
} | ||
@@ -185,0 +185,0 @@ }); |
@@ -42,4 +42,4 @@ "use strict"; | ||
'sat': ' Sab', | ||
'resource': 'Recurso', | ||
'duration': 'Duración', | ||
'res': 'Recurso', | ||
'dur': 'Duración', | ||
'comp': '% Compl.', | ||
@@ -100,4 +100,4 @@ 'completion': 'Completado', | ||
'qtrs': 'Qtrs', | ||
'resource': 'Resource', | ||
'duration': 'Duration', | ||
'res': 'Resource', | ||
'dur': 'Duration', | ||
'comp': '% Comp.', | ||
@@ -175,4 +175,4 @@ 'completion': 'Completion', | ||
'qtrs': 'Quartal', | ||
'resource': 'Resource', | ||
'duration': 'Dauer', | ||
'res': 'Resource', | ||
'dur': 'Dauer', | ||
'comp': '%Fertig', | ||
@@ -248,4 +248,4 @@ 'completion': 'Fertigstellung', | ||
'notes': 'Notas', | ||
'resource': 'Responsável', | ||
'duration': 'Duração', | ||
'res': 'Responsável', | ||
'dur': 'Duração', | ||
'startdate': 'Data inicial', | ||
@@ -327,4 +327,4 @@ 'planstartdate': 'Plan Data inicial', | ||
'sat': ' Сб', | ||
'resource': 'Ресурс', | ||
'duration': 'Длительность', | ||
'res': 'Ресурс', | ||
'dur': 'Длительность', | ||
'comp': '% выполнения', | ||
@@ -404,4 +404,4 @@ 'completion': 'Выполнено', | ||
'sat': 'Sam', | ||
'resource': 'Ressource', | ||
'duration': 'Durée', | ||
'res': 'Ressource', | ||
'dur': 'Durée', | ||
'comp': '% Term.', | ||
@@ -478,4 +478,4 @@ 'completion': 'Terminé', | ||
'sat': '星期六', | ||
'resource': '資源', | ||
'duration': '時程', | ||
'res': '資源', | ||
'dur': '時程', | ||
'comp': '達成率', | ||
@@ -535,4 +535,4 @@ 'completion': '達成', | ||
'qtrs': 'Q', | ||
'resource': 'Resurs', | ||
'duration': 'Tidsåtgång', | ||
'res': 'Resurs', | ||
'dur': 'Tidsåtgång', | ||
'comp': '% klart', | ||
@@ -609,4 +609,4 @@ 'completion': 'Klart', | ||
'qtrs': 'kwartalen', | ||
'resource': 'Resource', | ||
'duration': 'Doorlooptijd', | ||
'res': 'Resource', | ||
'dur': 'Doorlooptijd', | ||
'comp': '% gereed', | ||
@@ -683,4 +683,4 @@ 'completion': 'Gereed', | ||
'qtrs': 'Krtl', | ||
'resource': 'Sumber Daya', | ||
'duration': 'Durasi', | ||
'res': 'Sumber Daya', | ||
'dur': 'Durasi', | ||
'comp': '% Penyelesaian', | ||
@@ -757,4 +757,4 @@ 'completion': 'Penyelesaian', | ||
'qtrs': 'Çyrk', | ||
'resource': 'Kaynak', | ||
'duration': 'Süre', | ||
'res': 'Kaynak', | ||
'dur': 'Süre', | ||
'comp': '% Tamamlanma.', | ||
@@ -831,4 +831,4 @@ 'completion': 'Tamamlanma', | ||
'qtrs': '四半期', | ||
'resource': 'リソース', | ||
'duration': '期間', | ||
'res': 'リソース', | ||
'dur': '期間', | ||
'comp': '進捗率', | ||
@@ -906,4 +906,4 @@ 'completion': '進捗率', | ||
'qtrs': 'Kvar', | ||
'resource': 'Přiřazeno', | ||
'duration': 'Trvání', | ||
'res': 'Přiřazeno', | ||
'dur': 'Trvání', | ||
'comp': '% Hotovo', | ||
@@ -981,4 +981,4 @@ 'completion': 'Hotovo', | ||
'qtrs': 'NÉ', | ||
'resource': 'Erőforrás', | ||
'duration': 'Időtartam', | ||
'res': 'Erőforrás', | ||
'dur': 'Időtartam', | ||
'comp': '% Kész', | ||
@@ -1056,4 +1056,4 @@ 'completion': 'Elkészült', | ||
'qtrs': '분기', | ||
'resource': '이름', | ||
'duration': '기간', | ||
'res': '이름', | ||
'dur': '기간', | ||
'comp': '% ', | ||
@@ -1060,0 +1060,0 @@ 'completion': '완료', |
@@ -302,3 +302,3 @@ | ||
|_setShowDeps():_ |Controls display of dependancy lines, defaults to 1 (show dependencies)| | ||
|_setEvents():_ |Controls events when a task is click in table data. You have to pass an object with the column and function. ex.: ` vEvents: { taskname: console.log, res: console.log }`| | ||
|_setEvents():_ |Controls events when a task is click in table data. You have to pass an object with the column and function. If the user click in the header, the event willbe triggered btu instead of the task will be a object about the header. ex.: ` vEvents: { taskname: console.log, res: console.log }`| | ||
|_setEventClickRow():_ |Controls events when a task row is clicked. Pass a function to execute ex.: `vEventClickRow: function(e){console.log(e)}`| | ||
@@ -305,0 +305,0 @@ |setEventClickCollapse():_ |Controls events when a group task is collapsed (open or close events). Pass a function to execute ex.: `vEventClickCollapse: function(e){console.log(e)}`| |
{ | ||
"name": "jsgantt-improved", | ||
"version": "2.6.5", | ||
"version": "2.7.0", | ||
"description": "jsgantt-improved", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4807949
113169