1(function($) { 2 3 function initCF7() { 4 console.log('initCF7'); 5 if (window.tgpLazyItems !== undefined) { 6 var isShowed = window.tgpLazyItems.checkGroupShowed(this, function(node) { 7 initCF7.call(node); 8 }); 9 if (!isShowed) { 10 return; 11 } 12 } 13 var $contactForm = $(this); 14 15 $('select', $contactForm).combobox(); 16 $('input[type="checkbox"]', $contactForm).checkbox(); 17 $('input[type="radio"]', $contactForm).checkbox(); 18 19 $('p', $contactForm).each(function () { 20 if ($(this).find('.wpcf7-radio').length || $(this).find('.wpcf7-checkbox').length) { 21 $(this).addClass('with-radio'); 22 } else if (!$(this).hasClass('with-label') ) { 23 var label = $(this).find('label'); 24 if (label.length) { 25 $(this).addClass('with-label'); 26 $(this).append(label.find('.wpcf7-form-control-wrap')); 27 } 28 } 29 }); 30 31 // labelEqualWidth(); 32 if($('input[type="submit"]', $contactForm).parent().children().length > 1) { 33 $('input[type="submit"]', $contactForm).wrap('<p>'); 34 } 35 $('input[type="submit"]', $contactForm).parent().addClass('submit-outer'); 36 } 37 38 function labelEqualWidthCF7() { 39 console.log('labelEqualWidthCF7'); 40 var $contactForm = $(this); 41 42 if (!$contactForm.hasClass('label-left')) { 43 return; 44 } 45 46 var max_width = 0; 47 var $labels = $('p.with-label label', $contactForm); 48 $labels.removeAttr("style"); 49 $labels.each(function () { 50 if ($(this).width() > max_width) { 51 max_width = $(this).width() + 1; 52 } 53 }); 54 $labels.css('width', max_width); 55 } 56 57 $.fn.initCF7s = function() { 58 $(this).each(initCF7); 59 }; 60 61 $.fn.labelEqualWidthCF7s = function() { 62 $(this).each(labelEqualWidthCF7); 63 }; 64 65 $('.thegem-cf7').initCF7s(); 66 $('.thegem-cf7').labelEqualWidthCF7s(); 67 68})(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.