From 72ef6f78d9dfb8275a2ec2463752627f7ab6bc20 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 22 Nov 2011 09:23:48 +0000 Subject: [PATCH] Correction javascript sur les emails --- .../views/default/scripts/dashboard/client.phtml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/application/views/default/scripts/dashboard/client.phtml b/application/views/default/scripts/dashboard/client.phtml index 6f77f78ff..788dd4da1 100644 --- a/application/views/default/scripts/dashboard/client.phtml +++ b/application/views/default/scripts/dashboard/client.phtml @@ -115,7 +115,7 @@ $(document).ready(function(){ var concat = ''; var liste = txt.split(';'); for (item in liste){ - concat = concat+liste[item]+' Supp
'; + concat = concat+liste[item]+' [Suppression]
'; } $('input[name=filtres_ip]').val(txt); $('#listeip').html(concat); @@ -130,16 +130,18 @@ $(document).ready(function(){ return false; }); - $('.deleteIP').on('click', function(e){ + $('body').delegate('.deleteIP', 'click', function(e){ e.preventDefault(); var select = $(this).attr('id'); var txt = ''; var concat = ''; - var liste = $('input[name=filtres_ip]').val().split(';'); + var strListe = $('input[name=filtres_ip]').val(); + strListe = strListe.substring(0, strListe.length-1); + var liste = strListe.split(';'); for (item in liste){ if (liste[item]!=select){ (txt.length>0) ? txt = txt+';'+liste[item] : txt = liste[item]; - concat = concat+liste[item]+' Supp
'; + concat = concat+liste[item]+' [Suppression]
'; } } $('input[name=filtres_ip]').val(txt);