1 | [(#SET{legendes,[(#ARRAY{0,<:tickets:cfg_lgd_autorisation_ecrire:>,1,<:tickets:cfg_lgd_autorisation_assigner:>,2,<:tickets:cfg_lgd_autorisation_modifier:>,3,<:tickets:cfg_lgd_autorisation_commenter:>})]})] |
---|
2 | #SET{prefixes,#ARRAY{0,ecrire_,1,assigner_,2,modifier_,3,commenter_}} |
---|
3 | <B_bloc_autorisation> |
---|
4 | <ul> |
---|
5 | <BOUCLE_bloc_autorisation(POUR){tableau #GET{legendes}}> |
---|
6 | #SET{prefixe, #GET{prefixes}|table_valeur{#CLE}} |
---|
7 | <li class="fieldset"> |
---|
8 | <fieldset> |
---|
9 | <h3 class="legend">#VALEUR</h3> |
---|
10 | <ul> |
---|
11 | [(#REM) <!-- Choix de la methode d'autorisation --> ] |
---|
12 | [(#SAISIE{radio, [(#GET{prefixe})]type, |
---|
13 | label=<:tickets:cfg_lbl_type_autorisation:>, |
---|
14 | explication=<:tickets:cfg_inf_type_autorisation:>, |
---|
15 | datas=#ARRAY{ |
---|
16 | webmestre,<:tickets:cfg_lbl_autorisation_webmestre:>, |
---|
17 | par_statut,<:tickets:cfg_lbl_autorisation_statuts:>, |
---|
18 | par_auteur,<:tickets:cfg_lbl_autorisation_auteurs:>}, |
---|
19 | defaut=webmestre})] |
---|
20 | </ul> |
---|
21 | [(#REM) <!-- Methode par statut d'auteurs (choix multiple) --> ] |
---|
22 | <ul id="[(#GET{prefixe})]bloc_par_statut" class="[(#GET{prefixe})]bloc"> |
---|
23 | |
---|
24 | [(#SAISIE{statuts_auteurs,[(#GET{prefixe})]statuts, |
---|
25 | label=<:tickets:cfg_lbl_statuts_auteurs:>, |
---|
26 | afficher_tous=oui, |
---|
27 | multiple=oui})] |
---|
28 | </ul> |
---|
29 | [(#REM) <!-- Methode par id d'auteurs (choix multiple) --> ] |
---|
30 | <ul id="[(#GET{prefixe})]bloc_par_auteur" class="[(#GET{prefixe})]bloc"> |
---|
31 | [(#SAISIE{auteurs,[(#GET{prefixe})]auteurs, |
---|
32 | label=<:tickets:cfg_lbl_liste_auteurs:>, |
---|
33 | multiple=oui, |
---|
34 | option_statut=oui})] |
---|
35 | </ul> |
---|
36 | </fieldset> |
---|
37 | <script type="text/javascript"> |
---|
38 | //<![CDATA[ |
---|
39 | jQuery(document).ready(function() { |
---|
40 | // on cache tous les blocs du meme prefixe |
---|
41 | jQuery(".[(#GET{prefixe})]bloc").hide(); |
---|
42 | //on recupere la valeur de celui qui est deja selectionne |
---|
43 | var checked = jQuery("input[name='[(#GET{prefixe})]type']:checked").val(); |
---|
44 | // pour l'afficher |
---|
45 | jQuery("#[(#GET{prefixe})]bloc_"+checked).show(); |
---|
46 | // si une checkbox change |
---|
47 | jQuery("input[name='[(#GET{prefixe})]type']").change(function() { |
---|
48 | var inputval = $(this).val(); |
---|
49 | // on cache tous les blocs du meme prefixe |
---|
50 | jQuery(".[(#GET{prefixe})]bloc").fadeOut('slow',function(){ |
---|
51 | // pour afficher celui qui correspond a la checkbox selectionnee |
---|
52 | jQuery("#[(#GET{prefixe})]bloc_"+inputval).fadeIn(); |
---|
53 | }); |
---|
54 | jQuery(this).blur(); |
---|
55 | }); |
---|
56 | }); |
---|
57 | //]]> |
---|
58 | </script> |
---|
59 | </li> |
---|
60 | </BOUCLE_bloc_autorisation> |
---|
61 | </ul> |
---|
62 | </B_bloc_autorisation> |
---|