Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Use the modal dialog to edit exercises and exercise categories from overview

Roland Geider382b903472fa
diff --git a/exercises/templates/edit_exercise.html b/exercises/templates/edit_exercise.html
index 3c2fa4f03..3ec4eeaef 100644
--- a/exercises/templates/edit_exercise.html
+++ b/exercises/templates/edit_exercise.html
@@ -3,8 +3,8 @@
{% load staticfiles %}
{% block header %}
-<script src="{% static "js/tinymce/tiny_mce.js" %}"></script>
-<script src="{% static "js/workout-manager.js" %}"></script>
+<script src="{% static 'js/tinymce/tiny_mce.js' %}"></script>
+<script src="{% static 'js/workout-manager.js' %}"></script>
<script type="text/javascript">
init_tinymce();
</script>
diff --git a/exercises/templates/overview.html b/exercises/templates/overview.html
index 7849b26fc..5222ba9e5 100644
--- a/exercises/templates/overview.html
+++ b/exercises/templates/overview.html
@@ -10,9 +10,13 @@
{% block header %}
-<script src="{% static "js/jquery-ui.js" %}"></script>
+<script src="{% static 'js/jquery-ui.js' %}"></script>
+<script src="{% static 'js/tinymce/tiny_mce.js' %}"></script>
+<script src="{% static 'js/workout-manager.js' %}"></script>
<script>
$(document).ready(function() {
+
+ form_modal_dialog();
// Init the tabs for the exercises
$( "#tabs" ).tabs();
@@ -101,7 +105,8 @@ $(document).ready(function() {
{% if perms.exercises %}
<div class="editoptions">
<a href="{% url exercises.views.exercise_edit exercise.id %}"
- title="{% trans 'Edit' %}">[e]</a>
+ title="{% trans 'Edit' %}"
+ class="modal-dialog">[e]</a>
<a href="{% url exercises.views.exercise_delete exercise.id %}"
title="{% trans 'Delete' %}"
@@ -138,7 +143,8 @@ $(document).ready(function() {
<h3>{% trans "Options" %}</h3>
<p>
- <a href="{% url exercises.views.exercise_edit None %}">
+ <a href="{% url exercises.views.exercise_edit None %}"
+ class="modal-dialog">
<img src="{% static 'images/icons/new.svg' %}"
width="32"
height="32"
@@ -148,7 +154,8 @@ $(document).ready(function() {
</a>
</p>
<p>
- <a href="{% url exercises.views.exercise_category_edit None %}">
+ <a href="{% url exercises.views.exercise_category_edit None %}"
+ class="modal-dialog">
<img src="{% static 'images/icons/folder-new.svg' %}"
width="32"
height="32"