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>'); 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) { $('#view-home #mybalances a.group-link').each(function(idx, a) {
g=$(e.target).data('uuid'); a=$(a);
if (jQuery.type(groups[g])!='undefined') { a.parents('tr').bind('click',{'group': a.data('uuid')}, function(e) {
view_group(groups[g]); 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.home_grp_cat_btn').each(function(idx,a) {
$(a).bind('click',on_home_grp_cat_btn_click); $(a).bind('click',on_home_grp_cat_btn_click);