From 47010d4cd7d280ef9be386cfa2c4d3569314ab23 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Sun, 27 Nov 2011 04:11:22 +0100 Subject: change the icons, simplify some javascript --- budget/templates/list_bills.html | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'budget/templates/list_bills.html') diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index 0cbf583..8754569 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -40,9 +40,10 @@ $('#cancel-form').click(hide_form); // ask for confirmation before removing an user - $('a.remove').each(function(){ + $('.action').each(function(){ $(this).hide(); - $(this).click(function(){ + var link = $(this).find('a'); + link.click(function(){ if ($(this).hasClass("confirm")){ return true; } @@ -54,9 +55,9 @@ // display the remove button on mouse over (and hide them per default) $('.balance tr').hover(function(){ - $(this).find('.remove').show(); + $(this).find('.action').show(); }, function(){ - $(this).find('.remove').hide(); + $(this).find('.action').hide(); }); $.datepicker.setDefaults({'dateFormat': 'yy-mm-dd'}); @@ -98,7 +99,11 @@ {% if balance[member.id] > 0 %}+{% endif %}{{ balance[member.id] }} - {% if member.activated %}{{ _("delete") }}{% else %}{{ _("reactivate") }}{% endif %} + {% if member.activated %} + {{ _("delete") }} + {% else %} + {{ _("reactivate") }} + {% endif %} {% endif %} {% endfor %} @@ -130,7 +135,7 @@ {{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each()) }} {{ _("each") }}) - + -- cgit v1.1