PHRAS-2282 add loader on results display

This commit is contained in:
Harrys Ravalomanana
2019-08-14 16:26:16 +04:00
parent 0d84aa040a
commit 816225036f
2 changed files with 8 additions and 0 deletions

View File

@@ -95,5 +95,11 @@
padding: 0 9px;
font-weight: bold;
}
.result_loader {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
</style>

View File

@@ -119,6 +119,7 @@
//load the next result page
jQuery(document).ready(function(){
jQuery('.next_res').click(function(){
jQuery('.results').append('<img class="result_loader" src="/assets/common/images/icons/loading.svg">');
jQuery('.results').load($(this).attr('href'));
return false;
});
@@ -126,6 +127,7 @@
//load the prev result page
jQuery(document).ready(function(){
jQuery('.prev_res').click(function(){
jQuery('.results').append('<img class="result_loader" src="/assets/common/images/icons/loading.svg">');
jQuery('.results').load($(this).attr('href'));
return false;
});