TaskTooltip
Displays a tooltip when hovering a task. By default the tooltip displays:
- task name
- task column
- task swimlane (if using swimlanes)
- names of assigned resources (if any)
Task tooltip
//<code-header>
fiddle.title = 'Task tooltip';
//</code-header>
const taskBoard = new TaskBoard({
appendTo : targetElement,
features : {
columnToolbars : false,
taskTooltip : true
},
// Swimlanes to display
swimlanes : [
'high',
'low'
],
swimlaneField : 'prio',
columns : [
'todo',
'doing',
'done'
],
columnField : 'status',
project : {
tasks : [
{ id : 1, name : 'Hover me', status : 'doing', prio : 'high' },
{ id : 2, name : 'Follow up', status : 'done', prio : 'low' },
{ id : 3, name : 'Adjust ads', status : 'doing', prio : 'low' },
{ id : 4, name : 'Spring campaign', status : 'todo', prio : 'low' }
]
}
});To customize the contents, supply your own template:
Task tooltip template
//<code-header>
fiddle.title = 'Task tooltip template';
//</code-header>
const taskBoard = new TaskBoard({
appendTo : targetElement,
features : {
columnToolbars : false,
taskTooltip : {
template({ taskRecord }) {
return `
<span style="color : #aaa">#${taskRecord.id}</span>
${taskRecord.name}
`;
}
}
},
columns : [
'todo',
'doing',
'done'
],
columnField : 'status',
project : {
tasks : [
{ id : 1, name : 'Easter campaign', status : 'doing' },
{ id : 2, name : 'Follow up', status : 'done' },
{ id : 3, name : 'Adjust ads', status : 'doing' },
{ id : 4, name : 'Spring campaign', status : 'todo' },
{ id : 5, name : 'Survey', status : 'todo' }
]
}
});This feature is disabled by default.
Configs
11
Configs
11Other
template: function
Function used to populate the tooltip, supply your own to override the default contents of the tooltip.
const taskBoard = new TaskBoard({
features : {
taskTooltip : {
template({ taskRecord }) {
return `<b>${taskRecord.name}</b>`
}
}
}
});
| Parameter | Type | Description |
|---|---|---|
tipData | Object | |
tipData.taskRecord | TaskModel | Hovered task |
tipData.columnRecord | ColumnModel | The task's column |
tipData.swimlaneRecord | SwimlaneModel | The task's swimlane (if used) |
Returns: String | DomConfig -
Return an HTML string or a DOM config object
Tooltip config object used to override the defaults, see Tooltip#configs for available configs.
const taskBoard = new TaskBoard({
features : {
taskTooltip : {
tooltip : {
hoverDelay : 100,
hideDelay : 500
}
}
}
});
Misc
bubbleEventsEvents
callOnFunctionsEvents
clientInstancePlugin
localeClassLocalizable
localizableLocalizable
localizablePropertiesLocalizable
Properties
16
Properties
16Common
disabledInstancePlugin
Class hierarchy
Identifies an object as an instance of TaskTooltip class, or subclass thereof.
Identifies an object as an instance of TaskTooltip class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable
isTaskBoardFeatureTaskBoardFeature
Other
Functions
28
Functions
28Configuration
Events
detachListenersBase
Misc
animatePropertyBase
callbackBase
doDisableInstancePlugin
downloadTestCaseBase
resolveCallbackBase
updateLocalizationLocalizable
Other
addListenerEvents
hasListenerEvents
onEvents
relayAllEvents
removeAllListenersEvents
removeListenerEvents
resumeEventsEvents
suspendEventsEvents
triggerEvents
unEvents
Events
5
Events
5Event handlers
5
Event handlers
5Typedefs
1
Typedefs
1BryntumListenerConfigEvents
CSS variables
4
CSS variables
4| Name | Description |
|---|---|
--b-task-board-tooltip-label-font-size | Label font size |
--b-task-board-tooltip-label-font-weight | Label font weight |
--b-task-board-tooltip-title-font-size | Title font size |
--b-task-board-tooltip-title-font-weight | Title font weight |