Make group name as link in home screen
This commit is contained in:
parent
429809c7e9
commit
fd335245d5
1 changed files with 7 additions and 1 deletions
|
@ -101,9 +101,15 @@ view_home=function() {
|
||||||
sum+=value;
|
sum+=value;
|
||||||
diff='<td class="positive">+'+value.toFixed(2)+' €</td>';
|
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) {
|
if (sum<0) {
|
||||||
$('#view-home #mybalances #total-value').html('<span class="negative">'+sum.toFixed(2)+' €</span>');
|
$('#view-home #mybalances #total-value').html('<span class="negative">'+sum.toFixed(2)+' €</span>');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue