ResourceInfoColumn
Displays basic resource information. Defaults to showing an image + name + event count (all configurable).
If a resource has no image, you can either provide an icon using iconCls in the data (you then need to specify
image === false in your data) or the resource initials will be shown. If you don't want to show any avatar at all,
you can set showAvatar to false for the Resource record.
Be sure to specify resourceImagePath to instruct the column where to look for the images.
If an image fails to load or if a resource lacks an image, the resource name initials will be rendered. If the resource has an eventColor specified, it will be used as the background color of the initials.
//<code-header>
fiddle.title = 'Resource info column';
//</code-header>
const scheduler = new Scheduler({
appendTo : targetElement,
// makes scheduler as high as it needs to be to fit rows
autoHeight : true,
startDate : new Date(2018, 4, 6),
endDate : new Date(2018, 4, 13),
viewPreset : 'dayAndWeek',
resourceImagePath : 'data/Scheduler/images/transparent-users/',
columns : [
{ type : 'resourceInfo', field : 'name', text : 'Name', width : 165 }
],
resources : [
{ id : 1, name : 'Arnold Smith', image : 'arnold.png' },
{ id : 2, name : 'Gloria Rogers', image : 'gloria.png' },
{ id : 3, name : 'Jane Miller', eventColor : 'indigo', image : false }
],
events : [
{ id : 1, resourceId : 1, name : 'Interview', startDate : '2018-05-06', endDate : '2018-05-07' },
{ id : 2, resourceId : 1, name : 'Press meeting', startDate : '2018-05-08', endDate : '2018-05-09' },
{ id : 3, resourceId : 2, name : 'Audition', startDate : '2018-05-07', endDate : '2018-05-09' },
{ id : 4, resourceId : 2, name : 'Script deadline', startDate : '2018-05-11', endDate : '2018-05-11' },
{ id : 5, resourceId : 3, name : 'Rehearsal', startDate : '2018-05-09', endDate : '2018-05-11' }
]
});Configs
86
Configs
86Common
Other
Specify 0 to prevent the column from adapting its content according to the used row height, or specify a threshold (row height) at which scaling should start.
Show number of events assigned to the resource below the name.
Show image. Looks for image name in fields on the resource in the following order: 'imageUrl', 'image',
'name'. Set showImage to a field name to use a custom field. Set Scheduler.resourceImagePath to
specify where to load images from. If no extension found, defaults to
resourceImageExtension.
A template string to render any extra information about the resource below the name
| Parameter | Type | Description |
|---|---|---|
resourceRecord | ResourceModel | The record representing the current row |
Show resource role below the name. Specify true to display data from the role field, or specify a field
name to read this value from.
Use the resource name as the image name when no image is specified on the resource.
Integration
Interaction
Menu
Misc
Rendering
Properties
156
Properties
156Common
Class hierarchy
Other
Specify 0 to prevent the column from adapting its content according to the used row height, or specify a threshold (row height) at which scaling should start.
Show number of events assigned to the resource below the name.
Show image. Looks for image name in fields on the resource in the following order: 'imageUrl', 'image',
'name'. Set showImage to a field name to use a custom field. Set Scheduler.resourceImagePath to
specify where to load images from. If no extension found, defaults to
resourceImageExtension.
A template string to render any extra information about the resource below the name
| Parameter | Type | Description |
|---|---|---|
resourceRecord | ResourceModel | The record representing the current row |
Show resource role below the name. Specify true to display data from the role field, or specify a field
name to read this value from.
Use the resource name as the image name when no image is specified on the resource.
Editing
Integration
Interaction
JSON
Menu
Misc
Parent & children
Rendering
Functions
77
Functions
77Configuration
Editing
Events
Identification
Misc
Other
Parent & children
Events
5
Events
5Event handlers
5
Event handlers
5Typedefs
2
Typedefs
2CSS variables
5
CSS variables
5| Name | Description |
|---|---|
--b-resource-info-column-name-font-weight | Resource name font weight |
--b-resource-info-column-role-font-size | Resource role font size |
--b-resource-info-column-role-color | Resource role color |
--b-resource-info-column-role-row-hover-color | Resource role color on a hovered row |
--b-resource-info-column-avatar-background-color | Avatar background color |