I’m playing with Gantt objects and generally it works fine.
I’ve few question about the create task process:
I add the insert login into the onLightboxSave event management, this because the onAfterTaskAdd was fired anyway before that the lightbox was shown. Anyway, the logic works fine.
After the click on Save button, the lightbox keeps opened
If I try to add a second task (or delete an existing one) after a 1st insertion I got the error:
TypeError: i is undefined
http://localhost/baango/dhtmlx/dhtmlxgantt.js
Line 6
and also some debug red popup appears on the top right saying “Undefined”.
What does that error means? How to switch the popups off?
Even if I click on Cancel on the add task lightbox, a new task is added to the gantt
Q1,Q4. Currently adding a task goes in following sequence:
Task is added to the gantt, it triggers onBeforeTaskAdd, onAfterTaskAdd events
Then lightbox is opened
If user clicks ‘Save’, onLIghtboxSave event is triggered
If user clicks ‘Cancel’ - lightbox closes, task stays where it was
The later doesn’t seems like quite expected behavior, most probably it will be changed by version 2.2 of gantt
Q2. - Probably it happens due to some JS error that happens during the saving (maybe an error in custom handler of onLightboxSave).
Another possible reason - custom handler returns ‘false’ and prevents saving. Hard to tell more without any sample code or demo
Q3. - Sorry for the inconvenience, popups should be disabled in the release version. As a simple workaround you can add following code after adding dhtmlxgantt.js to the page:
dhtmlx.assert = function(){};
However, the js error does not happens with our examples. If you provide a link to the page or code sample, I could try to reproduce the error
Q1,Q4: waiting for the new release. Is there already any planned relase date for that?
Q2: Solved, I had the “return true” inside a jquery ajax callback function. As soon as I put it out side it, it worked fine.
Q3: the workedaround worked partially. No more red debug popup, but 1st add after 1st fails, the followings work fine. Is the fix release already planned?