xOliver
October 24, 2011, 5:19pm
#1
Hello
I would like to show the tooltip just when the specified field has text in. Is this possible?
I tried the following
scheduler.templates.tooltip_text = function(start,end,event) {
if ((event.termin_bemerkung != 'undefined') && (event.termin_bemerkung != '')) {
return event.termin_bemerkung;
}
}
but appears with all the events
Can be done only through code modification
dhtmlxscheduler_tooltip.js
var text = scheduler.templates.tooltip_text
if (!text) return; // this line need to be added
The same modification will be added in the main codebase, so in next version such behavior will be by default.
xOliver
October 26, 2011, 5:41am
#4
There is another problem. If i go out of an event it works and the tooltip hides but if there is an event directly above or below it doesn’t.
Try to replace the above mentioned line
if (!text) return;
as
if (!text) return dhxTooltip.hide();
Can you provide some kind of sample or demo link? ( I can’t reconstruct problem locally )
xOliver
November 7, 2011, 2:30am
#8
Hey … sorry that i write so late. Here you have a big demo page. Just move around the events and you’ll see the problem.
When you do this you maybe can check a bug with creating events. Please have a look at the photo, try to make an event at this position and have a look what happens to the events. This always happens when i want to create an event and there’s one directly under.
thank you really much
xOliver
November 7, 2011, 2:36am
#9
To fix tooltips, in dhtmlxscheduler_tooltip.js alter the next line
var G = scheduler.templates.tooltip_text(B.start_date, B.end_date, B);
as
var G = scheduler.templates.tooltip_text(B.start_date, B.end_date, B);
if (!G) return dhxTooltip.hide();