From 917b51725fab8adcc92a12b9ad864f22b5cdd6c2 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Sat, 21 Apr 2007 16:21:43 +0000 Subject: [PATCH] We can't remove the last email ==> do not show the button redirect.tpl | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1723 839d8a87-29fc-0310-9880-83ba4fa771e5 --- templates/emails/redirect.tpl | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/templates/emails/redirect.tpl b/templates/emails/redirect.tpl index dd57164..b3373ad 100644 --- a/templates/emails/redirect.tpl +++ b/templates/emails/redirect.tpl @@ -80,6 +80,27 @@ { showTempMessage('redirect-msg', "Tes redirections ont été mises à jour.", true); } + + function removeRedirect(link, email) + { + if (confirm("Supprimer l'adresse " + email + " ?")) { + $.get(link.href, {},function() { + $('tr[@id=line_' + email.replace('@', '_at_') + ']').remove(); + showRemove(); + }); + } + return false; + } + + function showRemove() + { + var removeLinks = $('.remove_email'); + if (removeLinks.length == 1) { + removeLinks.hide(); + } else { + removeLinks.show(); + } + } {/literal} //]]> {javascript name="jquery"} @@ -119,19 +140,22 @@ - - {icon name=cross title="retirer"} + + {icon name=cross title="Supprimer"} {/foreach} +
-  
- Ajouter une adresse email : - -    +  
+ Ajouter une adresse email : + +   
-- 2.1.4