Skip to content
Snippets Groups Projects
Commit 18f0022b authored by Martyn Welch's avatar Martyn Welch
Browse files

Provide clearer feedback during search process


For users on slower connections/computers, the search index can take a
while to download and for the search to complete.

- Add a "Loading..." message to provide the user with some early feedback.
- Bump up the size of the text used when displaying status messages to
  make then clearer.

Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
parent b0ca6d02
No related branches found
No related tags found
1 merge request!21Provide clearer feedback during search process
Pipeline #133473 passed
......@@ -3,6 +3,7 @@
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div id="search-results">
<div id="loading"><h2>Loading...<h2></div>
</div>
</div>
</div>
......
......@@ -29,7 +29,8 @@ if(searchQuery){
$("#search-query").val(searchQuery);
executeSearch(searchQuery);
}else {
$('#search-results').append("<p>Please enter a word or phrase in the navigation bar search box.</p>");
$('#loading').remove()
$('#search-results').append("<h2>Please enter a word or phrase in the navigation bar search box.</h2>");
}
function executeSearch(searchQuery){
......@@ -41,12 +42,15 @@ function executeSearch(searchQuery){
if(result.length > 0){
populateResults(result);
}else{
$('#search-results').append("<p>No matches found</p>");
$('#loading').remove()
$('#search-results').append("<h2>No matches found</h2>");
}
});
}
function populateResults(result){
$('#loading').remove()
$.each(result,function(key,value){
var contents= value.item.contents;
var snippet = "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment