mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Statistics: Prevent issues with async script loading
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
/*globals $, Morris, gettext*/
|
||||
/*globals $, Morris, gettext, django*/
|
||||
function gettext(msgid) {
|
||||
if (typeof django !== 'undefined' && typeof django.gettext !== 'undefined') {
|
||||
return django.gettext(msgid);
|
||||
}
|
||||
return msgid;
|
||||
}
|
||||
$(function () {
|
||||
$(".chart").css("height", "250px");
|
||||
new Morris.Area({
|
||||
|
||||
@@ -63,7 +63,8 @@
|
||||
<script type="application/json" id="rev-data">{{ rev_data|escapejson }}</script>
|
||||
<script type="application/json" id="obp-data">{{ obp_data|escapejson }}</script>
|
||||
<script type="application/text" id="currency">{{ request.event.currency }}</script>
|
||||
<script type="application/javascript" src="{% static "pretixplugins/statistics/statistics.js" %}"></script>
|
||||
<script type="application/javascript" src="{% static "pretixplugins/statistics/statistics.js" %}"
|
||||
defer></script>
|
||||
{% else %}
|
||||
<div class="empty-collection">
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user