Self hosted FLOSS fitness/workout, nutrition and weight tracker
Move jquery-ui.js to base template, it was being included everywhere
Roland Geiderb78b7e56e856
diff --git a/exercises/templates/overview.html b/exercises/templates/overview.htmlindex 2d148ad16..f4872d054 100644--- a/exercises/templates/overview.html+++ b/exercises/templates/overview.html@@ -10,7 +10,6 @@{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script><script src="{% static 'js/tinymce/tiny_mce.js' %}"></script><script>@@ -20,9 +19,6 @@ function custom_modal_init()}$(document).ready(function() {-- form_modal_dialog();-// Init the tabs for the exercises$( "#tabs" ).tabs();diff --git a/exercises/templates/view.html b/exercises/templates/view.htmlindex 2d4f36934..e613cd373 100644--- a/exercises/templates/view.html+++ b/exercises/templates/view.html@@ -4,7 +4,6 @@{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script><script src="{% static 'js/tinymce/tiny_mce.js' %}"></script><script>@@ -13,13 +12,6 @@ function custom_modal_init()// Set up the tinyMCE editor on modal dialogsinit_tinymce();}--$(document).ready(function() {-- // Init the modal dialog to edit the exercise- form_modal_dialog();-});-</script>{% endblock %}<!--diff --git a/manager/templates/base.html b/manager/templates/base.htmlindex d876093c6..d04c17eb0 100644--- a/manager/templates/base.html+++ b/manager/templates/base.html@@ -31,9 +31,17 @@<script src="{% static 'js/jquery.js' %}"></script>+ <script src="{% static 'js/jquery-ui.js' %}"></script><script src="{% static 'js/workout-manager.js' %}"></script>{% block header %}{% endblock %}+ <script>+ $(document).ready(function() {+ // Init the modal dialog for editing forms+ form_modal_dialog();+ });+ </script>+<title>{% block title %}{% endblock %}</title></head><body>diff --git a/manager/templates/set/edit.html b/manager/templates/set/edit.htmlindex 091912215..c000a3489 100644--- a/manager/templates/set/edit.html+++ b/manager/templates/set/edit.html@@ -11,7 +11,6 @@Header-->{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script><script src="{% static 'js/jquery.validate.js' %}"></script><script>diff --git a/manager/templates/workout/view.html b/manager/templates/workout/view.htmlindex da8645677..6a4f27bd3 100644--- a/manager/templates/workout/view.html+++ b/manager/templates/workout/view.html@@ -6,7 +6,6 @@{% block title %}{% trans "Workout" %} – {{ workout.creation_date }}{% endblock %}{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script><script src="{% static 'js/jquery.validate.js' %}"></script><script>function custom_modal_init()@@ -19,9 +18,6 @@ $(document).ready(function() {// Allow the sets to be sortablesetup_sortable();- // Init the modal dialog to edit the exercise- form_modal_dialog();-// Show/Hide the comments to the exercises{% if user.userprofile.show_comments %}showComment = 1;diff --git a/nutrition/templates/edit_meal_item.html b/nutrition/templates/edit_meal_item.htmlindex aa3ba0adb..6bcf1f5c9 100644--- a/nutrition/templates/edit_meal_item.html+++ b/nutrition/templates/edit_meal_item.html@@ -6,7 +6,6 @@{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script><script type="text/javascript">$(document).ready(function() {// Init the autocompleterdiff --git a/nutrition/templates/ingredient_overview.html b/nutrition/templates/ingredient_overview.htmlindex 430ddb3b2..1bd55cb41 100644--- a/nutrition/templates/ingredient_overview.html+++ b/nutrition/templates/ingredient_overview.html@@ -4,18 +4,8 @@{% block title %}{% trans "Ingredient overview" %}{% endblock %}-{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script>-<script>-$(document).ready(function() {- // Init the modal dialog to edit the exercise- form_modal_dialog();-});-</script>-{% endblock %}{% block content %}-<h2>{% trans "Ingredient overview" %}</h2>{% if ingredients %}diff --git a/nutrition/templates/view_ingredient.html b/nutrition/templates/view_ingredient.htmlindex aec86977a..8a00df0ee 100644--- a/nutrition/templates/view_ingredient.html+++ b/nutrition/templates/view_ingredient.html@@ -5,18 +5,6 @@{% block title %}{{ingredient.name}}{% endblock %}-{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script>-<script>-$(document).ready(function() {- // Init the modal dialog to edit the exercise- form_modal_dialog();-});-</script>-{% endblock %}---{% block content %}<h2>{{ingredient.name}}</h2>diff --git a/nutrition/templates/view_nutrition_plan.html b/nutrition/templates/view_nutrition_plan.htmlindex c7301933c..c422d7659 100644--- a/nutrition/templates/view_nutrition_plan.html+++ b/nutrition/templates/view_nutrition_plan.html@@ -6,7 +6,6 @@{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script><script>function custom_modal_init(){@@ -32,9 +31,6 @@ $(document).ready(function() {$('.edit-meal').each(function(element){$(this).attr('href', $(this).attr('href') + '?js=on')})-- // Init the modal dialog to open forms in a window- form_modal_dialog();});</script>{% endblock %}diff --git a/weight/templates/edit.html b/weight/templates/edit.htmlindex bb6b9478a..6ad911fd9 100644--- a/weight/templates/edit.html+++ b/weight/templates/edit.html@@ -7,7 +7,10 @@{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script>+{% if language.short_name == 'de' %}+<script src="{% static 'js/jquery.ui.datepicker-de.js' %}"></script>+{% endif %}+<script>$(document).ready(function () {init_weight_datepicker();diff --git a/weight/templates/weight_overview.html b/weight/templates/weight_overview.htmlindex f60ccfeca..d1422f0d0 100644--- a/weight/templates/weight_overview.html+++ b/weight/templates/weight_overview.html@@ -11,7 +11,6 @@Header data-->{% block header %}-<script src="{% static 'js/jquery-ui.js' %}"></script>{% if language.short_name == 'de' %}<script src="{% static 'js/jquery.ui.datepicker-de.js' %}"></script>{% endif %}@@ -69,14 +68,6 @@ $(document).ready(function () {weight_chart(json);});});--- // Init the modal dialog- form_modal_dialog();----});</script>{% endblock %}