Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

<!-- DEBUT FORM_NIVEAU -->
<script type="text/javascript">
        function gestionBiblio() {
                $('.nom').each(function () {
                        if ($(this).children('.plus').length == 0) {
                                html = $(this).html();
                                posCrochetGauche = html.indexOf('[');
                                if (posCrochetGauche > 0) {
                                        $(this).css('cursor', 'pointer');
                                        nom = html.substr(0, posCrochetGauche);
                                        biblio = html.substr(posCrochetGauche, html.length);
                                        $(this).html(nom);
                                        
                                        imagettePlus = document.createElement('div');
                                        $(imagettePlus).addClass('imagettePlus');
                                        $(this).prepend($(imagettePlus));
                                        
                                        plus = document.createElement('span');
                                        $(plus).addClass('plus');
                                        $(plus).html(biblio);
                                        $(plus).hide();
                                        
                                        $(this).click(function() {
                                                
                                                if (!$(this).children('.plus').is(':visible')) {
                                                        $(this).children('.imagettePlus').removeClass('imagettePlus').addClass('imagetteMoins');
                                                        $(this).children('.plus').css('display', 'inline');
                                                } else {
                                                        $(this).children('.imagetteMoins').removeClass('imagetteMoins').addClass('imagettePlus');
                                                        $(this).children('.plus').css('display', 'none');
                                                }
                                                
                                        });
                                                
                                        $(this).append($(plus));
                                        
                                }
                        }
                });
        }

        $(document).ready(function() {
                $( "#radio" ).buttonset();
                $('#eflore_niveau_submit').hide();
                $(".zone-choix-niveau input").click(function() {
                        $('#eflore_niveau_submit').click();
                });
                
                gestionBiblio();
        });
</script>
<form id="ef-form-niveau" name="ef-form-niveau" action="<?=$url_form;?>" method="get">
        <fieldset>
                <span id="radio" class="zone-choix-niveau">
                        
                        <span class="choix-niveau">
                                <input id="niveau_1" name="niveau" value="1" type="radio" <?=($niveau == '1') ? 'checked="checked"': '';?> />
                                <label for="niveau_1"><?=$i18n['niveau-1'];?></label>
                        </span>
                        <span class="choix-niveau">
                                <input id="niveau_2" name="niveau" value="2" type="radio" <?=($niveau == '2') ? 'checked="checked"': '';?> />
                                <label for="niveau_2"><?=$i18n['niveau-2'];?></label>
                        </span>
                        <span class="choix-niveau">
                                <input id="niveau_3" name="niveau" value="3" type="radio" <?=($niveau == '3') ? 'checked="checked"': '';?> />
                                <label for="niveau_3"><?=$i18n['niveau-3'];?></label>
                        </span>
                </span>
                <span id="zone-liens-niveau">
                        <?php foreach ($parametres as $nom => $valeur) : ?>
                                <input id="eflore_niveau_<?=$nom;?>" name="<?=$nom;?>" type="hidden" value="<?=$valeur;?>" />
                        <?php endforeach; ?>
                        <input id="eflore_niveau_submit" name="submit" type="submit" value="<?=$i18n['ok'];?>" class="ok"/>
                </span>
        </fieldset>
</form>



<!-- FIN FORM_NOM -->