Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Don't hard code the width of weight log chart on exercise page

Roland Geider6dfbf0239244
diff --git a/wger/exercises/templates/mobile/view.html b/wger/exercises/templates/mobile/view.html
index cd39b21a6..dc0e47539 100644
--- a/wger/exercises/templates/mobile/view.html
+++ b/wger/exercises/templates/mobile/view.html
@@ -193,12 +193,12 @@ included in the database.{% endblocktrans %}
<h3>{% trans "Weight log" %}</h3>
{% render_weight_log logs svg_uuid %}
-<script src="{% static 'js/d3.js' %}"></script>
-<script src="{% static 'js/jquery-globalize/lib/globalize.js' %}"></script>
-
<script>
$(document).ready(function() {
-weight_log_chart({{json|safe}}, "{{svg_uuid}}", "{{reps}}")
+ weight_log_chart({{json|safe}},
+ "{{svg_uuid}}",
+ "{{reps}}",
+ $('#content').width() * 0.95)
});
</script>
{% endif %}