diff --git a/src/main/resources/languages/_de.properties b/src/main/resources/languages/_de.properties index 13e25359acdf50dc407c758c31dc42aa0b5adc64..7d0760d1672822ad5b74f116bb8a39b451b61a39 100644 --- a/src/main/resources/languages/_de.properties +++ b/src/main/resources/languages/_de.properties @@ -358,10 +358,12 @@ chart.steps.third=Wende Filter an (optional) chart.quick.this.week=Diese Woche chart.quick.this.month=Diesen Monat chart.quick.this.year=Dieses Jahr +chart.quick.all=Alle chart.quick.last.week.days=Letzte 7 Tage chart.quick.last.month.days=Letzte 30 Tage chart.quick.last.year.days=Letzte 365 Tage +chart.quick.last.three.months=Letzte 3 Monate chart.script.default=/* This list will be dynamically filled with all the transactions between\n \ * the start and and date you select on the "Show Chart" page\n \ diff --git a/src/main/resources/languages/_en.properties b/src/main/resources/languages/_en.properties index cadf523fd69791386eebcfe1a8f708b519c73716..a0c4d4b05d08b2e2cfee2d807d9b955f8a0dc8aa 100644 --- a/src/main/resources/languages/_en.properties +++ b/src/main/resources/languages/_en.properties @@ -357,10 +357,12 @@ chart.steps.third=Apply filters (optional) chart.quick.this.week=This week chart.quick.this.month=This month chart.quick.this.year=This year +chart.quick.all=All chart.quick.last.week.days=Last 7 days chart.quick.last.month.days=Last 30 days chart.quick.last.year.days=Last 365 days +chart.quick.last.three.months=Last 3 months chart.script.default=/* This list will be dynamically filled with all the transactions between\n \ * the start and and date you select on the "Show Chart" page\n \ diff --git a/src/main/resources/static/js/charts.js b/src/main/resources/static/js/charts.js index c2922bf6a79d22d6fed6a029f9f2070d01d1bff1..3700b412f0cba0565e5ed1ef03fb3e9718c19f56 100644 --- a/src/main/resources/static/js/charts.js +++ b/src/main/resources/static/js/charts.js @@ -163,17 +163,25 @@ function handleQuickDate(element, pickerStartDate, pickerEndDate) endDate = moment().endOf('year'); break; case '3': + startDate = moment("2000-01-01"); + endDate = moment("2100-01-01"); + break; + case '4': startDate = moment().subtract(7, 'days'); endDate = moment(); break; - case '4': + case '5': startDate = moment().subtract(30, 'days'); endDate = moment(); break; - case '5': + case '6': startDate = moment().subtract(365, 'days'); endDate = moment(); break; + case '7': + startDate = moment().subtract(3, 'months'); + endDate = moment(); + break; } setDateRange(startDate, endDate, pickerStartDate, pickerEndDate); diff --git a/src/main/resources/templates/charts/charts.ftl b/src/main/resources/templates/charts/charts.ftl index 8ef96b8a726a7c3d2fe6b31b2bf1b9c8163952ed..a17fd595722ab416516a8d87ccfe1722c7ca0d80 100644 --- a/src/main/resources/templates/charts/charts.ftl +++ b/src/main/resources/templates/charts/charts.ftl @@ -87,11 +87,13 @@ <td class="quick-date" data-quick="0">${locale.getString("chart.quick.this.week")}</td> <td class="quick-date" data-quick="1">${locale.getString("chart.quick.this.month")}</td> <td class="quick-date" data-quick="2">${locale.getString("chart.quick.this.year")}</td> + <td class="quick-date" data-quick="3">${locale.getString("chart.quick.all")}</td> </tr> <tr> - <td class="quick-date" data-quick="3">${locale.getString("chart.quick.last.week.days")}</td> - <td class="quick-date" data-quick="4">${locale.getString("chart.quick.last.month.days")}</td> - <td class="quick-date" data-quick="5">${locale.getString("chart.quick.last.year.days")}</td> + <td class="quick-date" data-quick="4">${locale.getString("chart.quick.last.week.days")}</td> + <td class="quick-date" data-quick="5">${locale.getString("chart.quick.last.month.days")}</td> + <td class="quick-date" data-quick="6">${locale.getString("chart.quick.last.year.days")}</td> + <td class="quick-date" data-quick="7">${locale.getString("chart.quick.last.three.months")}</td> </tr> </table> </div>