Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
aspilicious CreditAttribution: aspilicious commentedThis is alrdy fixed in the development version:
see the log: http://drupalcode.org/project/fullcalendar.git/shortlog/refs/heads/7.x-2.x
Comment #2
tim.plunketthttp://drupalcode.org/project/fullcalendar.git/commitdiff/201eb84a6b6669...
That's my fault for not opening an issue. Apologies.