Make group name as link in home screen

This commit is contained in:
Benjamin Renard 2014-01-12 23:24:22 +01:00
parent 429809c7e9
commit fd335245d5

View file

@ -101,9 +101,15 @@ view_home=function() {
sum+=value;
diff='<td class="positive">+'+value.toFixed(2)+' €</td>';
}
tbody.html(tbody.html()+'<tr><td>'+g+'</td>'+diff+'</tr>');
tbody.html(tbody.html()+'<tr><td><a class="group-link">'+g+'</a></td>'+diff+'</tr>');
}
}
$('#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('<span class="negative">'+sum.toFixed(2)+' €</span>');
}