From ef438a382e424f72a7a98250358ff94ae2106acd Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 18 Sep 2017 00:23:51 +0200 Subject: [PATCH] Improve home interface --- inc/myco.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/inc/myco.js b/inc/myco.js index 1941f92..50063ff 100644 --- a/inc/myco.js +++ b/inc/myco.js @@ -115,11 +115,15 @@ view_home=function() { } tbody.html(tbody.html()+''+balances[g].name+''+diff+''); } - $('#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);