1jQuery( document ).on( 'click', '.lesson_tool', function() { 2 var lesson_id = jQuery(this).data('lesson-id'); 3 var lesson_type = jQuery(this).data('lesson-type'); 4 var track_type = jQuery(this).data('track-type'); 5 var lesson_class='.tool_complete'; 6 7 if (track_type=='3') { 8 lesson_class='.tool_complete'; 9 } else if (track_type=='2') { 10 lesson_class='.tool_fav'; 11 } else if (track_type=='1') { 12 lesson_class='.tool_bookmark'; 13 } else { 14 lesson_class='.tool_complete'; 15 } 16 jQuery(lesson_class).addClass('fa').addClass('fa-refresh').addClass('fa-spin'); 17 18 jQuery.ajax({ 19 url : lessoncompletion.ajax_url, 20 type : 'post', 21 data : { 22 action : 'track_lesson_ajax', 23 lesson_id : lesson_id, 24 track_type : track_type, 25 lesson_type : lesson_type 26 }, 27 success : function( response ) { 28 jQuery(lesson_class).removeClass('post_tool_inactive').removeClass('fa').removeClass('fa-refresh').removeClass('fa-spin').removeClass('post_tool_active').addClass('post_tool_'+response); 29 } 30 }); 31}) 32 33jQuery( document ).on( 'click', '.onboarding_step', function() { 34 var onboarding_step_id = jQuery(this).data('onboarding-step-id'); 35 var lesson_class='.onboarding_'+onboarding_step_id; 36 37 38 jQuery.ajax({ 39 url : lessoncompletion.ajax_url, 40 type : 'post', 41 data : { 42 action : 'onboarding_ajax', 43 onboarding_step_id : onboarding_step_id 44 }, 45 success : function( response ) { 46 if (response=='active') { 47 jQuery(lesson_class).parents(".pathway_step").addClass('completed_step'); 48 } else if (response=='inactive') { 49 jQuery(lesson_class).parents(".pathway_step").removeClass('completed_step'); 50 } 51 } 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.