Commit 5d70f6b4 by Arpit Jain

added loader

parent aa43f48c
...@@ -44,3 +44,46 @@ div#localitylist { ...@@ -44,3 +44,46 @@ div#localitylist {
font-size: 0.9rem; font-size: 0.9rem;
color: rgba(0, 0, 0, 0.6); color: rgba(0, 0, 0, 0.6);
} }
/*For loader*/
.loader-outer-box {
background: rgba(218, 213, 198, 0.68);
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
height: 100%;
width: 100%;
z-index: 2;
display: none;
}
.loader {
border:10px solid #18181999;
border-radius: 50%;
border-top: 10px solid #ffc507;
width: 60px;
height: 60px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
position: absolute;
left: 0;
right: 0;
margin: auto;
top: 0;
bottom: 0;
}
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.location_data{
position: relative;
}
\ No newline at end of file
...@@ -183,13 +183,13 @@ ...@@ -183,13 +183,13 @@
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<div class="dropdown mb-3"> <div class="dropdown mb-3">
<div class="btn btn-secondary dropdown-toggle custom-dropdown" id="reviewbyfilter" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <div class="btn btn-secondary custom-dropdown" id="reviewbyfilter" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Most Newest Most Newest
</div> </div>
<div class="dropdown-menu" aria-labelledby="reviewbyfilter"> <!--dropdown-toggle <div class="dropdown-menu" aria-labelledby="reviewbyfilter">
<a class="dropdown-item" href="javascript:void(0);">Highest rating</a> <a class="dropdown-item" href="javascript:void(0);">Highest rating</a>
<a class="dropdown-item" href="javascript:void(0);">Lowest rating</a> <a class="dropdown-item" href="javascript:void(0);">Lowest rating</a>
</div> </div>-->
</div> </div>
</div> </div>
</div> </div>
......
@extends('layouts.frontend') @extends('layouts.frontend')
@section('content') @section('content')
<section class="searchbar container-fluid"> <section class="searchbar container-fluid">
<div class="row"> <div class="row">
<div class="col-md-10 col-lg-9 col-12"> <div class="col-md-10 col-lg-9 col-12">
...@@ -49,6 +50,9 @@ ...@@ -49,6 +50,9 @@
</section> </section>
<section class="container-fluid location_data no-pb"> <section class="container-fluid location_data no-pb">
<div class="row"> <div class="row">
<div class="loader-outer-box">
<div class="loader"></div>
</div>
<aside class="col-md-5 col-lg-3 location_data-lw" id="searchlocaterid"> <aside class="col-md-5 col-lg-3 location_data-lw" id="searchlocaterid">
<!--search count and filter start--> <!--search count and filter start-->
@include('frontend.searchs.location_element') @include('frontend.searchs.location_element')
...@@ -107,8 +111,11 @@ ...@@ -107,8 +111,11 @@
data: {"_token": "{{ csrf_token() }}", locality:locality, location:location, state:state,city:city}, data: {"_token": "{{ csrf_token() }}", locality:locality, location:location, state:state,city:city},
success: function (datanew) { success: function (datanew) {
if(datanew.status == 'success') { if(datanew.status == 'success') {
//PRELOADER
loader();
$('#searchlocaterid').html(datanew.data); $('#searchlocaterid').html(datanew.data);
} else { } else {
loader();
$('#searchlocaterid').html(datanew.data); $('#searchlocaterid').html(datanew.data);
} }
} }
...@@ -146,8 +153,10 @@ ...@@ -146,8 +153,10 @@
success: function (datanew) { success: function (datanew) {
if(datanew.status == 'success') { if(datanew.status == 'success') {
loader();
$('#searchlocaterid').html(datanew.data); $('#searchlocaterid').html(datanew.data);
} else { } else {
loader();
$('#searchlocaterid').html(datanew.data); $('#searchlocaterid').html(datanew.data);
} }
$(".locality").val(locality); $(".locality").val(locality);
...@@ -177,6 +186,14 @@ ...@@ -177,6 +186,14 @@
}); });
}); });
function loader(){
if ($('.loader-outer-box').length) {
$('.loader-outer-box').fadeIn('slow', function () {
setTimeout(function(){ $('.loader-outer-box').fadeOut('slow'); }, 2000);
});
}
}
</script> </script>
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</div> </div>
</article> </article>
@endforeach @endforeach
@if($reviewData['meta']['total'] > 15)
<article class="text-center"> <article class="text-center">
<!-- For Pagination --> <!-- For Pagination -->
<div class="pagination-wrapper justify-content-center"> <div class="pagination-wrapper justify-content-center">
...@@ -68,4 +69,5 @@ ...@@ -68,4 +69,5 @@
</div> </div>
<!-- End Pagination --> <!-- End Pagination -->
</article> </article>
@endif
</div> </div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment