mirror of
https://github.com/remoteintech/remote-jobs
synced 2025-01-13 04:58:43 +00:00
Add a link to search for incomplete profiles
This commit is contained in:
parent
de7db578ba
commit
f6384c90cb
1 changed files with 14 additions and 2 deletions
|
@ -17,9 +17,19 @@ function setupSearch() {
|
|||
searchExplanation.id = 'search-explanation';
|
||||
searchExplanation.innerHTML = (
|
||||
'Use the text box above to search all of our company data.'
|
||||
+ ' You can also '
|
||||
+ '<a href="#" id="search-incomplete">search for incomplete company profiles</a>.'
|
||||
);
|
||||
table.parentNode.insertBefore( searchExplanation, table );
|
||||
|
||||
document.getElementById( 'search-incomplete' )
|
||||
.addEventListener( 'click', function( event ) {
|
||||
event.preventDefault();
|
||||
searchInput.value = '_incomplete';
|
||||
initializeSearch();
|
||||
updateSearch();
|
||||
} );
|
||||
|
||||
var searchLoading = false;
|
||||
var searchData = null;
|
||||
var searchIndex = null;
|
||||
|
@ -155,7 +165,7 @@ function setupSearch() {
|
|||
} );
|
||||
}
|
||||
|
||||
searchInput.addEventListener( 'focus', function() {
|
||||
function initializeSearch() {
|
||||
if ( searchData || searchLoading ) {
|
||||
return;
|
||||
}
|
||||
|
@ -189,7 +199,9 @@ function setupSearch() {
|
|||
};
|
||||
|
||||
xhr.send();
|
||||
} );
|
||||
}
|
||||
|
||||
searchInput.addEventListener( 'focus', initializeSearch );
|
||||
|
||||
searchInput.addEventListener( 'keyup', function() {
|
||||
if ( updateTimeout ) {
|
||||
|
|
Loading…
Reference in a new issue