fix page refresh
This commit is contained in:
parent
e1d96b9b76
commit
908464627e
@ -9,7 +9,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
{% include 'billard/location_detail_ajax.html' %}
|
||||
{% include 'billard/location_detail_ajax.html' %}
|
||||
</div>
|
||||
<div id="modal-wrapper">
|
||||
</div>
|
||||
@ -18,19 +18,24 @@
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
var interval;
|
||||
$(document).ready(function() {
|
||||
$.ajaxSetup({ cache: false });
|
||||
$(document).ready(function () {
|
||||
$.ajaxSetup({cache: false});
|
||||
interval = window.setInterval(refresh_page, 1000);
|
||||
});
|
||||
});
|
||||
|
||||
function refresh_page() {
|
||||
$('#desk_data').load('#');
|
||||
$('#modal-wrapper').load('{% url 'billard:account_modal' loc_pk=pk %}', function() {
|
||||
if ( $('#accountsmodal').length ) {
|
||||
function refresh_page() {
|
||||
|
||||
$('#row').load('#');
|
||||
$('#modal-wrapper').load('{% url 'billard:account_modal' loc_pk=pk %}', function () {
|
||||
if ($('#accountsmodal').length) {
|
||||
window.clearInterval(interval);
|
||||
$('#accountsmodal').modal('show');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
setTimeout(function () {
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user