Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Commit 88aaec9

Browse files
committed
More Bugs in Graph fixed && Monday first Day in Datepicker
1 parent 173cd7b commit 88aaec9

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
latest
2-
0.3.2
2+
0.3.3
33
0.3
44
0

php/core/templates/edit_en.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ <h3>Add task</h3>
9090
$(elements[2]).val(o.selectedDay);
9191
},
9292
{
93-
dateFormat : "yy-mm-dd"
93+
dateFormat : "yy-mm-dd",
94+
firstDay: 1
9495
},
9596
[pos.left, pos.top]
9697
);

php/core/templates/stats_en.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ <h3>Select data</h3>
101101
$(destination).val(o.selectedYear +'-'+ (m <= 9 ? '0' : '') + m + '-' + (d <= 9 ? '0' : '') + d);
102102
},
103103
{
104-
dateFormat : "yy-mm-dd"
104+
dateFormat : "yy-mm-dd",
105+
firstDay: 1
105106
},
106107
[pos.left, pos.top]
107108
);

php/load/graphs/BarDays.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,18 @@ function createGraph(combiData, plainData, singleDayData, canvas){
1313
});
1414
var catsColumn = allCategories.length === 1 ? 'name' : 'category';
1515

16+
var dayMap = {
17+
0:6,
18+
1:0,
19+
2:1,
20+
3:2,
21+
4:3,
22+
5:4,
23+
6:5,
24+
}
1625
var plotdata = {}
1726
plainData.forEach( (v) => {
18-
var day = new Date(v.begin*1000).getDay();
27+
var day = dayMap[new Date(v.begin*1000).getDay()];
1928
if( !plotdata.hasOwnProperty(v[catsColumn])){
2029
plotdata[v[catsColumn]] = []
2130
for(var d = 0; d < 7; d++){

0 commit comments

Comments
 (0)