1/** 2 * @file 3 * Integration file for fancyBox module. 4 */ 5 6(function($) { 7 Drupal.behaviors.fancyBox = { 8 attach: function(context, settings) { 9 var selectors = ['.fancybox']; 10 11 if (typeof settings.fancybox === 'undefined') { 12 settings.fancybox = {}; 13 } 14 15 if (typeof settings.fancybox.options === 'undefined') { 16 settings.fancybox.options = {}; 17 } 18 19 if (typeof settings.fancybox.callbacks !== 'undefined') { 20 $.each(settings.fancybox.callbacks, function(i, cal) { 21 settings.fancybox.options[i] = window[cal]; 22 }); 23 } 24 25 if (typeof settings.fancybox.helpers !== 'undefined') { 26 settings.fancybox.options.helpers = settings.fancybox.helpers; 27 delete settings.fancybox.helpers; 28 } 29 30 if (typeof settings.fancybox.selectors !== 'undefined') { 31 selectors = selectors.concat(settings.fancybox.selectors); 32 } 33 34 // Not needed because behaviors are reattached. 35 settings.fancybox.options.live = false; 36 37 $(selectors.join(',')).fancybox(settings.fancybox.options); 38 } 39 }; 40})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.