forked from CGM_Public/pretix_original
Improve load behavior of ajaxpending.js
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
window.setInterval(function () {
|
||||
$.get(location.href + '?ajax=1', function (data, status) {
|
||||
if (data === "1") {
|
||||
location.reload();
|
||||
var check = function () {
|
||||
$.getJSON(location.href + '&ajax=1', function (data, status) {
|
||||
if (data.redirect) {
|
||||
location.href = data.redirect;
|
||||
} else {
|
||||
window.setTimeout(check, 500);
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
window.setTimeout(check, 500);
|
||||
|
||||
Reference in New Issue
Block a user