Self hosted FLOSS fitness/workout, nutrition and weight tracker
More post-merge cleanup
Roland Geider731c8940a24f
diff --git a/wger/core/templates/index.html b/wger/core/templates/index.htmlindex c904aa689..c81541dda 100644--- a/wger/core/templates/index.html+++ b/wger/core/templates/index.html@@ -149,6 +149,7 @@ day in your current workout:{% endblocktrans %} <strong>{{current_workout}}</str</tr></table></div>+ <div id="nutrition_diary_chart"></div></div>{% if not plan %}<div class="card-footer">diff --git a/wger/core/templates/template.html b/wger/core/templates/template.htmlindex 33150186f..81d8ef5f7 100644--- a/wger/core/templates/template.html+++ b/wger/core/templates/template.html@@ -68,7 +68,6 @@<script src="{% static 'js/wger-core.js' %}"></script><script src="{% static 'js/exercises.js' %}"></script><script src="{% static 'js/nutrition.js' %}"></script>- <script src="{% static 'bower_components/metrics-graphics/dist/metricsgraphics.min.js' %}"></script>{% endcompress %}{% block header %}{% endblock %}diff --git a/wger/nutrition/static/js/nutrition.js b/wger/nutrition/static/js/nutrition.jsindex b7d8c2647..723961a5e 100644--- a/wger/nutrition/static/js/nutrition.js+++ b/wger/nutrition/static/js/nutrition.js@@ -99,8 +99,7 @@ function wgerInitIngredientAutocompleter() {function wgerDrawNutritionDiaryChart(planPk) {var dataConverted;-- d3.json('/api/v2/nutritionplan/' + planPk + '/get_log_overview/', function (data) {+ d3.json('/api/v2/nutritionplan/' + planPk + '/get_log_overview/').then(function (data) {if (data.length > 0) {dataConverted = MG.convert.date(data, 'date');$.getJSON('/api/v2/nutritionplan/' + planPk + '/nutritional_values/',@@ -109,14 +108,12 @@ function wgerDrawNutritionDiaryChart(planPk) {data: dataConverted,y_accessor: 'energy',x_accessor: 'date',+ decimals: 0,full_width: true,- top: 10,- left: 30,- right: 10,baselines: [{ value: nutritionalValues.total.energy,- label: 'Planned calories (' + nutritionalValues.total.energy + 'kcal)' }],+ label: 'Planned (' + nutritionalValues.total.energy + 'kcal)' }],target: '#nutrition_diary_chart',- colors: '#4e9a06'+ colors: '#307916'});});}diff --git a/wger/nutrition/templates/log/detail.html b/wger/nutrition/templates/log/detail.htmlindex 7ef19d0af..366168da3 100644--- a/wger/nutrition/templates/log/detail.html+++ b/wger/nutrition/templates/log/detail.html@@ -113,13 +113,12 @@</td>{% if is_owner %}<td>- <div class="btn-group pull-right">+ <div class="dropdown"><button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown">- <span class="glyphicon glyphicon-cog"></span></button>- <ul class="dropdown-menu" role="menu">+ <ul class="dropdown-menu dropdown-menu-right" role="menu"><li>- <a href="{% url 'nutrition:log:delete' entry.pk %}" class="wger-modal-dialog">+ <a href="{% url 'nutrition:log:delete' entry.pk %}" class="wger-modal-dialog dropdown-item">{% trans 'Delete' %}</a></li>