Self hosted FLOSS fitness/workout, nutrition and weight tracker
Always show the log table under the charts
Roland Geiderb5e3e0679cfd
diff --git a/wger/core/static/images/icons/toggle.svg b/wger/core/static/images/icons/toggle.svgdeleted file mode 100644index ca4fae8cd..000000000--- a/wger/core/static/images/icons/toggle.svg+++ /dev/null@@ -1,62 +0,0 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) --><svg height="48" id="svg2" inkscape:export-filename="/home/lapo/Desktop/rotate.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:version="0.45" sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/actions" sodipodi:docname="object-flip-horizontal.svg" sodipodi:version="0.32" version="1.0" width="48" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">- <metadata>- <rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">- <cc:Work rdf:about="">- <dc:title>Lapo Calamandrei</dc:title>- <dc:description></dc:description>- <dc:subject>- <rdf:Bag>- <rdf:li>horizontally</rdf:li>- <rdf:li>mirror</rdf:li>- <rdf:li>flip</rdf:li>- <rdf:li>arrows</rdf:li>- </rdf:Bag>- </dc:subject>- <dc:publisher>- <cc:Agent rdf:about="http://www.openclipart.org/">- <dc:title>Open Clip Art Library, Source: GNOME Icon Theme, Source: GNOME Icon Theme, Source: GNOME Icon Theme, Source: GNOME Icon Theme</dc:title>- </cc:Agent>- </dc:publisher>- <dc:creator>- <cc:Agent>- <dc:title>Lapo Calamandrei</dc:title>- </cc:Agent>- </dc:creator>- <dc:rights>- <cc:Agent>- <dc:title>Lapo Calamandrei</dc:title>- </cc:Agent>- </dc:rights>- <dc:date>2006-10-02</dc:date>- <dc:format>image/svg+xml</dc:format>- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>- <cc:license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/"/>- <dc:language>en</dc:language>- </cc:Work>- </rdf:RDF>- </metadata>- <defs id="defs4">- <linearGradient id="linearGradient6918">- <stop id="stop6920" offset="0" style="stop-color:#fcaf3e;stop-opacity:1"/>- <stop id="stop6922" offset="1" style="stop-color:#ffffff;stop-opacity:1;"/>- </linearGradient>- <radialGradient cx="12.15625" cy="16.96875" fx="12.15625" fy="16.96875" gradientTransform="matrix(1,0,0,0.537849,0,7.842131)" gradientUnits="userSpaceOnUse" id="radialGradient3359" inkscape:collect="always" r="7.84375" xlink:href="#linearGradient3209"/>- <linearGradient id="linearGradient3263" inkscape:collect="always">- <stop id="stop3265" offset="0" style="stop-color:white;stop-opacity:1;"/>- <stop id="stop3267" offset="1" style="stop-color:white;stop-opacity:0;"/>- </linearGradient>- <linearGradient id="linearGradient3209" inkscape:collect="always">- <stop id="stop3211" offset="0" style="stop-color:black;stop-opacity:1;"/>- <stop id="stop3213" offset="1" style="stop-color:black;stop-opacity:0;"/>- </linearGradient>- <linearGradient gradientTransform="matrix(0,1,-1,0,44.01386,-2.96967)" gradientUnits="userSpaceOnUse" id="linearGradient3854" inkscape:collect="always" x1="20.875" x2="52.219353" xlink:href="#linearGradient3263" y1="24.5625" y2="13.597429"/>- <linearGradient gradientUnits="userSpaceOnUse" id="linearGradient6924" inkscape:collect="always" x1="13.875" x2="13.875" xlink:href="#linearGradient6918" y1="44.381733" y2="-28.978821"/>- </defs>- <sodipodi:namedview bordercolor="#afafaf" borderlayer="true" borderopacity="1" gridempspacing="2" gridspacingx="0.5px" gridspacingy="0.5px" height="48px" id="base" inkscape:current-layer="layer1" inkscape:cx="38.391353" inkscape:cy="25.931582" inkscape:document-units="px" inkscape:grid-points="true" inkscape:guide-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:showpageshadow="false" inkscape:window-height="847" inkscape:window-width="872" inkscape:window-x="55" inkscape:window-y="24" inkscape:zoom="1" pagecolor="#ffffff" showborder="false" showgrid="false" showguides="true" width="48px"/>- <g id="layer1" inkscape:groupmode="layer" inkscape:label="Livello 1" style="display:inline">- <path d="M 20 16.96875 A 7.84375 4.21875 0 1 1 4.3125,16.96875 A 7.84375 4.21875 0 1 1 20 16.96875 z" id="path3323" inkscape:export-filename="/home/lapo/Desktop/rotate.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" sodipodi:cx="12.15625" sodipodi:cy="16.96875" sodipodi:rx="7.84375" sodipodi:ry="4.21875" sodipodi:type="arc" style="opacity:0.15;color:#000000;fill:url(#radialGradient3359);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.4;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" transform="matrix(2.8047804,0,0,2.133333,-10.095615,2.8)"/>- <path d="M 29.34375,9.03125 C 28.83595,9.1090983 28.462869,9.5488006 28.46875,10.0625 L 28.46875,16.5 L 18.53125,16.5 L 18.53125,10.125 C 18.523927,9.7217437 18.282212,9.3597578 17.912551,9.1984511 C 17.54289,9.0371444 17.11312,9.1061188 16.8125,9.375 L 2.8125,22.28125 C 2.6060825,22.476094 2.4890941,22.747398 2.4890941,23.03125 C 2.4890941,23.315102 2.6060825,23.586406 2.8125,23.78125 L 16.8125,36.75 C 17.11312,37.018881 17.54289,37.087856 17.912551,36.926549 C 18.282212,36.765242 18.523927,36.403256 18.53125,36 L 18.53125,29.5625 L 28.46875,29.5625 L 28.46875,35.9375 C 28.476073,36.340756 28.717788,36.702742 29.087449,36.864049 C 29.45711,37.025356 29.88688,36.956381 30.1875,36.6875 L 44.1875,23.78125 C 44.393917,23.586406 44.510906,23.315102 44.510906,23.03125 C 44.510906,22.747398 44.393917,22.476094 44.1875,22.28125 L 30.1875,9.3125 C 29.963199,9.0960678 29.65305,8.9926846 29.34375,9.03125 z " id="path5945" inkscape:original="M 29.5 10.0625 L 29.5 16.53125 C 29.494978 17.081441 29.050191 17.526228 28.5 17.53125 L 18.5 17.53125 C 17.949809 17.526228 17.505022 17.081441 17.5 16.53125 L 17.5 10.125 L 3.5 23.03125 L 17.5 36 L 17.5 29.53125 C 17.505022 28.981059 17.949809 28.536272 18.5 28.53125 L 28.5 28.53125 C 29.050191 28.536272 29.494978 28.981059 29.5 29.53125 L 29.5 35.9375 L 43.5 23.03125 L 29.5 10.0625 z " inkscape:radius="1.03125" sodipodi:type="inkscape:offset" style="color:#000000;fill:url(#linearGradient6924);fill-opacity:1.0;fill-rule:nonzero;stroke:#ce5c00;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:1.4;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"/>- <path d="M 29.5,10.03125 L 29.5,17.53125 L 17.5,17.53125 L 17.5,10.125 L 3.46875,23.0625 L 17.5,36.03125 L 17.5,28.53125 L 29.5,28.53125 L 29.5,35.9375 L 43.53125,23 L 29.5,10.03125 z " id="path3392" sodipodi:nodetypes="ccccccccccc" style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3854);stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:1.4;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"/>- </g>-</svg>diff --git a/wger/core/static/js/wger-core.js b/wger/core/static/js/wger-core.jsindex 02b52e0c2..3cfa8103b 100644--- a/wger/core/static/js/wger-core.js+++ b/wger/core/static/js/wger-core.js@@ -596,14 +596,6 @@ function init_edit_set() {}-function toggle_weight_log_table() {- $(".weight-chart-table-toggle").click(function (e) {- e.preventDefault();- var target = $(this).data('toggleTarget');- $('#' + target).toggle({effect: 'blind', duration: 600});- });-}-/*** Helper function to load the target of a link into the main-content DIV (thediff --git a/wger/core/templates/tags/render_weight_log.html b/wger/core/templates/tags/render_weight_log.htmlindex bc80e95ec..f9f2a440d 100644--- a/wger/core/templates/tags/render_weight_log.html+++ b/wger/core/templates/tags/render_weight_log.html@@ -1,19 +1,8 @@{% load i18n staticfiles wger_extras %}<div id="svg-{{div_uuid}}" style="text-align:center;"></div>-<div class="weight-chart-table-toggle" data-toggle-target="table-{{div_uuid}}">-<p>- <a href="#">- <img src="{% static 'images/icons/toggle.svg' %}"- width="16"- height="16"- alt="{% trans 'Toggle data table' %}">- {% trans "Toggle data table" %}</a>-</p>-</div>-<div style="overflow-x: auto;" class="weight-chart-table">-<table class="noborder" style="border: 0 none; width: 7em; display:none;" id="table-{{div_uuid}}">+<table class="noborder" style="border: 0 none; width: 7em;"><tr>{% for date, entry_list in log.items %}<td style="padding: 0em; border-top-width: 0px; vertical-align: top;">diff --git a/wger/exercises/templates/exercise/view.html b/wger/exercises/templates/exercise/view.htmlindex 7be5009bb..1142b4a44 100644--- a/wger/exercises/templates/exercise/view.html+++ b/wger/exercises/templates/exercise/view.html@@ -45,7 +45,6 @@<script src="{% static 'bower_components/metrics-graphics/dist/metricsgraphics.min.js' %}"></script><script>$(document).ready(function() {- toggle_weight_log_table();draw_weight_log_chart({{json|safe}}, "{{svg_uuid}}", "{{reps}}");});</script>diff --git a/wger/manager/templates/workout/log.html b/wger/manager/templates/workout/log.htmlindex 611437f83..c1b416055 100644--- a/wger/manager/templates/workout/log.html+++ b/wger/manager/templates/workout/log.html@@ -36,11 +36,6 @@<link rel="stylesheet" type="text/css" href="{% static 'bower_components/metrics-graphics/dist/metricsgraphics.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'css/metricsgraphics-custom.css' %}"><script src="{% static 'bower_components/metrics-graphics/dist/metricsgraphics.min.js' %}"></script>-<script>-$(document).ready(function() {- toggle_weight_log_table();-});-</script>{% endblock %}@@ -59,15 +54,9 @@ $(document).ready(function() {{% if is_owner %}<p>- <a href="{% url 'manager:day:log' day.obj.id %}"- title="{% trans 'Add weight log to this day' %}"- {% auto_link_css flavour %}>- <img src="{% static 'images/icons/statistics.svg' %}"- width="32"- height="32"- alt="{% trans 'Add weight log to this day' %}">- {% trans 'Add weight log to this day' %}- </a>+ <a href="{% url 'manager:day:log' day.obj.id %}" class="btn btn-success btn-sm">+ {% trans 'Add weight log to this day' %}+ </a></p>{% endif %}