1jQuery( document ).ready( function() { 2 jQuery( ".newsletter-stats-button" ).click( function(e) { 3 e.preventDefault(); 4 var newsletter = jQuery(this).data('newsletter-id'); 5 jQuery(this).hide(); 6 if(jQuery(this).attr('href') !== "#"){ 7 jQuery('#stats-' + newsletter + ' .spinner').attr('style', 'display: inline-block; visibility: visible'); 8 jQuery.post(jQuery(this).attr('href'), function(result){ 9 result = result.slice(0,-1); 10 jQuery('#stats-' + newsletter + ' .spinner').hide(); 11 jQuery('#stats-' + newsletter).attr('style','display: block'); 12 jQuery('#stats-' + newsletter).append(result); 13 }); 14 } else { 15 jQuery('#stats-' + newsletter +' .non-admin-nwl-stats').show(); 16 } 17 }); 18 jQuery( "#show_all" ).click( function(e) { 19 jQuery('#show-all-nwl').submit(); 20 }); 21 22 jQuery( '#item-body' ).find( '.button.create-newsletter' ).after( ' <a href="javascript:;" id="back_cta" class="button group-button hide">Back</a>' ); 23 jQuery( '.show-newsletter-statistic' ).on( 'click', function () { 24 var current_send_id=jQuery(this).data("send_id"); //changed mseldin 6/20/17 re https://hubbli.atlassian.net/browse/HKB-307, 'this' object was overridden inside of ajax call so passing id by value instead of obj reference 25 var $ajaxCta = $( this ).parent().find( '.ajax-loader' ); 26 $ajaxCta.toggle(); 27 jQuery.ajax( { 28 type: "POST", 29 url: ajaxurl, 30 beforeSend: function () { 31 32 }, 33 data: { 34 action: "newsletter_statistic", 35 send_id: current_send_id, 36 }, 37 success: function ( html ) { 38 jQuery( '#newsletter_list' ).hide(); 39 jQuery( '.newsletter_list_details' ).html( html ); 40 jQuery( '#back_cta' ).removeClass( 'hide' ); 41 $ajaxCta.toggle(); 42 }, 43 error: function ( data ) { 44 alert( data ); 45 } 46 } ); 47 } ); 48 jQuery( '#back_cta' ).on( 'click', function () { 49 jQuery( '.newsletter_list_details' ).html( '' ); 50 jQuery( '#newsletter_list' ).show(); 51 jQuery( '#back_cta' ).addClass( 'hide' ); 52 } ); 53 54});
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.