1( function ( $ ) { 2 3 const tclist = { 4 5 get_formatted_date: function( dateFormat ) { 6 7 let formattedDate = 'mm/dd/yy'; 8 9 switch( dateFormat ) { 10 11 case 'Y-m-d': 12 formattedDate = 'yy-mm-dd'; 13 break; 14 15 case 'm/d/Y': 16 formattedDate = 'mm/dd/yy'; 17 break; 18 19 case 'd/m/Y': 20 formattedDate = 'dd/mm/yy'; 21 break; 22 23 case 'jS F Y': 24 formattedDate = 'd MM yy'; 25 break; 26 27 case 'F j, Y': 28 formattedDate = 'MM d, yy' 29 break; 30 } 31 32 return formattedDate; 33 } 34 }; 35 36 $( document ).ready( function () { 37 38 $( '.tc-multiple-select' ).multiselect(); 39 40 var tc_show_past_events = $( '#tc_show_past_events' ).val(), 41 dateToday = ( 'true' == tc_show_past_events || 1 == tc_show_past_events ) ? '' : new Date(); // Check to see if to show past dates in the calendar 42 43 $( '.tc-event-datepicker' ).datepicker({ 44 dateFormat: tclist.get_formatted_date( tc_values.date_format ), 45 minDate: dateToday, 46 beforeShow: function (input, inst) { 47 $( '#ui-datepicker-div' ).addClass( 'tc-tickera-calendar' ); 48 } 49 }); 50 51 /** 52 * Get events depending on the values passed 53 */ 54 function tc_filter_events() { 55 56 $( '.tc-event-listing-container' ).each( function() { 57 58 var event_container = $( this ), 59 display_filter_events = event_container.find( '.tc-display-filter-events' ), 60 pagination_number = event_container.find( '#tc_pagination_number' ); 61 62 display_filter_events.removeClass( 'tc-remove-spinner' ); 63 display_filter_events.html( '<span class="tc-listing-loader"><span class="tc-loader-inner"></span></span>' ); 64
65 var tc_selected_category_value = event_container.find( '#tc_category_ids' ).val(), 66 tc_categories = [], 67 tc_categories = event_container.find( '#tc_event_categories' ).val(), 68 tc_start_date = event_container.find( '#tc_start_date' ).val(), 69 tc_end_date = event_container.find( '#tc_end_date' ).val(), 70 tc_column_number = event_container.find( '#tc_number_of_columns' ).val(), 71 tc_show_excerpt = event_container.find( '#tc_show_excerpt' ).val(), 72 tc_show_number_of_posts = event_container.find( '#tc_show_number_of_posts' ).val(), 73 tc_pagination_number = pagination_number.val(), 74 tc_show_default_featured_image = event_container.find( '#tc_show_default_featured_image' ).val(), 75 tc_show_past_events = event_container.find( '#tc_show_past_events' ).val(), 76 tc_order_events_by = event_container.find( '#tc_order_events_by' ).val(); 77 78 $.ajax({
79 type: 'post', 80 dataType: 'text', 81 url: tc_values.ajaxurl, 82 data: { 83 action: 'tc_filter_events', 84 tc_categories: tc_categories, 85 tc_start_date: tc_start_date, 86 tc_end_date: tc_end_date, 87 tc_column_number: tc_column_number, 88 tc_show_excerpt: tc_show_excerpt, 89 tc_show_number_of_posts: tc_show_number_of_posts, 90 tc_pagination_number: tc_pagination_number, 91 tc_show_default_featured_image: tc_show_default_featured_image, 92 tc_selected_category_values: tc_selected_category_value, 93 tc_show_past_events: tc_show_past_events, 94 tc_order_events_by: tc_order_events_by 95 }, 96 97 success: function ( response ) { 98 99 display_filter_events.empty(); 100 display_filter_events.addClass( 'tc-remove-spinner' ); 101 display_filter_events.html( response ); 102 103 event_container.find( '.tc-events-wrap .pagination a' ).click( function ( e ) { 104 105 e.preventDefault(); 106 107 if ( $( this ).hasClass( 'prev' ) ) { 108 var get_page_num = $( this ).closest( 'ul.page-numbers' ).find( '.page-numbers.current' ).parent().prev().text(); 109 110 } else if ( $( this ).hasClass( 'next' ) ) { 111 var get_page_num = $( this ).closest( 'ul.page-numbers' ).find( '.page-numbers.current' ).parent().next().text(); 112 113 } else { 114 var get_page_num = $( this ).text(); 115 } 116 117 pagination_number.val( get_page_num ); 118 tc_filter_events(); 119 }); 120 } 121 }); 122 }); 123 } 124 125 tc_filter_events(); 126 127 /** 128 * Filter the Events 129 */ 130 $( '#filter_events' ).click( function ( e ) { 131 e.preventDefault(); 132 var tc_pagination_number = $( '#tc_pagination_number' ).val( 1 ); 133 tc_filter_events(); 134 }); 135 }); 136})( 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.