1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="/">
<script type="text/javascript">
<![CDATA[
// ==========================
// Script réalisé par Eric Marcus - Aout 2006
// ==========================
// conteneur = id du bloc (<div>, <p> ...) contenant les checkbox
// a_faire = '0' pour tout décocher
// a_faire = '1' pour tout cocher
// a_faire = '2' pour inverser la sélection
function GereChkbox(conteneur, a_faire) {
var blnEtat=null;
var Chckbox = document.getElementById(conteneur).firstChild;
while (Chckbox!=null) {
if (Chckbox.nodeName=="INPUT")
if (Chckbox.getAttribute("type")=="checkbox") {
blnEtat = (a_faire=='0') ? false : (a_faire=='1') ? true : (document.getElementById(Chckbox.getAttribute("id")).checked) ? false : true;
document.getElementById(Chckbox.getAttribute("id")).checked=blnEtat;
}
Chckbox = Chckbox.nextSibling;
}
}
]]>
</script> <page>
<section kindof="interlinear" titre="interlinear text">
<h2><a name="hautdepage"><center>Selectionner un fichier : </center></a></h2>
<form method="POST" action="bbbEd268.xq">
<xsl:apply-templates/>
<input type="button" value="Tout cocher" onClick="GereChkbox('div_chck','1');"/>
<input type="button" value="Tout décocher" onClick="GereChkbox('div_chck','0');"/>
<br/>
<input type="button" value="Selectionner un nouveau corpus" onclick="history.go(-1)"/>
<br/>
</form>
</section>
</page>
</xsl:template>
<xsl:template match="doc">
<xsl:variable name="url" select="url"/>
<h5><input type="checkbox" name='url' value='{$url}' onclick="action(bbbEd268.xq)"/> <xsl:value-of select="file"/></h5>
</xsl:template>
<xsl:template match="search">
<h4><xsl:value-of select="."/><input value="*" size="8" name="term1" type="text" /><input type="submit" value="send"/><xsl:text> </xsl:text><input type="reset" value="Reset"/></h4>
</xsl:template>
</xsl:stylesheet> |
Partager