Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 1301 | 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) {
                                        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(e) {
                                                // test pour ne réagir que sur le clic sur le + ou -
                                                // TODO: fusionner ce bout de code en doublon avec synthese.js
                                                if($(e.target).hasClass("imagettePlus") || $(e.target).hasClass("imagetteMoins")) {
                                                        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>

<div class="choixNiveau">
                <span class="choix-niveau">
                                <a href="<?=$parametres['url']?>&niveau=1" class="niveau1<?=$parametres['niveau'] == 1? ' actif' : ''?>">Débutant</a>
                        </span>
                        <span class="choix-niveau">
                                <a href="<?=$parametres['url']?>&niveau=2" class="niveau2<?=$parametres['niveau'] == 2? ' actif' : ''?>">Intermédiaire</a>
                        </span>
                        <span class="choix-niveau">
                                <a href="<?=$parametres['url']?>&niveau=3" class="niveau3<?=$parametres['niveau'] == 3? ' actif' : ''?>">Expert</a>
                        </span>
</div>



<!-- FIN FORM_NOM -->