Hello, is it possible to append the existing out-of-box tooltip and add new field in there vs replacing as shown in https://bryntum.com/examples/calendar/tooltips/ example ?
Support Forum
Or maybe use the getHtml config: https://www.bryntum.com/docs/calendar/api/Core/widget/Tooltip#config-getHtml
Tooltips like all Containers have a contentElement
: https://www.bryntum.com/docs/calendar/api/Core/widget/Tooltip#property-contentElement
You can do anything you like with that.
Here's the beforeShow event : https://www.bryntum.com/docs/calendar/api/Core/widget/Widget#event-beforeShow
When an event is fired, it also calls a method on itself called "on" plus the capitalized event name, so onBeforeShow will be called if you configure it in.
The add function. A Tooltip is a Panel which is a Container:
https://www.bryntum.com/docs/calendar/api/Core/widget/Container#function-add
I am using OnBeforeShow to include additional information in tool tip and behavior is inconsistent.
below is my tool tip code snip
features: {
eventTooltip: {
layout: 'vbox',
// Configuration options are passed on to the tooltip instance.
// Override the default which is to show on click.
showOn: 'hover',
// Configuration options are passed on to the tooltip instance
// We want the tooltip's left edge aligned to the right edge of the event if possible.
align: 'l-r',
// Mustn't shrink because of large, graphical content
minWidth: null,
tools: {
addtoOutlook: {
cls: 'b-fa b-fa-calendar-alt',
weight: 20,
tooltip: 'Add to Outlook (.ics)',
//tooltip: {
// getHtml: '',
// newInstance: true
//},
handler() {
const eventRecord = this.eventRecord;
// Add some custom ICS values (See https://tools.ietf.org/html/rfc5545 for more information)
eventRecord.exportToICS({
LOCATION: eventRecord.location
});
}
},
viewmoreInfo: {
cls: 'b-fa b-fa-info-circle',
weight: 10,
tooltip: 'More Info',
//tooltip: {
// getHtml: 'More Info',
// newInstance: true
//},
handler() {
let eventRecord = this.eventRecord;
let eventDetailURL = hostingBaseURL + '/Main?ScreenId=CR306030&NoteID=' + eventRecord.id;
window.open(eventDetailURL, '_blank');
}
}
},
//renderer: data => `<dl>
// ${data.eventRecord.get('note') ? `<dd>${data.eventRecord.note}</dd>` : ''}
//</dl>`,
onBeforeShow({ source }) {
// Delete & Edit toolbar button always hidden
this.tools.delete.hidden = true;
this.tools.edit.hidden = true;
if (typeof this.eventRecord.note != 'undefined' && this.eventRecord.note) {
source.add({
type: 'displayfield',
cls: 'acmtooltipCSS',
label: ''
});
source.add({
type: 'displayfield',
cls: 'acmtooltipCSS',
label: this.eventRecord.note
});
}
}
},
// No Editor since this is view only
eventEdit: null
}
At times, though there's value it doesnt show additional note in tooltip
at times, it keeps adding additional time like in attachment
- Attachments
-
- TooltipDuplication.png (47.87 KiB) Viewed 819 times