Soumis par marie le mer 16/01/2019 - 11:22
XSL Source
<xsl:value-of select="php:function('enregistrenomproduit', string(NOM), string(ADRPROD_LIBELLE_COMMUNE))" />
<div class="fiche-detail">
<style>
.fiche-detail-complete{}
.critere-fiche-complete{border:1px solid #AAA; padding:5px;}
.critere-fiche-complete-info{margin-left:25px;padding-left:5px;border-left:3px solid #AAA;}
.modalite-fiche-complete{}
.titre-critere{cursor:pointer; background-color:#AAA; color:white;}
.titre-critere.valeur-presente{cursor:pointer; background-color:#6E79C3; color:white;}
.titre-moda.valeur-presente{cursor:pointer; color:#6E79C3;}
.titre-critere:hover{color:black;}
#detail-col-droite h2{margin-top:0px;}
#bloc-notes-lei{border: 1px solid #AAA; box-shadow: 2px 2px #AAA; margin-top: 85px; height: 500px; overflow-y: scroll;}
</style>
<script>
$(document).ready(function (){
console.log('debut traitement JQUERY');

//Accordéon sur les critères/modalités pour une meilleure lisibilité
$('.critere-fiche-complete').find('.critere-fiche-complete-info').slideUp();
$('.critere-fiche-complete').find('.modalite-fiche-complete').slideUp();
$('.titre-critere').click(function(e){
$(e.currentTarget).parent().find('.critere-fiche-complete-info').slideToggle();
$(e.currentTarget).parent().find('.modalite-fiche-complete').slideToggle();
});

//Gestion du bloc-notes des cases à cocher
$('.check-box-bloc-notes').click(function(e){
console.log($(e));
value_to_copy = $(e.currentTarget).parent().attr('rel');
if($(e.currentTarget).is(':checked')){ //Si la case est cochée
value_indic = '';
if($(e.currentTarget).parent().hasClass('titre-critere') || $(e.currentTarget).parent().hasClass('titre-moda')){
value_indic += ' '+$(e.currentTarget).parent().find('b').text();
}
$('#bloc-notes-lei').append('<p rel="'+value_to_copy+'">'+value_to_copy+value_indic+'</p>');
console.log(value_to_copy);
}else{
$('#bloc-notes-lei').find('p[rel="'+value_to_copy+'"]').remove();
}
});

//Copie du contenu au clic sur bouton
$('#button-copy-to-clipboard').click(function(e){

});


});
</script>
<div class="fiche-detail">
<div class="zone-1 col-md-9">
<!-- CONTENT BLOCK -->
<div class="fiche-entete col-md-10 col-xs-12">

<!-- FICHE COMPLETE AFFICHAGE DES INFOS GENERALES -->
<div class="fiche-titre" id="infos-generales" rel="Infos générales">
<h1>Informations générales</h1>
</div>
<div class="fiche-detail-complete">
<xsl:for-each select="/LEI/Resultat/sit_fiche/child::node()">
<xsl:if test="name() != 'Criteres' and name() != 'Nomenclature'">
<xsl:variable name="NAME" select="name()"/>
<p class="titre-info" rel="{$NAME}"><input type="checkbox" class="check-box-bloc-notes"/><b>[<xsl:value-of select="name()"/>]</b> : <xsl:value-of select="current()" disable-output-escaping="yes"/></p>
</xsl:if>
</xsl:for-each>
</div>
<!-- FIN FICHE COMPLETE AFFICHAGE DES INFOS GENERALES -->


<!-- FICHE COMPLETE AFFICHAGE DES CRITERES/MODALITES -->
<div class="fiche-titre" id="criteres-modalites" rel="Critères/Modalités">
<h1>Critères/Modalités</h1>
</div>
<div class="fiche-detail-complete">
<xsl:for-each select="/LEI/Resultat/sit_fiche/Nomenclature/Criteres">
<div class="critere-fiche-complete">
<xsl:variable name="CRITNUMERO" select="CRITERE"/>
<xsl:choose>
<!-- <xsl:when test="1 != 0"> -->
<xsl:when test="/LEI/Resultat/sit_fiche/Criteres[CRITERE=$CRITNUMERO] != ''">
<p class="titre-critere valeur-presente" rel="{$CRITNUMERO}"><input type="checkbox" class="check-box-bloc-notes"/><b><xsl:value-of select="CRITERE_NOM"/> (<xsl:value-of select="CRITERE"/>)</b> (Cliquez pour développer)</p>
</xsl:when>
<xsl:otherwise>
<p class="titre-critere" rel="{$CRITNUMERO}"><input type="checkbox" class="check-box-bloc-notes"/><b><xsl:value-of select="CRITERE_NOM"/> (<xsl:value-of select="CRITERE"/>)</b> (Cliquez pour développer)</p>
</xsl:otherwise>
</xsl:choose>
<xsl:for-each select="child::node()">
<div class="critere-fiche-complete-info">
<xsl:if test="name() !='Modalites' and name()!='CRITERE' and name()!='CRITERE_NOM'">
<p><b>[<xsl:value-of select="name()"/>]</b> : <xsl:value-of select="current()" disable-output-escaping="yes"/></p>
</xsl:if>
</div>
</xsl:for-each>
<xsl:if test="count(Modalites) >0">
<div class="modalite-fiche-complete">
<p>Modalités du critère</p>
<xsl:for-each select="Modalites">
<xsl:variable name="MODANUMERO" select="MODALITE"/>
<div class="modalite-fiche-complete-info">
<xsl:choose>
<xsl:when test="/LEI/Resultat/sit_fiche/Criteres[CRITERE=$CRITNUMERO]/Modalites[MODALITE=$MODANUMERO] != ''">
<p class="titre-moda valeur-presente" rel="{$CRITNUMERO}|{$MODANUMERO}"><input type="checkbox" class="check-box-bloc-notes"/><b>[<xsl:value-of select="MODALITE_NOM"/>]</b> : <xsl:value-of select="MODALITE" disable-output-escaping="yes"/></p>
</xsl:when>
<xsl:otherwise>
<p class="titre-moda" rel="{$CRITNUMERO}|{$MODANUMERO}"><input type="checkbox" class="check-box-bloc-notes"/><b>[<xsl:value-of select="MODALITE_NOM"/>]</b> : <xsl:value-of select="MODALITE" disable-output-escaping="yes"/></p>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:for-each>
</div>
</xsl:if>
</div>
</xsl:for-each>
</div>
<!-- FIN FICHE COMPLETE AFFICHAGE DES CRITERES/MODALITES -->







</div>
</div>

<div id="detail-col-droite" class="zone-2 col-md-3">
<div id="bloc-notes-lei">
<h2>Bloc-notes</h2>
</div>
</div>
</div>
</div>
Type de XSL
Détail