Fixed infinite reload loop

This commit is contained in:
Raphael Michel
2016-06-07 11:55:00 +02:00
parent 511ea66858
commit d3e4941a58
2 changed files with 3 additions and 2 deletions

View File

@@ -20,7 +20,7 @@
<i class="fa fa-cog big-animated-icon"></i> <i class="fa fa-cog big-animated-icon"></i>
<h1>{% trans "We are preparing your file for download…" %}</h1> <h1>{% trans "We are preparing your file for download…" %}</h1>
<p> <p>
{% trans "If this takes longer than a few minutes, please contact us." %} {% trans "If this takes longer than a few minutes, please refresh this page or contact us." %}
</p> </p>
</div> </div>
</body> </body>

View File

@@ -1,6 +1,7 @@
window.setInterval(function () { var intId = window.setInterval(function () {
$.get(location.href + '?ajax=1', function (data, status) { $.get(location.href + '?ajax=1', function (data, status) {
if (data === "1") { if (data === "1") {
window.clearInterval(intId);
location.reload(); location.reload();
} }
}); });