1 | [(#REM) |
---|
2 | |
---|
3 | Parametres : |
---|
4 | - class : classe(s) css ajoutes au select |
---|
5 | - option_intro : chaine de langue de la premiere ligne vide ? (defaut:"") |
---|
6 | - cacher_option_intro : pas de premier option vide (defaut:"") |
---|
7 | |
---|
8 | Exemple d'appel : |
---|
9 | [(#SAISIE{organisations, id_parent, |
---|
10 | label=<:plugin:info_organisation:>})] |
---|
11 | ] |
---|
12 | <a href="#" id="changer_selection_organisation"><:contacts:changer:></a> |
---|
13 | <div id="selection_organisation"> |
---|
14 | <BOUCLE_organisation(ORGANISATIONS){id_organisation=#ENV{valeur,#ENV{defaut}}}{tout}> |
---|
15 | <input type="text" name="#ENV{nom}" readonly="readonly" value="#NOM" /> |
---|
16 | <input type="hidden" name="#ENV{nom}" value="#ID_ORGANISATION" />[(#REM) La vrai valeur a priorite] |
---|
17 | </BOUCLE_organisation> |
---|
18 | </div> |
---|
19 | |
---|
20 | <script type='text/javascript'> |
---|
21 | (function($){ |
---|
22 | $(document).ready(function(){ |
---|
23 | $("#changer_selection_organisation").click(function(){ |
---|
24 | $(this).animeajax(); |
---|
25 | $.get("[(#URL_PAGE{saisie_organisations})]", { |
---|
26 | id_organisation: "#ENV{valeur,#ENV{defaut}}", |
---|
27 | id_source: "#ENV{id_organisation}", |
---|
28 | ['class': "(#ENV{class})",] |
---|
29 | ['cacher_option_intro': "(#ENV{cacher_option_intro})",] |
---|
30 | ['defaut': "(#ENV{defaut})",] |
---|
31 | ['valeur': "(#ENV{valeur})",] |
---|
32 | nom: "#ENV{nom}" |
---|
33 | }, function(data) |
---|
34 | { |
---|
35 | $('#selection_organisation').html(data); |
---|
36 | $('#changer_selection_organisation').remove(); |
---|
37 | }); |
---|
38 | }); |
---|
39 | }); |
---|
40 | })(jQuery); |
---|
41 | </script> |
---|