When a fullcalendar view option "Open events with Colorbox " is unchecked, events open in colorbox anyway.

Problem : in "fullcalendar/fullcalendar_options/js/colorbox.fullcalendar.js", theres's no check for this particular option before assigning colorbox opening on event click.

Solution proposed : (Added code in bold)

(function($) {

Drupal.fullcalendar.plugins.colorbox = {
  options: function (fullcalendar) {
    var settings = Drupal.settings.fullcalendar[fullcalendar.dom_id].colorbox;
    var options = {
		  eventClick: function(calEvent, jsEvent, view) {
			

if (settings.colorbox) {

				// Use colorbox only for events based on entities
				if (calEvent.eid !== undefined) {
				  // Open in colorbox if exists, else open in new window.
				  if ($.colorbox) {
					var url = calEvent.url;
					if (settings.colorboxClass !== '') {
					  url += ' ' + settings.colorboxClass;
					}
					$.colorbox({
					  href: url,
					  width: settings.colorboxWidth,
					  height: settings.colorboxHeight,
					  iframe: settings.colorboxIFrame === 1 ? true : false
					});
				  }
				}
				return false;
			

}

		  }
    };
    return options;
  }
};

}(jQuery));

Comments

aspilicious’s picture

Status: Needs review » Fixed

This is alrdy fixed in the development version:

see the log: http://drupalcode.org/project/fullcalendar.git/shortlog/refs/heads/7.x-2.x

tim.plunkett’s picture

http://drupalcode.org/project/fullcalendar.git/commitdiff/201eb84a6b6669...

That's my fault for not opening an issue. Apologies.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.