1$('#siteSearchTxt').on('keydown', function(e) { 2 var $el = $(this); 3 if ($el.hasClass('srch-exe')) $el.blur(); 4 if (e.which === 13) { 5 e.preventDefault(); 6 $('#siteSearchBtn').click(); // search executed through header of site 7 return false; 8 } 9}); 10$('#siteSearchBtn').on('click', function() { 11 $('#cpsys_FormItem_siteSearch_chsSearchPostModuleIds').val(''); // we want to clear old module criteria when users search through header. chs_ExecuteSiteSearch function called directly from elements on search.aspx page 12 chs_ExecuteSiteSearch(); 13}); 14function chs_ExecuteSiteSearch() { 15 var criteria = $('#siteSearchTxt').val().trim(); 16 var isValid = criteria.length > 0; 17 if (isValid) $('#cpsys_FormItem_siteSearch_chsSiteSearchButton').click(); 18 chs_RenderSearchUiOnExecution(isValid); 19} 20 21function chs_RenderSearchUiOnExecution(isValid) { 22 if (isValid) { 23 $('#siteSearchTxt, #siteSearchBtn').addClass('srch-exe'); 24 $('#siteSearchError').remove(); 25 $('#siteSearchBtn').after('<img id="siteSearchLoading" src="/integrations/centralpoint/resources/progressicon.gif" alt="Loading...">'); 26 } 27 else { 28 var hasRenderedError = $('#siteSearchError').length > 0; 29 if (!hasRenderedError) $('#siteSearchBtn').after('<p id="siteSearchError" class="alert">* Required</p>'); 30 } 31}
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.