aboutsummaryrefslogtreecommitdiff
path: root/budget/templates
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2011-11-27 04:11:22 +0100
committerAlexis Metaireau <alexis@notmyidea.org>2011-11-27 04:11:22 +0100
commit47010d4cd7d280ef9be386cfa2c4d3569314ab23 (patch)
tree466b1329dd26a84cbb07b7306512090116d8a41d /budget/templates
parent672f2a1ca16a7e34acf8fadbf0d7113921d2573c (diff)
downloadihatemoney-mirror-47010d4cd7d280ef9be386cfa2c4d3569314ab23.zip
ihatemoney-mirror-47010d4cd7d280ef9be386cfa2c4d3569314ab23.tar.gz
ihatemoney-mirror-47010d4cd7d280ef9be386cfa2c4d3569314ab23.tar.bz2
change the icons, simplify some javascript
Diffstat (limited to 'budget/templates')
-rw-r--r--budget/templates/list_bills.html17
1 files changed, 11 insertions, 6 deletions
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 @@
<td class="balance-value {% if balance[member.id] > 0 %}positive{% elif balance[member.id] < 0 %}negative{% endif %}">
{% if balance[member.id] > 0 %}+{% endif %}{{ balance[member.id] }}
</td>
- <td> {% if member.activated %}<a class="remove" href="{{ url_for(".remove_member", member_id=member.id) }}">{{ _("delete") }}</a>{% else %}<a href="{{ url_for(".reactivate", member_id=member.id) }}">{{ _("reactivate") }}</a>{% endif %}</td>
+ {% if member.activated %}
+ <td class="action delete"> <a href="{{ url_for(".remove_member", member_id=member.id) }}">{{ _("delete") }}</a></td>
+ {% else %}
+ <td class="action reactivate"> <a href="{{ url_for(".reactivate", member_id=member.id) }}">{{ _("reactivate") }}</a></td>
+ {% endif %}
</tr>
{% endif %}
{% endfor %}
@@ -130,7 +135,7 @@
<td>{{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each()) }} {{ _("each") }})</td>
<td class="bill-actions">
<a class="edit" href="{{ url_for(".edit_bill", bill_id=bill.id) }}" title="{{ _("edit") }}">
- <img src="{{ url_for("static", filename="pen.png") }}" />
+ <img src="{{ url_for("static", filename="edit.png") }}" />
</a>
<a class="delete" href="{{ url_for(".delete_bill", bill_id=bill.id) }}" title="{{ _("delete") }}">
<img src="{{ url_for("static", filename="delete.png") }}" />