Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Include the individual app's JS files in the template

Roland Geider6f71077b74db
diff --git a/wger/exercises/templates/mobile/view.html b/wger/exercises/templates/mobile/view.html
index 409e560c1..2eac2db54 100644
--- a/wger/exercises/templates/mobile/view.html
+++ b/wger/exercises/templates/mobile/view.html
@@ -8,7 +8,6 @@
{% block header %}
<script src="{% static 'js/tinymce/tiny_mce.js' %}"></script>
-<script src="{% static 'js/exercises.js' %}"></script>
<script>
function custom_modal_init()
diff --git a/wger/manager/templates/mobile/template.html b/wger/manager/templates/mobile/template.html
index e7bb1f442..3010fdde0 100644
--- a/wger/manager/templates/mobile/template.html
+++ b/wger/manager/templates/mobile/template.html
@@ -41,6 +41,9 @@
<script src="{% static 'js/d3.js' %}"></script>
<script src="{% static 'js/workout-manager.js' %}" type="text/javascript"></script>
<script src="{% static 'js/workout-manager-mobile.js' %}" type="text/javascript"></script>
+ <script src="{% static 'js/exercises.js' %}"></script>
+ <script src="{% static 'js/weight.js' %}"></script>
+ <script src="{% static 'js/nutrition.js' %}"></script>
{% block header %}{% endblock %}
</head>
diff --git a/wger/manager/templates/mobile/workout/log.html b/wger/manager/templates/mobile/workout/log.html
index 1634d48df..1c0d5265b 100644
--- a/wger/manager/templates/mobile/workout/log.html
+++ b/wger/manager/templates/mobile/workout/log.html
@@ -11,8 +11,6 @@
{% block scripts %}
-<script src="{% static 'js/exercises.js' %}"></script>
-
<script type="text/javascript">
$(document).on('pageinit', function(){
// Init the data toggle for the weight log tables
diff --git a/wger/manager/templates/mobile/workout/view.html b/wger/manager/templates/mobile/workout/view.html
index f890fbbf3..7a45b81f0 100644
--- a/wger/manager/templates/mobile/workout/view.html
+++ b/wger/manager/templates/mobile/workout/view.html
@@ -10,7 +10,6 @@
{% block scripts %}
-<script src="{% static 'js/exercises.js' %}"></script>
<script>
$( document ).off("pageinit").on("pageinit", function() {
/*
diff --git a/wger/manager/templates/workout/log.html b/wger/manager/templates/workout/log.html
index 1a7884d1c..b290c9442 100644
--- a/wger/manager/templates/workout/log.html
+++ b/wger/manager/templates/workout/log.html
@@ -8,7 +8,6 @@
{% block header %}
<script src="{% static 'js/d3.js' %}"></script>
-<script src="{% static 'js/exercises.js' %}"></script>
<script type="text/javascript">
// Initialise the datepicker for the modal dialog
diff --git a/wger/nutrition/templates/mobile/ingredient/view.html b/wger/nutrition/templates/mobile/ingredient/view.html
index 8a125b918..a76ae42e4 100644
--- a/wger/nutrition/templates/mobile/ingredient/view.html
+++ b/wger/nutrition/templates/mobile/ingredient/view.html
@@ -7,7 +7,6 @@
{% block title %}{{ingredient.name}}{% endblock %}
{% block header %}
-<script src="{% static 'js/nutrition.js' %}"></script>
<script>
$(document).on('pageinit', function(){
init_ingredient_detail("{% url 'ingredient-get-values' ingredient.id %}");
diff --git a/wger/nutrition/templates/mobile/meal_item/edit.html b/wger/nutrition/templates/mobile/meal_item/edit.html
index b0d4d03f9..da0aa8b32 100644
--- a/wger/nutrition/templates/mobile/meal_item/edit.html
+++ b/wger/nutrition/templates/mobile/meal_item/edit.html
@@ -9,8 +9,6 @@
{% block header %}
-<script src="{% static 'js/nutrition.js' %}"></script>
-
<script type="text/javascript">
$(document).ready(function() {
// Init the autocompleter
diff --git a/wger/nutrition/templates/mobile/plan/view.html b/wger/nutrition/templates/mobile/plan/view.html
index b440f7c17..7f08b4fab 100644
--- a/wger/nutrition/templates/mobile/plan/view.html
+++ b/wger/nutrition/templates/mobile/plan/view.html
@@ -7,8 +7,6 @@
{% block header %}
-<script src="{% static 'js/nutrition.js' %}"></script>
-
<script>
function custom_modal_init()
{
diff --git a/wger/nutrition/templates/mobile/rate/form.html b/wger/nutrition/templates/mobile/rate/form.html
index 1b92f9e1b..7c7659672 100644
--- a/wger/nutrition/templates/mobile/rate/form.html
+++ b/wger/nutrition/templates/mobile/rate/form.html
@@ -4,8 +4,6 @@
{% load wger_extras %}
{% block header %}
-<script src="{% static 'js/nutrition.js' %}"></script>
-
<script>
$(document).ready(function() {
init_calories_calculator();
diff --git a/wger/weight/templates/mobile/weight_overview.html b/wger/weight/templates/mobile/weight_overview.html
index 0f13c9127..e1b6f92fd 100644
--- a/wger/weight/templates/mobile/weight_overview.html
+++ b/wger/weight/templates/mobile/weight_overview.html
@@ -14,7 +14,6 @@
{% block header %}
<script src="{% static 'js/d3.js' %}"></script>
<script src="{% static 'js/jquery-globalize/lib/globalize.js' %}"></script>
-<script src="{% static 'js/weight.js' %}"></script>
<script type="text/javascript">