summaryrefslogtreecommitdiff
path: root/static/js/kosten.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/kosten.js')
-rw-r--r--static/js/kosten.js29
1 files changed, 24 insertions, 5 deletions
diff --git a/static/js/kosten.js b/static/js/kosten.js
index 7d77878..e7170cb 100644
--- a/static/js/kosten.js
+++ b/static/js/kosten.js
@@ -97,9 +97,19 @@
});
});
out$.statJS = statJS = jq(function(){
- var month;
+ var month, constDialog;
setLang();
month = 30 * 24 * 60 * 60 * 1000;
+ constDialog = function(){
+ var df, diag_opts;
+ df = Highcharts.dateFormat;
+ diag_opts = {
+ title: df('%B %Y', this.x)
+ };
+ $.get(df('/stats/_const/%Y/%d', this.x), function(data){
+ $(data).dialog(diag_opts);
+ });
+ };
return $('.stats').each(function(){
var x$;
x$ = $(this);
@@ -112,11 +122,20 @@
},
rangeSelector: {
buttons: [],
- inputDateFormat: "%d. %b %Y",
- inputEditDateFormat: "%d.%m.%Y",
+ inputDateFormat: "%b %Y",
+ inputEditDateFormat: "%m.%Y",
inputDateParser: function(value){
value = value.split(/\./);
- return Date.UTC(value[2], value[1] - 1, value[0], 0, 0, 0, 0);
+ return Date.UTC(value[1], value[0] - 1, 1, 0, 0, 0, 0);
+ }
+ },
+ plotOptions: {
+ series: {
+ point: {
+ events: {
+ click: constDialog
+ }
+ }
}
},
xAxis: {
@@ -127,7 +146,7 @@
data: x$.data('stats')
}],
tooltip: {
- pointFormat: "<b>{point.y} €</b><br/>"
+ pointFormat: '<b>{point.y} €</b><br/>'
}
});
return x$;