Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 250 | Rev 577 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
					$(this).css('cursor', 'pointer');
10
					nom = html.substr(0, posCrochetGauche);
11
					biblio = html.substr(posCrochetGauche, html.length);
12
					$(this).html(nom);
13
 
14
					imagettePlus = document.createElement('div');
15
					$(imagettePlus).addClass('imagettePlus');
16
					$(this).prepend($(imagettePlus));
17
 
18
					plus = document.createElement('span');
19
					$(plus).addClass('plus');
20
					$(plus).html(biblio);
21
					$(plus).hide();
22
 
23
					$(this).click(function() {
24
 
25
						if (!$(this).children('.plus').is(':visible')) {
26
							$(this).children('.imagettePlus').removeClass('imagettePlus').addClass('imagetteMoins');
27
							$(this).children('.plus').css('display', 'inline');
28
						} else {
29
							$(this).children('.imagetteMoins').removeClass('imagetteMoins').addClass('imagettePlus');
30
							$(this).children('.plus').css('display', 'none');
31
						}
32
 
33
					});
34
 
35
					$(this).append($(plus));
36
 
37
				}
38
			}
39
		});
40
	}
41
 
198 delphine 42
	$(document).ready(function() {
192 delphine 43
		$( "#radio" ).buttonset();
44
		$('#eflore_niveau_submit').hide();
45
		$(".zone-choix-niveau input").click(function() {
46
			$('#eflore_niveau_submit').click();
47
		});
404 gduche 48
 
49
		gestionBiblio();
192 delphine 50
	});
51
</script>
178 delphine 52
<form id="ef-form-niveau" name="ef-form-niveau" action="<?=$url_form;?>" method="get">
53
	<fieldset>
192 delphine 54
		<span id="radio" class="zone-choix-niveau">
178 delphine 55
 
56
			<span class="choix-niveau">
57
				<input id="niveau_1" name="niveau" value="1" type="radio" <?=($niveau == '1') ? 'checked="checked"': '';?> />
58
				<label for="niveau_1"><?=$i18n['niveau-1'];?></label>
59
			</span>
60
			<span class="choix-niveau">
61
				<input id="niveau_2" name="niveau" value="2" type="radio" <?=($niveau == '2') ? 'checked="checked"': '';?> />
62
				<label for="niveau_2"><?=$i18n['niveau-2'];?></label>
63
			</span>
64
			<span class="choix-niveau">
65
				<input id="niveau_3" name="niveau" value="3" type="radio" <?=($niveau == '3') ? 'checked="checked"': '';?> />
66
				<label for="niveau_3"><?=$i18n['niveau-3'];?></label>
67
			</span>
68
		</span>
69
		<span id="zone-liens-niveau">
250 delphine 70
			<?php foreach ($parametres as $nom => $valeur) : ?>
71
				<input id="eflore_niveau_<?=$nom;?>" name="<?=$nom;?>" type="hidden" value="<?=$valeur;?>" />
72
			<?php endforeach; ?>
178 delphine 73
			<input id="eflore_niveau_submit" name="submit" type="submit" value="<?=$i18n['ok'];?>" class="ok"/>
74
		</span>
75
	</fieldset>
76
</form>
77
 
78
 
79
 
80
<!-- FIN FORM_NOM -->