1function Plugin_Service_Search() { 2 jQuery(document).ready(function($){ 3 $('.js-service-search').on('submit', function(e){ 4 e.preventDefault(); 5 var el = $(this); 6 var term = $(this).find('input').val(); 7 $('.js-service-search-result').remove(); 8 /* 9 if (term.indexOf('-000') !== -1) { 10 // order 11 } else { 12 // different 13 14 } 15 */ 16 $.ajax({ 17 type: 'POST', 18 url: functions_url+'?func=search', 19 dataType: 'json', 20 data: {params: term}, 21 success: function(data) { 22 if (data.result.mode == 'pre_order_status') { 23 output = '<div class="js-service-search-result">'+data.result.output+'</div>'; 24 } else if (data.result.mode == 'order_status') { 25 output = '<div class="js-service-search-result"><div class="js-order-status"><div class="js-response">'+data.result.output+'</div></div></div>'; 26 } else if (data.result.mode == 'error') { 27 output = '<div class="js-service-search-result t-center error">'+data.result.output+'</div>'; 28 } else { 29 output = '<div class="js-service-search-result">'+data.result.output+'</div>'; 30 } 31 el.after(output); 32 33 if (data.result.mode == 'pre_order_status') { 34 $('.js-service-search-result input[name="cid"]').attr('val', term).val(term); 35 $('.js-service-search-result input[name="plz"]').focus(); 36 } 37 } 38 }); 39 }); 40 41 }); 42 43 /* 44 function ChangeSlider(obj) { 45 obj.element.find('.js-current .dot').eq(obj.cur_slide).addClass('active').siblings().removeClass('active'); 46 } 47 */ 48} 49new Plugin_Service_Search();
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.