My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 41: Addition of Title tag option
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Jun 2009


Sign in to add a comment
 
Reported by freshman...@gmail.com, Jun 17, 2009
I believe that a useful addition to the calendar would be the option to
provide a title tag to the links in the rendered calendar.

This would be especially useful for one day events where a detailed event
description cannot fit in the box but the title tag would provide a full
event description on mouse over, for example:

<a href="/calendar/event/" title="Bob's Birthday Barbeque">Bobs BBQ</a>

Thanks again to the author for a great script: PLEASE USE THE DONATE BUTTON
ON THE PROJECT HOMEPAGE (give credit where credit is due).

P.S. Does anyone know how to submit a recommendation rather than an "issue"
in Google code?  Couldn't find the option!
Jun 17, 2009
#1 yowza...@gmail.com
You might try using qTip for doing nice looking rollover tooltips.  I have disabled
event clicking and am using tooltips to display extra information.
http://craigsworks.com/projects/qtip/

Here's some sample code:

var calendar = $('#calendar');
calendar.fullCalendar({
	eventSources: eventSources,
	timeFormat: "g:ix",
	draggable: true,
	eventClick: function(calEvent, jsEvent) {
		return false;
	},
	eventDragStart: function(calEvent, jsEvent, ui) {
		$(this).qtip("hide");
		$(this).qtip("disable");
	},
	eventDragEnd: function(calEvent, jsEvent, ui) {
		$(this).qtip("enable");
	},
	eventRender: function(calEvent, element) {
		var tipContent = "<strong>" +
			$.fullCalendar.formatDate(calEvent.start,"g:ix") + " - " +
			$.fullCalendar.formatDate(calEvent.end,"g:ix") + "</strong><br/>" +
			calEvent.title;
			if (typeof calEvent.location != 'undefined') {
				tipContent +=  '<br/>' + calEvent.location;
			}
			if (typeof calEvent.description != 'undefined') {
				tipContent +=  '<br/>' + calEvent.description;
			}
			$(element).qtip({
				content: tipContent,
				position: {
					corner: {
						target: 'leftMiddle',
						tooltip: 'rightMiddle'
					}
				},
				border: {
					radius: 4,
					width: 3
				},
				style: {
					name: 'dark',
					tip: 'rightMiddle'
				}
			});
	},
	loading: function(bool) {
		if (bool) $('#veil').show();
		else $('#veil').hide();
	}
}).disableSelection();

Jun 28, 2009
Project Member #6 adamrs...@gmail.com
hi bob,
i began to implement this. i then realized many people might not want this behavior
by default, as they might want to use their own tooltip plugin (maybe qtip), so i
decided to make it a fullcalendar option... but then realized it needed to be
flexible for everyone... should the tooltip be the event's title or something else?
should it include the start time text? i then decided to leave this up to the
developer to use a preexisting option for maximum flexibility, the 'renderEvent'
option. here is what you could do:

   renderEvent: function(event, element) {
      element.attr('title', event.title);
   }

or if your event has a longer description, include a 'description' property for each
event in your feed and do the following:

   renderEvent: function(event, element) {
      element.attr('title', event.description);
   }

hope this helps.
Status: Done
Sign in to add a comment

Powered by Google Project Hosting