Initialisation du menu sans utiliser l'index 0

This commit is contained in:
Michael RICOIS 2009-11-04 14:43:35 +00:00
parent f51989fd87
commit 8844c6149c

View File

@ -49,23 +49,27 @@ if ($page=='identite' || $page=='etablissements' || $page=='liens' || $page=='ev
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
<?php
$firephp->log($page, 'page');
?>
$(document).ready(function(){ $(document).ready(function(){
<?php if($page=='recherche' || $page=='international_recherche'){?> <?php if($page=='recherche' || $page=='international_recherche'){?>
$('#Menu').accordion('activate', 0) $('#Menu').accordion();
<?php }elseif($page=='identite' || $page=='etablissements' || $page=='liens' || $page=='evenements'){ ?> <?php }elseif($page=='identite' || $page=='etablissements' || $page=='liens' || $page=='evenements'){ ?>
$('#Menu').accordion('activate', 1) $('#Menu').accordion('activate', 1);
<?php }elseif($page=='dirigeants'){ ?> <?php }elseif($page=='dirigeants'){ ?>
$('#Menu').accordion('activate', 2) $('#Menu').accordion('activate', 2);
<?php }elseif($page=='synthese' || $page=='rsynthese' || $page=='bilans' || $page=='ratios' || $page=='liasse' || $page=='bourse'){ ?> <?php }elseif($page=='synthese' || $page=='rsynthese' || $page=='bilans' || $page=='ratios' || $page=='liasse' || $page=='bourse'){ ?>
$('#Menu').accordion('activate', 3) $('#Menu').accordion('activate', 3);
<?php }elseif($page=='annonces' || $page=='infosreg' || $page=='competences' || $page=='conventions' || $page=='marques'){ ?> <?php }elseif($page=='annonces' || $page=='infosreg' || $page=='competences' || $page=='conventions' || $page=='marques'){ ?>
$('#Menu').accordion('activate', 4) $('#Menu').accordion('activate', 4);
<?php }elseif($page=='indiscore' || $page=='scorecsf' || $page=='enquetec'){ ?> <?php }elseif($page=='indiscore' || $page=='scorecsf' || $page=='enquetec'){ ?>
$('#Menu').accordion('activate', 5) $('#Menu').accordion('activate', 5);
<?php }elseif($page=='kbis' || $page=='greffes'){ ?> <?php }elseif($page=='kbis' || $page=='greffes'){ ?>
$('#Menu').accordion('activate', 6) $('#Menu').accordion('activate', 6);
<?php }elseif($page=='moncompte' || $page=='surveillance' || $page=='administration' || $page=='stats' || $page=='survliste'){ ?> <?php }elseif($page=='moncompte' || $page=='surveillance' || $page=='administration' || $page=='stats' || $page=='survliste'){ ?>
$('#Menu').accordion('activate', 7) $('#Menu').accordion('activate', 7);
<?php }?> <?php }?>
}); });
</script> </script>