Self hosted FLOSS fitness/workout, nutrition and weight tracker
Set the ID attribute to the circles in the chart and open the edit dialog for their corresponding weight entry
Roland Geidercd8978a862fa
diff --git a/weight/templates/weight_overview.html b/weight/templates/weight_overview.htmlindex ee3ca8ee4..190c7c978 100644--- a/weight/templates/weight_overview.html+++ b/weight/templates/weight_overview.html@@ -56,6 +56,8 @@ $(document).ready(function () {position: 'top'});++function getDate(d) {return new Date(d);}@@ -123,12 +125,17 @@ svg.selectAll(".dot").data(data.filter(function(d) { return d.y; })).enter().append("circle").attr("class", "dot")- //.attr("id", ....)+ .attr("id", function(d) { return d.id; }).attr("cx", line.x()).attr("cy", line.y()).attr("r", 3.5);+$('circle').click(function(e) {+ entry_id = $(this).attr('id').match(/\d+/);+ scatterplot_modal_dialog(entry_id);+ });+});</script>{% endblock %}