forked from CGM_Public/pretix_original
Improve load behavior of ajaxpending.js
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
<script type="text/javascript" src="{% static "pretixbase/js/ajaxpending.js" %}"></script>
|
<script type="text/javascript" src="{% static "pretixbase/js/ajaxpending.js" %}"></script>
|
||||||
{% endcompress %}
|
{% endcompress %}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="refresh" content="1">
|
<meta http-equiv="refresh" content="10">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
window.setInterval(function () {
|
var check = function () {
|
||||||
$.get(location.href + '?ajax=1', function (data, status) {
|
$.getJSON(location.href + '&ajax=1', function (data, status) {
|
||||||
if (data === "1") {
|
if (data.redirect) {
|
||||||
location.reload();
|
location.href = data.redirect;
|
||||||
|
} else {
|
||||||
|
window.setTimeout(check, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 500);
|
}
|
||||||
|
window.setTimeout(check, 500);
|
||||||
|
|||||||
Reference in New Issue
Block a user