1(function( $ ){ 2 var methods = { 3 init: function() { 4 $(this).click(function() { 5 if(Drupal.behaviors.rcjs.insuranceCheck(this)) { 6 $(this).addClass('loading'); 7 var link = this; 8 if($(link).attr('data-quote-type') == 'embed') { 9 $($(link).attr('data-quote-target')).empty(); 10 } 11 $.get(this.href, {}, function(data, status) { 12 if(status == 'success') { 13 if(data.message) alert(data.message); 14 if(data.reveals) { 15 var reveals = $('<div />').append(data.reveals) 16 $('body').append(reveals) 17 Drupal.attachBehaviors(reveals) 18 } 19 if(data.content) { 20 if($(link).attr('data-quote-type') == 'embed') { 21 Drupal.attachBehaviors($($(link).attr('data-quote-target')).html(data.content)); 22 } else { 23 var content = $("<div></div>").html(data.content); 24 Drupal.attachBehaviors($(content).dialog($.parseJSON($("<div></div>").append($(link).attr('data-dialog-params')).text()))); 25 } 26 } 27 } else { 28 alert(options.txt.ae); 29 } 30 $(link).removeClass('loading'); 31 }); 32 } 33 return false; 34 }) 35 } 36 }; 37 $.fn.rcItemQuoteLink = function(method) { 38 if ( methods[method] ) { 39 return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 )); 40 } else if ( typeof method === 'object' || ! method ) { 41 return methods.init.apply( this, arguments ); 42 } else { 43 $.error( 'Method ' + method + ' does not exist on jQuery.filterAvail' ); 44 } 45 return this; 46 }; 47 48 Drupal.behaviors.rcItemQuoteLink = { 49 attach: function(context, settings) { 50 $('.rc-item-quote-link', context).once('rcItemQuoteLink', function() { 51 $(this).rcItemQuoteLink(); 52 }); 53 } 54 }; 55})( 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.