Skip to content

Commit

Permalink
fix [object Object] in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Sep 22, 2020
1 parent 15f25e5 commit 8b2f535
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion admin_tools_stats/templates/admin_tools_stats/analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
<script src="{% static "admin/js/vendor/jquery/jquery.js" %}"></script>
{% include '../include_nvd3.html' %}
<script src="{% url 'admin-charts' %}" type="text/javascript"></script>
<script>
$( document ).ready(function() {
$(".change_chart_button").click(function(){
$('.chrt_container').hide();
$('#chart_' + $(this).data("chart-key")).show();
$('form.stateform:visible').each(loadAnchor);
return false;
});
});
</script>

<style>
.admin_charts {
padding: 0px 0px;
Expand Down Expand Up @@ -35,7 +46,7 @@

{% block content %}
{% for chart in charts %}
<a href="javascript:$('.chrt_container').hide();$('#chart_{{ chart.graph_key }}').show();$('form.stateform:visible').each(loadAnchor)"><button>{{ chart.graph_title }}</button></a>
<a class="change_chart_button" href="?show={{ chart.graph_key }}" data-chart-key="{{ chart.graph_key }}"><button>{{ chart.graph_title }}</button></a>
{% endfor %}
{% include "./chart_containers.html" with disabled=True %}
{% endblock %}

0 comments on commit 8b2f535

Please sign in to comment.