1jQuery(function($) { 2 3 /** 4 * Update the frequency for subscription 5 */ 6 $('button[name="sf_change_frequency_save"]').click(function(e) { 7 e.preventDefault(); 8 9 $.ajax({ 10 url: sf_change_frequency.root + '/update', 11 method: 'POST', 12 data: { 13 frequency: $('#sf_subscription_frequency option:selected').val(), 14 subscription_id: $('#sf_subscription_frequency').attr('data-subscription_id') 15 }, 16 beforeSend: function ( xhr ) { 17 xhr.setRequestHeader( 'X-WP-Nonce', sf_change_frequency.nonce ) 18 }, 19 }).done( function ( response ) { 20 21 // Update Notification 22 $('#sf_change_frequency_subscription_row .view .notification').slideDown().text( response.data.html ).delay(10000).slideUp(); 23 24 // Update view state text 25 $('#sf_change_frequency_subscription_row .view span').text( response.data.frequency_text ); 26 27 // Update table row status 28 $("#sf_change_frequency_subscription_row .view").show(); 29 $("#sf_change_frequency_subscription_row .edit").hide(); 30 31 if( 1 != sf_change_frequency.ssd_trigger_shipping ) { 32 setTimeout(function () { 33 location.reload(); 34 }, 5000); 35 } else { 36 ssd_trigger_shipping_modal($('#sf_subscription_frequency').attr('data-subscription_id')); 37 } 38 } ); 39 40 }); 41 42 // Edit state 43 $("#sf_change_frequency_subscription_row a#sf_change_frequency_edit_button").click(function(e) { 44 e.preventDefault(); 45 46 $("#sf_change_frequency_subscription_row .edit").show(); 47 $("#sf_change_frequency_subscription_row .view").hide(); 48 }); 49 50 // Cancel button 51 $("#sf_change_frequency_subscription_row a#sf_change_frequency_cancel").click(function(e) { 52 e.preventDefault(); 53 54 $("#sf_change_frequency_subscription_row .view").show(); 55 $("#sf_change_frequency_subscription_row .edit").hide(); 56 }); 57});
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.