From 5245a1a6c7f0175a198e67580d252ef218be405f Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Sat, 8 Oct 2011 17:13:36 +0200 Subject: [PATCH] Do not prompt the user with a 'prompt()' in javascript when deleting members. Fix #29 --- budget/static/main.css | 4 ++++ budget/templates/list_bills.html | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/budget/static/main.css b/budget/static/main.css index fc8d284c..9726e475 100644 --- a/budget/static/main.css +++ b/budget/static/main.css @@ -104,3 +104,7 @@ div.topbar ul.secondary-nav { padding-right: 75px; } margin-right: 20px; margin-top: 5px; } + +.confirm, .confirm:hover { + color: red; +} diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html index 63a89160..f37e1fe4 100644 --- a/budget/templates/list_bills.html +++ b/budget/templates/list_bills.html @@ -24,7 +24,12 @@ $('a.remove').each(function(){ $(this).hide(); $(this).click(function(){ - return confirm("are you sure?"); + if ($(this).hasClass("confirm")){ + return true; + } + $(this).html("you sure?"); + $(this).addClass("confirm"); + return false; }); });