projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'profile_edit'
[platal.git]
/
templates
/
profile
/
deco.tpl
diff --git
a/templates/profile/deco.tpl
b/templates/profile/deco.tpl
index
935ce49
..
b4eb62b
100644
(file)
--- a/
templates/profile/deco.tpl
+++ b/
templates/profile/deco.tpl
@@
-60,16
+60,27
@@
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;
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)
{
$("#medal_" + id).remove();
}
function remove(id)
{
$("#medal_" + id).remove();
+ update();
}
{/literal}
}
{/literal}
@@
-84,7
+95,7
@@
function remove(id)
{/foreach}
{/if}{/foreach}
{/foreach}
{/foreach}
{/if}{/foreach}
{/foreach}
-</script>
+
//]]>
</script>
<table class="bicol">
<tr>
<table class="bicol">
<tr>