gantt.confirm does not set id; it’s always blank. According to docs at docs.dhtmlx.com/message__window … messagebox, an ‘id’ passed in JSON should set the id of the message box. Request bugfix.
Example:
visit, eg docs.dhtmlx.com/gantt/samples/0 … tyles.html, and open Javascript console.
gantt.confirm({
id: “SaveGanttBox”,
title: “Want to save?”,
type:“confirm-warning”,
text: “Your changes will be lost if you don’t save them.”,
cancel: “Discard”,
ok: “Save”,
callback: function(buttonPress) {buttonPress ? saveGantt() : modifiedTasks = {};}
})
does not set an id. One workaround is to just do
gantt.confirm({
title: “Want to save?”,
type:“confirm-warning”,
text: “Your changes will be lost if you don’t save them.”,
cancel: “Discard”,
ok: “Save”,
callback: function(buttonPress) {buttonPress ? saveGantt() : modifiedTasks = {};}
}).id = “SaveGanttBox”;
and another is to:
gantt.confirm({
title: “Want to save?”,
type:“confirm-warning”,
text: “Your changes will be lost if you don’t save them.”,
cancel: “Discard”,
ok: “Save”,
callback: function(buttonPress) {buttonPress ? saveGantt() : modifiedTasks = {};}
}).setAttribute(“id”, “SaveGanttBox”)
But both of these lose the return value.
Frank