Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 591 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 591 Rev 1389
1
<!-- DEBUT FORM_NIVEAU -->
1
<!-- DEBUT FORM_NIVEAU -->
2
<script type="text/javascript">
2
<script type="text/javascript">
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
					
-
 
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
							}
-
 
33
						}
-
 
34
						
-
 
35
					});
-
 
36
						
-
 
37
					$(this).append($(plus));
-
 
38
					
-
 
39
				}
-
 
40
			}
-
 
41
		});
-
 
42
	}
-
 
43
 
-
 
44
	$(document).ready(function() {
3
	$(document).ready(function() {
45
		$( "#radio" ).buttonset();
4
		$( "#radio" ).buttonset();
46
		$('#eflore_niveau_submit').hide();
5
		$('#eflore_niveau_submit').hide();
47
		$(".zone-choix-niveau input").click(function() {
6
		$(".zone-choix-niveau input").click(function() {
48
			$('#eflore_niveau_submit').click();
7
			$('#eflore_niveau_submit').click();
49
		});
8
		});
50
		
-
 
51
		gestionBiblio();
-
 
52
	});
9
	});
53
</script>
10
</script>
54
 
11
 
55
<div class="choixNiveau">
12
<div class="choixNiveau">
56
		<span class="choix-niveau">
13
		<span class="choix-niveau">
57
				<a href="<?=$parametres['url']?>&niveau=1" class="niveau1<?=$parametres['niveau'] == 1? ' actif' : ''?>">Débutant</a>
14
				<a href="<?=$parametres['url']?>&niveau=1" class="niveau1<?=$parametres['niveau'] == 1? ' actif' : ''?>">Débutant</a>
58
			</span>
15
			</span>
59
			<span class="choix-niveau">
16
			<span class="choix-niveau">
60
				<a href="<?=$parametres['url']?>&niveau=2" class="niveau2<?=$parametres['niveau'] == 2? ' actif' : ''?>">Intermédiaire</a>
17
				<a href="<?=$parametres['url']?>&niveau=2" class="niveau2<?=$parametres['niveau'] == 2? ' actif' : ''?>">Intermédiaire</a>
61
			</span>
18
			</span>
62
			<span class="choix-niveau">
19
			<span class="choix-niveau">
63
				<a href="<?=$parametres['url']?>&niveau=3" class="niveau3<?=$parametres['niveau'] == 3? ' actif' : ''?>">Expert</a>
20
				<a href="<?=$parametres['url']?>&niveau=3" class="niveau3<?=$parametres['niveau'] == 3? ' actif' : ''?>">Expert</a>
64
			</span>
21
			</span>
65
</div>
22
</div>
66
 
23
 
67
 
24
 
68
 
25
 
69
<!-- FIN FORM_NOM -->
26
<!-- FIN FORM_NOM -->