| 178 |
delphine |
1 |
<!-- DEBUT FORM_NIVEAU -->
|
| 192 |
delphine |
2 |
<script type="text/javascript">
|
| 404 |
gduche |
3 |
function gestionBiblio() {
|
|
|
4 |
$('.nom').each(function () {
|
|
|
5 |
if ($(this).children('.plus').length == 0) {
|
|
|
6 |
html = $(this).html();
|
|
|
7 |
posCrochetGauche = html.indexOf('[');
|
|
|
8 |
if (posCrochetGauche > 0) {
|
|
|
9 |
nom = html.substr(0, posCrochetGauche);
|
|
|
10 |
biblio = html.substr(posCrochetGauche, html.length);
|
|
|
11 |
$(this).html(nom);
|
|
|
12 |
|
|
|
13 |
imagettePlus = document.createElement('div');
|
|
|
14 |
$(imagettePlus).addClass('imagettePlus');
|
|
|
15 |
$(this).prepend($(imagettePlus));
|
|
|
16 |
|
|
|
17 |
plus = document.createElement('span');
|
|
|
18 |
$(plus).addClass('plus');
|
|
|
19 |
$(plus).html(biblio);
|
|
|
20 |
$(plus).hide();
|
|
|
21 |
|
| 577 |
aurelien |
22 |
$(this).click(function(e) {
|
|
|
23 |
// test pour ne réagir que sur le clic sur le + ou -
|
|
|
24 |
// TODO: fusionner ce bout de code en doublon avec synthese.js
|
|
|
25 |
if($(e.target).hasClass("imagettePlus") || $(e.target).hasClass("imagetteMoins")) {
|
|
|
26 |
if (!$(this).children('.plus').is(':visible')) {
|
|
|
27 |
$(this).children('.imagettePlus').removeClass('imagettePlus').addClass('imagetteMoins');
|
|
|
28 |
$(this).children('.plus').css('display', 'inline');
|
|
|
29 |
} else {
|
|
|
30 |
$(this).children('.imagetteMoins').removeClass('imagetteMoins').addClass('imagettePlus');
|
|
|
31 |
$(this).children('.plus').css('display', 'none');
|
|
|
32 |
}
|
| 404 |
gduche |
33 |
}
|
|
|
34 |
|
|
|
35 |
});
|
|
|
36 |
|
|
|
37 |
$(this).append($(plus));
|
|
|
38 |
|
|
|
39 |
}
|
|
|
40 |
}
|
|
|
41 |
});
|
|
|
42 |
}
|
|
|
43 |
|
| 198 |
delphine |
44 |
$(document).ready(function() {
|
| 192 |
delphine |
45 |
$( "#radio" ).buttonset();
|
|
|
46 |
$('#eflore_niveau_submit').hide();
|
|
|
47 |
$(".zone-choix-niveau input").click(function() {
|
|
|
48 |
$('#eflore_niveau_submit').click();
|
|
|
49 |
});
|
| 404 |
gduche |
50 |
|
|
|
51 |
gestionBiblio();
|
| 192 |
delphine |
52 |
});
|
|
|
53 |
</script>
|
| 591 |
gduche |
54 |
|
|
|
55 |
<div class="choixNiveau">
|
|
|
56 |
<span class="choix-niveau">
|
|
|
57 |
<a href="<?=$parametres['url']?>&niveau=1" class="niveau1<?=$parametres['niveau'] == 1? ' actif' : ''?>">Débutant</a>
|
| 178 |
delphine |
58 |
</span>
|
|
|
59 |
<span class="choix-niveau">
|
| 591 |
gduche |
60 |
<a href="<?=$parametres['url']?>&niveau=2" class="niveau2<?=$parametres['niveau'] == 2? ' actif' : ''?>">Intermédiaire</a>
|
| 178 |
delphine |
61 |
</span>
|
|
|
62 |
<span class="choix-niveau">
|
| 591 |
gduche |
63 |
<a href="<?=$parametres['url']?>&niveau=3" class="niveau3<?=$parametres['niveau'] == 3? ' actif' : ''?>">Expert</a>
|
| 178 |
delphine |
64 |
</span>
|
| 591 |
gduche |
65 |
</div>
|
| 178 |
delphine |
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
<!-- FIN FORM_NOM -->
|