mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Removed all inline <script> tags
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
$(function () {
|
||||
jQuery('#qrcodeCanvas').qrcode(
|
||||
{
|
||||
text: '{{ qrdata|safe }}'
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -1,6 +1,7 @@
|
||||
{% extends "pretixcontrol/event/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% load staticfiles %}
|
||||
{% block title %}{% trans "pretixdroid configuration" %}{% endblock %}
|
||||
{% block content %}
|
||||
<h1>{% trans "pretixdroid configuration" %}</h1>
|
||||
@@ -9,11 +10,7 @@
|
||||
If you try to configure the app, it will ask you to scan the QR code below.
|
||||
{% endblocktrans %}</p>
|
||||
<div id="qrcodeCanvas"></div>
|
||||
<script type="text/javascript">
|
||||
jQuery('#qrcodeCanvas').qrcode({
|
||||
text: '{{ qrdata|safe }}'
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="{% static "pretixplugins/pretixdroid/pretixdroid.js" %}"></script>
|
||||
<a href="?flush_key=1" class="btn btn-default">{% trans "Reset authentication token" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*globals $, Morris*/
|
||||
$(function () {
|
||||
new Morris.Area({
|
||||
element: 'obd_chart',
|
||||
data: JSON.parse($("#obd-data").html()),
|
||||
xkey: 'date',
|
||||
ykeys: ['ordered', 'paid'],
|
||||
labels: ['{% trans "Placed orders" %}', '{% trans "Paid orders" %}'],
|
||||
lineColors: ['#000099', '#009900'],
|
||||
smooth: false,
|
||||
resize: true,
|
||||
fillOpacity: 0.3,
|
||||
behaveLikeLine: true
|
||||
});
|
||||
new Morris.Area({
|
||||
element: 'rev_chart',
|
||||
data: JSON.parse($("#rev-data").html()),
|
||||
xkey: 'date',
|
||||
ykeys: ['revenue'],
|
||||
labels: ['{% trans "Total revenue" %}'],
|
||||
smooth: false,
|
||||
resize: true,
|
||||
fillOpacity: 0.3,
|
||||
preUnits: '{{ request.event.currency }} '
|
||||
});
|
||||
new Morris.Bar({
|
||||
element: 'obp_chart',
|
||||
data: JSON.parse($("#odp-data").html()),
|
||||
xkey: 'item',
|
||||
ykeys: ['ordered', 'paid'],
|
||||
labels: ['{% trans "Placed orders" %}', '{% trans "Paid orders" %}'],
|
||||
barColors: ['#000099', '#009900'],
|
||||
resize: true
|
||||
});
|
||||
});
|
||||
@@ -29,39 +29,9 @@
|
||||
<div id="obp_chart" style="height: 250px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
new Morris.Area({
|
||||
element: 'obd_chart',
|
||||
data: {{ obd_data|safe }},
|
||||
xkey: 'date',
|
||||
ykeys: ['ordered', 'paid'],
|
||||
labels: ['{% trans "Placed orders" %}', '{% trans "Paid orders" %}'],
|
||||
lineColors: ['#000099', '#009900'],
|
||||
smooth: false,
|
||||
resize: true,
|
||||
fillOpacity: 0.3,
|
||||
behaveLikeLine: true
|
||||
});
|
||||
new Morris.Area({
|
||||
element: 'rev_chart',
|
||||
data: {{ rev_data|safe }},
|
||||
xkey: 'date',
|
||||
ykeys: ['revenue'],
|
||||
labels: ['{% trans "Total revenue" %}'],
|
||||
smooth: false,
|
||||
resize: true,
|
||||
fillOpacity: 0.3,
|
||||
preUnits: '{{ request.event.currency }} '
|
||||
});
|
||||
new Morris.Bar({
|
||||
element: 'obp_chart',
|
||||
data: {{ obp_data|safe }},
|
||||
xkey: 'item',
|
||||
ykeys: ['ordered', 'paid'],
|
||||
labels: ['{% trans "Placed orders" %}', '{% trans "Paid orders" %}'],
|
||||
barColors: ['#000099', '#009900'],
|
||||
resize: true
|
||||
});
|
||||
</script>
|
||||
<script type="application/json" id="obd-data">{{ obd_data|safe }}</script>
|
||||
<script type="application/json" id="rev-data">{{ rev_data|safe }}</script>
|
||||
<script type="application/json" id="obp-data">{{ obp_data|safe }}</script>
|
||||
<script type="application/javascript" src="{% static "pretixplugins/statistics/statistics.js" %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user