From 4402b512bb6e08b881e7e6464a57549e445df1be Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 2 Sep 2007 22:59:19 +0200 Subject: [PATCH] Oops, fix medals with Safari Signed-off-by: Florent Bruneau --- templates/profile/deco.medal.tpl | 2 ++ templates/profile/deco.tpl | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/templates/profile/deco.medal.tpl b/templates/profile/deco.medal.tpl index 20dcab6..280d256 100644 --- a/templates/profile/deco.medal.tpl +++ b/templates/profile/deco.medal.tpl @@ -33,10 +33,12 @@
{icon name="cross" title="Supprimer cette médaille"} + {if !$ajaxdeco} + {/if} {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/templates/profile/deco.tpl b/templates/profile/deco.tpl index 935ce49..87ca768 100644 --- a/templates/profile/deco.tpl +++ b/templates/profile/deco.tpl @@ -60,11 +60,21 @@ function buildGrade(id, current) } } +function makeAddProcess(id) +{ + return function(data) + { + $('#medals').after(data); + update(); + getMedalName(id); + buildGrade(id, 0); + }; +} + function add() { var id = document.forms.prof_annu['medal_sel'].value; - $.get(platal_baseurl + 'profile/ajax/medal/' + id, - function(data) { $('#medals').after(data); update(); }); + $.get(platal_baseurl + 'profile/ajax/medal/' + id, makeAddProcess(id)); } function remove(id) -- 2.1.4