Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add box at the top of the page to display ajax responses

Roland Geider706ac4db997a
diff --git a/manager/static/css/yaml401/custom-yaml.css b/manager/static/css/yaml401/custom-yaml.css
index efe764f2a..1998715a2 100644
--- a/manager/static/css/yaml401/custom-yaml.css
+++ b/manager/static/css/yaml401/custom-yaml.css
@@ -11,3 +11,11 @@ tr:hover div.editoptions, tbody tr:hover td div.editoptions
visibility: visible;
}
+
+
+/*
+ * Own classes
+ */
+.invisible{
+ display: none;
+}
\ No newline at end of file
diff --git a/manager/templates/base.html b/manager/templates/base.html
index 1417fc26f..06b48830d 100644
--- a/manager/templates/base.html
+++ b/manager/templates/base.html
@@ -63,6 +63,15 @@
<div id="main">
<div class="ym-wrapper">
+ <section >
+ <div class="ym-grid linearize-level-1">
+ <article class="ym-g80 ym-gl">
+ <div class="ym-gbox-left box invisible" id="ajax-info">
+
+ </div>
+ </article>
+ </div>
+ </section>
<div class="ym-wbox">
<section class="ym-grid linearize-level-1">
<article class="ym-g66 ym-gl content">
diff --git a/manager/templates/workout/view.html b/manager/templates/workout/view.html
index 43a42e6aa..7c429c832 100644
--- a/manager/templates/workout/view.html
+++ b/manager/templates/workout/view.html
@@ -21,7 +21,9 @@ $(document).ready(function() {
order = $("#workout-table tbody").sortable('toArray');
- $("#ajax-info").load("/workout/api/edit-set" + "?do=set_order&day_id=" + day_id + "&order=" + order);
+ //$("#ajax-info").show();
+ //$("#ajax-info").addClass('success');
+ //$("#ajax-info").load("/workout/api/edit-set" + "?do=set_order&day_id=" + day_id + "&order=" + order);
}
}).disableSelection();
@@ -32,8 +34,6 @@ $(document).ready(function() {
{% block content %}
<h2> {% trans "Workout for" %} {{ workout.creation_date }}</h2>
-<div id="ajax-info"></div>
-
{% for day in workout.day_set.select_related %}
<table class="bordertable" id="workout-table">
<thead>