Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 473 → Rev 474

/trunk/modules/fiche/squelettes/fiche_nomenclature.tpl.html
10,7 → 10,7
<div class="imagetteMoins"></div>Masquer la biblio
</div>
<div style="padding:5px 10px; display:none" id="plieur">
<a href="javascript:deplierTout()">Tout déplier</a> | <a href="javascript:plierTout()">Tout plier</a>
<a class="lien_tout_deplier" href="#">Tout déplier</a> | <a class="lien_tout_plier" href="#">Tout plier</a>
</div>
</div>
<div class="onglet_marge_gauche">
81,61 → 81,7
</div>
<script type="text/Javascript">
function plierTout() {
$('.nom').children('.imagetteMoins').removeClass('imagetteMoins').addClass('imagettePlus');
$('.plus').css('display', 'none');
}
function deplierTout() {
$('.nom').children('.imagettePlus').removeClass('imagettePlus').addClass('imagetteMoins');
$('.plus').css('display', 'inline');
}
$(document).ready(function () {
$('#plieur').show();
if (typeof gestionBiblio != 'function') {
gestionBiblio = function() {
$('.nom').each(function () {
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));
}
});
};
}
gestionBiblio();
});
$('#plieur').show();
gestionBiblio($('#nomenclature'));
</script>
</div>