jsgantt-improved
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -397,2 +397,3 @@ "use strict"; | ||
vTmpDiv.appendChild(document.createTextNode('\u00A0' + this_1.vTaskList[i].getName())); | ||
events_1.addListenerClickCell(vTmpDiv, this_1.vEvents, this_1.vTaskList[i], 'taskname'); | ||
} | ||
@@ -402,2 +403,3 @@ else { | ||
vTmpDiv = this_1.newNode(vTmpCell, 'div', null, null, vCellContents + this_1.vTaskList[i].getName()); | ||
events_1.addListenerClickCell(vTmpCell, this_1.vEvents, this_1.vTaskList[i], 'taskname'); | ||
} | ||
@@ -404,0 +406,0 @@ if (this_1.vShowRes == 1) { |
@@ -136,5 +136,5 @@ "use strict"; | ||
exports.addListenerClickCell = function (vTmpCell, vEvents, task, column) { | ||
exports.addListener('click', function () { | ||
exports.addListener('click', function (e) { | ||
if (vEvents[column] && typeof vEvents[column] === 'function') { | ||
vEvents[column](task); | ||
vEvents[column](task, e, vTmpCell); | ||
} | ||
@@ -141,0 +141,0 @@ }, vTmpCell); |
@@ -393,3 +393,13 @@ "use strict"; | ||
vCellDiv = pCellDiv; }; //"typeof HTMLDivElement !== 'function'" to play nice with ie6 and 7 | ||
this.setGroup = function (pGroup) { vGroup = parseInt(document.createTextNode(pGroup).data); }; | ||
this.setGroup = function (pGroup) { | ||
if (pGroup === true || pGroup === 'true') { | ||
vGroup = 1; | ||
} | ||
else if (pGroup === false || pGroup === 'false') { | ||
vGroup = 0; | ||
} | ||
else { | ||
vGroup = parseInt(document.createTextNode(pGroup).data); | ||
} | ||
}; | ||
this.setBarDiv = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement) | ||
@@ -396,0 +406,0 @@ vBarDiv = pDiv; }; |
{ | ||
"name": "jsgantt-improved", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "jsgantt-improved", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -31,5 +31,8 @@ [![Build Status](https://travis-ci.com/jsGanttImproved/jsgantt-improved.svg?branch=master)](https://travis-ci.com/jsGanttImproved/jsgantt-improved) | ||
https://jsganttimproved.github.io/jsgantt-improved/docs/demo.html | ||
* https://jsganttimproved.github.io/jsgantt-improved/docs/demo.html | ||
Or use a live coding example at Codenpen: | ||
* https://codepen.io/mariomol/pen/mQzBPV | ||
## Easy to Use | ||
@@ -36,0 +39,0 @@ |
@@ -404,2 +404,3 @@ import * as lang from './lang'; | ||
vTmpDiv.appendChild(document.createTextNode('\u00A0' + this.vTaskList[i].getName())); | ||
addListenerClickCell(vTmpDiv, this.vEvents, this.vTaskList[i], 'taskname'); | ||
} | ||
@@ -409,2 +410,3 @@ else { | ||
vTmpDiv = this.newNode(vTmpCell, 'div', null, null, vCellContents + this.vTaskList[i].getName()); | ||
addListenerClickCell(vTmpCell, this.vEvents, this.vTaskList[i], 'taskname'); | ||
} | ||
@@ -411,0 +413,0 @@ |
@@ -152,7 +152,7 @@ import { delayedHide, changeFormat, stripIds, isIE, findObj, fadeToolTip } from "./utils"; | ||
export const addListenerClickCell = function (vTmpCell, vEvents, task, column) { | ||
addListener('click', function(){ | ||
addListener('click', function(e){ | ||
if(vEvents[column] && typeof vEvents[column] === 'function'){ | ||
vEvents[column](task); | ||
vEvents[column](task, e, vTmpCell); | ||
} | ||
}, vTmpCell); | ||
} |
@@ -155,3 +155,3 @@ import { parseDateStr, isIE, stripUnwanted, getOffset, formatDateStr, hashKey } from "./utils"; | ||
pDepend, pCaption, pNotes, pGantt, pCost = null, pPlanStart = null, pPlanEnd = null) { | ||
let vGantt = pGantt ? pGantt : g; //hack for backwards compatibility | ||
@@ -372,3 +372,11 @@ let _id = document.createTextNode(pID).data; | ||
this.setCellDiv = function (pCellDiv) { if (typeof HTMLDivElement !== 'function' || pCellDiv instanceof HTMLDivElement) vCellDiv = pCellDiv; }; //"typeof HTMLDivElement !== 'function'" to play nice with ie6 and 7 | ||
this.setGroup = function (pGroup) { vGroup = parseInt(document.createTextNode(pGroup).data); }; | ||
this.setGroup = function (pGroup) { | ||
if (pGroup === true || pGroup === 'true') { | ||
vGroup = 1; | ||
} else if (pGroup === false || pGroup === 'false') { | ||
vGroup = 0; | ||
} else { | ||
vGroup = parseInt(document.createTextNode(pGroup).data); | ||
} | ||
}; | ||
this.setBarDiv = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement) vBarDiv = pDiv; }; | ||
@@ -375,0 +383,0 @@ this.setTaskDiv = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement) vTaskDiv = pDiv; }; |
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 too big to display
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
1633702
15485
128