updated modal code

This commit is contained in:
Alexander Werner 2017-03-06 19:44:36 +01:00
parent 8e95ae4ff5
commit 323ab5ae98

View File

@ -24,15 +24,16 @@
{% endblock %} {% endblock %}
{% block js %} {% block js %}
<script type="text/javascript"> <script type="text/javascript">
var interval;
$(document).ready(function() { $(document).ready(function() {
$.ajaxSetup({ cache: false }); $.ajaxSetup({ cache: false });
window.setInterval(refresh_page, 1000); interval = window.setInterval(refresh_page, 1000);
}); });
function refresh_page() { function refresh_page() {
$('#desk_data').load('#'); $('#desk_data').load('#');
$('#modal-wrapper').load('{% url 'accountmodal' %}', function() { $('#modal-wrapper').load('{% url 'accountmodal' %}', function() {
$('.modal').modal('hide'); window.clearInterval(interval);
$('#accountsmodal').modal('show'); $('#accountsmodal').modal('show');
}); });
} }