Hi,
Sharing a code snippet added in my theme .js file to make shadowbox work in openlayers popups. This could help on other dynamic content implementation:

(function ($) {

	// Check that shadowbox library is available
	if (typeof Shadowbox !== 'undefined') {
		Drupal.behaviors.shadowbox = {
		  attach: function(context, settings) {
			if ($('.openlayers-popup').length > 0) {
				Shadowbox.setup();
			}
		  }
		};
	}

})(jQuery);

I hope this will help someone.
Maybe something similar could be added directly to shadowbox module ... I don't know.

Comments

Thithi32’s picture

Update:

	if (typeof Shadowbox !== 'undefined') {
		Drupal.behaviors.shadowbox = {
		  attach: function(context, settings) {
				if ($('.openlayers-popup').length > 0) {
					Shadowbox.clearCache();
					Shadowbox.setup();
				}					
		  }
		};
	}
manfer’s picture

Status: Active » Fixed

Current version calls always clearCache and setup so this is fixed.

Status: Fixed » Closed (fixed)

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