Improve home interface

This commit is contained in:
Benjamin Renard 2017-09-18 00:23:51 +02:00
parent 72816f51fa
commit ef438a382e

View file

@ -115,11 +115,15 @@ view_home=function() {
}
tbody.html(tbody.html()+'<tr><td><a class="group-link" data-uuid="'+g+'">'+balances[g].name+'</a></td>'+diff+'</tr>');
}
$('#view-home #mybalances a.group-link').bind('click',function(e) {
g=$(e.target).data('uuid');
if (jQuery.type(groups[g])!='undefined') {
view_group(groups[g]);
}
$('#view-home #mybalances a.group-link').each(function(idx, a) {
a=$(a);
a.parents('tr').bind('click',{'group': a.data('uuid')}, function(e) {
g=e.data.group;
if (jQuery.type(groups[g])!='undefined') {
view_group(groups[g]);
}
});
a.parents('tr').css('cursor','pointer');
});
$('a.home_grp_cat_btn').each(function(idx,a) {
$(a).bind('click',on_home_grp_cat_btn_click);