From 2dbf8f0db3ccd0edb8f6bcd25c84023b76e99f99 Mon Sep 17 00:00:00 2001 From: Svn-Sp Date: Wed, 19 Aug 2020 18:23:58 +0200 Subject: [PATCH 1/5] Feature: Bmi on graph at weight overview Issue(#462) --- wger/weight/static/js/weight.js | 34 +++++++++++++++++++++++++++++ wger/weight/templates/overview.html | 4 +++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/wger/weight/static/js/weight.js b/wger/weight/static/js/weight.js index 742024d8a..1fbe75446 100644 --- a/wger/weight/static/js/weight.js +++ b/wger/weight/static/js/weight.js @@ -78,6 +78,40 @@ $(document).ready(function () { chartParams.data = data; MG.data_graphic(chartParams); } + }); + //show bmi lines + $(document.querySelector("#enable_bmi")).click(function(){ + var height = document.querySelector("#height").value / 100; + //kg = bmi * cm² + var max = height*height * 25; + var min = height*height * 20; + var yAxisChildren = document.querySelector("#weight_diagram").querySelector("svg").querySelector(".mg-y-axis").children; + //get index of first text element + for(let i = 0; i - +
+ +
From 93d2e1e9af4d13775dc8bd79172af912677cd439 Mon Sep 17 00:00:00 2001 From: Svn-Sp Date: Wed, 19 Aug 2020 18:31:29 +0200 Subject: [PATCH 2/5] Added Name on AUTHORS.rst --- AUTHORS.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index b9a3585af..6385ad846 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -25,7 +25,7 @@ Developers * Malcolm Jones: https://github.com/DevloperMal * Boniface Mwenda: https://github.com/andela-bmwenda * Scott Peshak: https://github.com/speshak - +* Sven - https://github.com/Svn-Sp Translators ----------- From 297c898480756d2b5af55e4f6b685acc9166d17a Mon Sep 17 00:00:00 2001 From: Svn-Sp Date: Tue, 8 Sep 2020 18:31:58 +0200 Subject: [PATCH 3/5] used baselines --- wger/weight/static/js/weight.js | 41 ++++++----------------------- wger/weight/templates/overview.html | 2 +- 2 files changed, 9 insertions(+), 34 deletions(-) diff --git a/wger/weight/static/js/weight.js b/wger/weight/static/js/weight.js index 1fbe75446..d0984f230 100644 --- a/wger/weight/static/js/weight.js +++ b/wger/weight/static/js/weight.js @@ -45,12 +45,12 @@ $(document).ready(function () { right: 10, show_secondary_x_label: true, interpolate: d3.curveLinear, - xax_count: 10, target: '#weight_diagram', x_accessor: 'date', y_accessor: 'weight', + xax_count: 5, min_y_from_data: true, - colors: ['#3465a4'] + colors: ['#266dd3'] }; username = $('#current-username').data('currentUsername'); @@ -78,40 +78,15 @@ $(document).ready(function () { chartParams.data = data; MG.data_graphic(chartParams); } - }); - //show bmi lines + }); + $(document.querySelector("#enable_bmi")).click(function(){ var height = document.querySelector("#height").value / 100; //kg = bmi * cm² - var max = height*height * 25; - var min = height*height * 20; - var yAxisChildren = document.querySelector("#weight_diagram").querySelector("svg").querySelector(".mg-y-axis").children; - //get index of first text element - for(let i = 0; i

- +
From c5bdd1dae9f2e1504e85c1ce36dd6c41f7e00f03 Mon Sep 17 00:00:00 2001 From: Svn-Sp Date: Tue, 8 Sep 2020 18:40:30 +0200 Subject: [PATCH 4/5] solved merge conflict at authors.rst --- AUTHORS.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 6385ad846..234bbc14a 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -25,7 +25,10 @@ Developers * Malcolm Jones: https://github.com/DevloperMal * Boniface Mwenda: https://github.com/andela-bmwenda * Scott Peshak: https://github.com/speshak +* Musanje Louis Michael: https://github.com/louiCoder +* Kevin Antonio Rateni Iatauro: https://github.com/WalkingPizza * Sven - https://github.com/Svn-Sp + Translators ----------- From 70048396860c08a74ebe0314a5c2eb66b77c90be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2020 05:01:25 +0000 Subject: [PATCH 5/5] Update bleach requirement from ~=3.1 to ~=3.2 Updates the requirements on [bleach](https://github.com/mozilla/bleach) to permit the latest version. - [Release notes](https://github.com/mozilla/bleach/releases) - [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES) - [Commits](https://github.com/mozilla/bleach/compare/v3.1.0...v3.2.0) Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 711f7c237..31a3c128a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ # # Application -bleach~=3.1 +bleach~=3.2 django-bootstrap-breadcrumbs~=0.9 django-formtools~=2.2 django-recaptcha==2.0.6