From fd335245d5fdc49c2070a7515e6e8db46c71fe72 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Sun, 12 Jan 2014 23:24:22 +0100 Subject: [PATCH] Make group name as link in home screen --- inc/myco.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/myco.js b/inc/myco.js index 1fb2527..46600cf 100644 --- a/inc/myco.js +++ b/inc/myco.js @@ -101,9 +101,15 @@ view_home=function() { sum+=value; diff='+'+value.toFixed(2)+' €'; } - tbody.html(tbody.html()+''+g+''+diff+''); + tbody.html(tbody.html()+''+g+''+diff+''); } } + $('#view-home #mybalances a.group-link').bind('click',function(e) { + g=$(e.target).html(); + if (jQuery.type(groups[g])!='undefined') { + view_group(groups[g]); + } + }); if (sum<0) { $('#view-home #mybalances #total-value').html(''+sum.toFixed(2)+' €'); }