Lightbox is an edit form used to change the task's details.
The default lightbox is presented in the image below.
Lightboxes may differ depending on the type and peculiarities of tasks they are used for. Configuration settings for each type of a task are stored in the lightbox object. They are:
It is also possible to add a custom type and define necessary structure of the lightbox for it. More information is given in the article Task Types.
The overall type structure looks like this:
From v7.1.13, if either gantt.config.csp is set to true or Gantt works in the Salesforce environment, the lightbox will be rendered inside the Gantt container.
The structure of the lightbox is specified by the sections property of the lightbox object:
//default lightbox definition
gantt.config.lightbox.sections=[
{name:"description", height:70, map_to:"text", type:"textarea", focus:true},
{name:"time", height:72, map_to:"auto", type:"duration"}
];
Each item in the sections array is an object that specifies an individual section in the lightbox (available section properties).
Each section of the lightbox is based on some control. The following types of controls are available for use in the lightbox:
var opts = [
{ key: 1, label: 'High' },
{ key: 2, label: 'Normal' },
{ key: 3, label: 'Low' }
];
gantt.config.lightbox.sections = [
{name:"description", height:38, map_to:"text", type:"textarea", focus:true},
{name:"priority", height:22, map_to:"priority", type:"select", options:opts},
{name:"time", height:72, map_to:"auto", type:"duration"}
];
Back to top