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