Add custom fields to Tooltip.

Hi there.

I’ve followed the following tutorial to enable a full tooltip on my joomla plugin
viewtopic.php?f=16&t=16350&p=50365&hilit=tooltip+custom+fields#p50365

How do I include the custom fields?
For example I have one called Job and one called Vehicle

<script src="./components/com_scheduler/codebase/ext/dhtmlxscheduler_tooltip.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> // template to display as tooltip scheduler.templates.tooltip_date_format=scheduler.date.date_to_str("%Y-%m-%d %H:%i"); scheduler.templates.tooltip_text = function(start,end,event) { return "<b>Event:</b> "+event.text+"<br/><b>Start date:</b> "+scheduler.templates.tooltip_date_format(start)+"<br/><b>End date:</b> "+scheduler.templates.tooltip_date_format(end); }; </script>

How would I insert the the Job and Vehicle custom fields so they display in the tooltip?

It’s ok I have done it…

<script src="./components/com_scheduler/codebase/ext/dhtmlxscheduler_tooltip.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> // template to display as tooltip scheduler.templates.tooltip_date_format=scheduler.date.date_to_str("%Y-%m-%d %H:%i"); scheduler.templates.tooltip_text = function(start,end,event) { return "<b>Event:</b> "+event.text+"<br/><b>Location:</b>"+event.location+"<br><b>Start date:</b> "+scheduler.templates.tooltip_date_format(start)+"<br/><b>End date:</b> "+scheduler.templates.tooltip_date_format(end); }; </script>

Is it possible to display the same information in the week view?

Hi,
actually tooltip should be the same for all views.
Could you provide a link to your scheduler?

Yes tool tip is the same for all views. I want the month view to render the same information as the tooltip. This will make month view a lot longer if each item is 200X200 and there are 3 or 4 items per day.
Trying to pitch this as a replacement for current calendar solution we are using.
At the moment the only thing stopping it is that all the info is not displayed in month view.

Hi,
to set the same text in month view you should configure event_bar_text template in scheduler admin panel (Templates tab) like here:

scheduler.templates.event_bar_text=function(start,end,event) {
  return "<b>Event:</b> "+event.text+"<br/><b>Location:</b>"+event.location+"<br><b>Start date:</b> "+scheduler.templates.tooltip_date_format(start)+"<br/><b>End date:</b> "+scheduler.templates.tooltip_date_format(end);
}

Also you may add the follow line into scheduler_include to adjust event height in month-view:

scheduler.xy.bar_height = 34; // default value is 20