Ok, I kinda got it working based on your suggestion, I had to add an
'eventRender' object to the script, then I was able to use the tip event
object:
$('#calendar').fullCalendar({
editable: true,
events: [
{{for i,row in enumerate(rows):}}{{if i!=0:}},{{pass}}
{
* tip:
'{{=db(db.tech.id==row.tech).select(db.tech.first_name,
db.tech.last_name)}}',*
title: '{{=row.name}}',
allDay: false,
start: new Date('{{=row.work_date.strftime('%B %d, %Y
%H:%M:%S')}}'),
end: new Date('{{=row.work_date.strftime('%B %d, %Y
%H:%M:%S')}}'),
url: '{{=URL('sites',args=row.id)}}'
}
{{pass}}
],
* eventRender: function(event, element) {
element.attr('title', event.tip);
}*
});
This code above is working for me but my tip:
=db(db.tech.id==row.tech).select(db.tech.first_name, db.tech.last_name)
Returns a full table like:
<table><thread><td><th>tech.first_name</th><th>tech.last_name</th>.... on
and on with the names it returns...
is there a different way to do my query or tell web2py not to make it into
a table?
On Monday, May 6, 2013 12:56:24 PM UTC-6, Loïc wrote:
>
>
> Maybe it would be more clear if you can provide some code...
> But if I have understood your question, you can add a a text in "tip"
> property. This text will be shown when your mouse is over the event.
> Here is an example
>
> events: [
> {{for i,row in enumerate(rows):}}{{if i!=0:}},{{pass}}
> {
> tip: "THIS TEXT WILL BE SHOWN ON MOUSE OVER",
> title: '',
> allDay: false,
> {{if row.start_datetime:}}
> start: new Date('{{=row.start_datetime()}}'),
> {{pass}}
> {{if row.end_datetime:}}
> end: new Date('{{=row.end_datetime()}}'),
> {{pass}}
> }
> {{pass}}
> ],
>
>
> Le lundi 6 mai 2013 18:23:50 UTC+2, Doug Girard a écrit :
>>
>> I am using some of the code from the AppointmentManager appliance to
>> include FullCalendar in my application. I want to use 'onmouseover' from
>> jquery to show some data associated with the events that are displayed on
>> the calendar. Where would I add my code for that? Would it be in the view
>> under " for i,row... "?
>>
>> I hope I've made myself clear.
>>
>> Thank you!
>>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.