import org.lilie.services.eliot.scolarite.StructureEnseignement
import org.lilie.services.eliot.impression.TemplateDocument
+import org.lilie.services.eliot.impression.template.bulletin.colonne.ColonneBulletin
+import org.lilie.services.eliot.impression.template.bulletin.option.BulletinOptionsPersonnalise
/**
* Options d'affichage et d'impression du bulletin
Boolean moyenneMinMax = false
Boolean nombreNotes = true
Boolean rangs = false
-
+ Integer largeurMatiere = ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT * BulletinOptionsPersonnalise.TAILLE_PICA_MM
static constraints = {
templateDocument(nullable: false)
return jasperReport
}
+ private void modifierLargeurPiedMatiere(JRBand[] bands, ColonneBulletin allDescriptionColonne) {
+ JRBand pied = bands[1]
+ JRElement moyenne = impressionTemplateOutilsService.getElementByKey(pied, "moyenneGenerale")
+ if (moyenne) {
+ moyenne.width = allDescriptionColonne.largeurColonneMatiere
+ }
+ }
+
/**
* Modification du modele de tableau de bulletin de notes
* @param jrSection : section du modèle jasper (contenant les bandes du corps de modèle)
case TABLEAU_BULLETIN:
- if (log.debugEnabled) {log.debug "Modification tableau bulletin"}
+ if (log.debugEnabled) {
+ log.debug "Modification tableau bulletin"
+ }
jrSection.bands.each {
JRBand jrBand ->
)
}
+ modifierLargeurPiedMatiere(
+ jrSection.bands,
+ allDescriptionColonne
+ )
+
modifierLigneTitre(
enteteColonneJasper,
allDescriptionColonne
case LIGNE_MATIERE:
- if (log.debugEnabled) {log.debug "Modification ligne matière bulletin"}
+ if (log.debugEnabled) {
+ log.debug "Modification ligne matière bulletin"
+ }
jrSection.bands.each {
JRBand jrBand ->
if (comp instanceof StandardTable) {
baseComponentElement.x =
- ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT - ColonneBulletin.LARGEUR_PREMIERE_COLONNE_SOUS_MATIERE_PT
+ allDescriptionColonne.largeurColonneMatiere - ColonneBulletin.LARGEUR_PREMIERE_COLONNE_SOUS_MATIERE_PT
modifierTableauJasper(
comp,
JRBaseRectangle rectangle = (JRBaseRectangle) jrBaseElement
if (rectangle.key == KEY_CADRE_MATIERE) {
- rectangle.width = ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT
+ rectangle.width = allDescriptionColonne.largeurColonneMatiere
}
break
List<JRElement> aSupprimer = []
- traiteLibelleMatiereEnseignant(jrBand)
+ traiteLibelleMatiereEnseignant(jrBand, allDescriptionColonne)
modifierAppreciation(
jrBand,
/**
* Change lar largeur des libellés Matières/Enseignants
*/
- private void traiteLibelleMatiereEnseignant(JRBand jrBand) {
+ private void traiteLibelleMatiereEnseignant(JRBand jrBand, ColonneBulletin allDescriptionColonne) {
JRElement elementMatiere = jrBand.getElementByKey(KEY_TITRE_MATIERE)
- elementMatiere.width = ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT
+ elementMatiere.width = allDescriptionColonne.largeurColonneMatiere
JRElement elementEnseignant = jrBand.getElementByKey(KEY_TITRE_ENSEIGNANT)
- elementEnseignant.width = ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT
+ elementEnseignant.width = allDescriptionColonne.largeurColonneMatiere
}
private List<JRElement> traiteLigneTitreColonne(JRBand jrBand,
String nomChamp,
List<JRElement> aSupprimer) {
-
JRElement jrElement = jrBand.getElementByKey(nomChamp)
if (jrElement) {
jrElement.x = descriptionColonne.positionHorizontale
if (ColonneMatiere.isColonneMatiere(nomChamp)) {
- jrElement.width = ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT
+ jrElement.width = allDescriptionColonne.largeurColonneMatiere
} else {
jrElement.width = ColonneBulletin.LARGEUR_COLONNE_DEFAUT_PT
}
JRElement jrElement) {
ColonneDescription descriptionColonne = allDescriptionColonne.getPositionTitreParChamp(nomChamp)
+
if (descriptionColonne) {
jrElement.x = descriptionColonne.positionHorizontale
-
ColonneGroupeEnum colonneGroupeEnum = ColonneGroupeEnum.getColonneParChamp(nomChamp)
Integer largeurGroupeEnNombreDeColonnes = allDescriptionColonne.largeurTitreGroupeColonne(colonneGroupeEnum)
jrElement.width = largeurGroupeEnNombreDeColonnes * ColonneBulletin.LARGEUR_COLONNE_DEFAUT_PT
// paramétrage du modèle
BulletinOptionsPersonnalise bulletinParametrage
+ /**
+ * largeur de la colonne des matières en point de pica
+ */
+ public Integer getLargeurColonneMatiere() {
+ bulletinParametrage.largeurMatierePointPica
+ }
+
/**
* Permet de rechercher la description d'une colonne par rapport au nom de champ associé
*/
public Integer largeurTitreGroupeColonne(ColonneGroupeEnum colonneGroupeEnum) {
Integer resultat = colonneGroupeEnum.largeurParDefaut
- if (resultat>0){
+ if (resultat > 0) {
return resultat
}
- String nomColonne= colonneGroupeEnum.col1
+ String nomColonne = colonneGroupeEnum.col1
resultat = incrementeSiOnImprime(nomColonne, resultat)
- nomColonne= colonneGroupeEnum.col2
+ nomColonne = colonneGroupeEnum.col2
resultat = incrementeSiOnImprime(nomColonne, resultat)
- nomColonne= colonneGroupeEnum.col3
+ nomColonne = colonneGroupeEnum.col3
resultat = incrementeSiOnImprime(nomColonne, resultat)
return resultat
package org.lilie.services.eliot.impression.template.bulletin.option
import org.lilie.services.eliot.notes.BulletinOptions
+import org.lilie.services.eliot.impression.template.bulletin.colonne.ColonneBulletin
/**
* DTO donnant la liste des options d'impression correspondant à la demande de la personne courante
* @author othe
*/
class BulletinOptionsPersonnalise {
+
+ public static float TAILLE_PICA_MM = 25.4 / 72
+
// imprime la moyenne générale
Boolean moyenneGenerale = true
// imprime le coeff
Boolean nombreNotes = false
// imprime le rangs
Boolean rangs = false
+ //taille de police du tableau
+ int taillePolice = 8
+ // largeur de la colonne matiere en mm
+ Integer largeurMatiereMM = ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT * TAILLE_PICA_MM
+
+ public Boolean getMoyennePrec() {
+ moyennePrec1 ||
+ moyennePrec2 ||
+ moyennePrec3
+ }
+
+ public int getLargeurMatierePointPica() {
+
+ if (largeurMatiereMM) {
+ return largeurMatiereMM / TAILLE_PICA_MM
+ } else {
+ return ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT
+ }
- public Boolean getMoyennePrec(){
- moyennePrec1 ||
- moyennePrec2 ||
- moyennePrec3
}
BulletinOptionsPersonnalise() {
moyenneMinMax = bulletinOptions.moyenneMinMax
nombreNotes = bulletinOptions.nombreNotes
rangs = bulletinOptions.rangs
+ largeurMatiereMM = bulletinOptions.largeurMatiere
+ if (!largeurMatiereMM) {
+ largeurMatiereMM = ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT * TAILLE_PICA_MM
+ }
}
'moyennePrecedente': moyennePrec1,
'moyenneMinMax': moyenneMinMax,
'nombreNotes': nombreNotes,
- 'rangs': rangs
-
+ 'rangs': rangs,
+ 'largeurMatiere': largeurMatiereMM
]
}
ColonneBulletin resultat = new ColonneBulletin(bulletinParametrage: bulletinParametrage)
- Integer position = ColonneBulletin.LARGEUR_COLONNE_MATIERE_PT
+ Integer position = bulletinParametrage.largeurMatierePointPica
ColonneGroupeEnum.each {
ColonneGroupeEnum colonneGroupeEnum ->
return false
}
-
private static final Integer TOUS_LE_GROUPE = -1
public Boolean groupeASupprimer(BulletinOptionsPersonnalise bulletinParametrage,
--- /dev/null
+<!--
+ ~ Copyright © FYLAB and the Conseil Régional d'Île-de-France, 2009
+ ~ This file is part of L'Interface Libre et Interactive de l'Enseignement (Lilie).
+ ~
+ ~ Lilie is free software. You can redistribute it and/or modify since
+ ~ you respect the terms of either (at least one of the both license) :
+ ~ - under the terms of the GNU Affero General Public License as
+ ~ published by the Free Software Foundation, either version 3 of the
+ ~ License, or (at your option) any later version.
+ ~ - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ ~ License, or any later version
+ ~
+ ~ There are special exceptions to the terms and conditions of the
+ ~ licenses as they are applied to this software. View the full text of
+ ~ the exception in file LICENSE.txt in the directory of this software
+ ~ distribution.
+ ~
+ ~ Lilie is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ Licenses for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ and the CeCILL-C along with Lilie. If not, see :
+ ~ <http://www.gnu.org/licenses/> and
+ ~ <http://www.cecill.info/licences.fr.html>.
+ -->
+
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
+
+
+ <changeSet id="1" author="othe">
+
+ <comment>
+ Ajout de la colonne 'largeur_matiere' dans table 'impression.bulletin_options'
+ </comment>
+
+ <addColumn schemaName="impression" tableName="bulletin_options">
+ <column name="largeur_matiere" type="int">
+ <constraints nullable="true"/>
+ </column>
+ </addColumn>
+
+ </changeSet>
+
+</databaseChangeLog>
\ No newline at end of file
<include file="changelogs/scolarite/2014-10-02-0039478.xml"/>
<include file="changelogs/scolarite/2014-09-29-0039331.xml"/>
<include file="changelogs/scolarite/2014-10-08-0039599.xml"/>
+ <include file="changelogs/scolarite/2014-10-09-0039604.xml"/>
<include file="changelogs/scolarite/2014-10-09-0039332.xml"/>
</databaseChangeLog>
.x-trigger-wrap-focus .x-form-spinner-splitter{
background-position:-14px 0;
}
+
+
+.x-form-field-wrap .x-form-spinner-trigger {
+ background-image: url("../images/spinner.gif");
+}
+
bulletinOptions.nombreNotes = bulletinOptionsPersonnalise.nombreNotes
bulletinOptions.rangs = bulletinOptionsPersonnalise.rangs
bulletinOptions.coefficient = bulletinOptionsPersonnalise.coefficient
+ bulletinOptions.largeurMatiere = bulletinOptionsPersonnalise.largeurMatiereMM
bulletinOptions.save(flush: true, failOnError: true)
}
bulletinOptionsPersonnalise.moyenneMinMax = it.complement.moyenneMinMax
bulletinOptionsPersonnalise.nombreNotes = it.complement.nombreNotes
bulletinOptionsPersonnalise.rangs = it.complement.rangs
+ bulletinOptionsPersonnalise.largeurMatiereMM = it.complement.largeurMatiere
bulletinOptionsPersonnalise
}
<head>
<meta name="layout" content="eliot.simple.extjs.3.2.0">
+ <link rel="stylesheet" type="text/css" href="${resource(dir: 'js/lib/extjs-3.2.0/resources/css', file: 'Spinner.css')}"/>
+
<title>Création/Modification d'un Modèle</title>
+
%{--Div de la barre de progression --}%
<g:render template="/loadingMask"></g:render>
<g:render template="/parametrages/modelededocument/creermodifier/modele"/>
+ <g:javascript library="lib/extjs-3.2.0/SpinnerField"/>
+ <g:javascript library="lib/extjs-3.2.0/Spinner"/>
<g:javascript library="src/views/commun/Message"/>
<g:javascript library="src/views/parametrages/modelededocument/creermodifier/SaveCancelToolbarView"/>
<g:javascript library="src/views/parametrages/modelededocument/creermodifier/SaveCancelToolbarController"/>
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Tableau" pageWidth="555" pageHeight="842" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="12d785a6-3003-4323-941c-b310432f1053">
- <property name="ireport.zoom" value="3.0"/>
- <property name="ireport.x" value="0"/>
- <property name="ireport.y" value="0"/>
- <import value="org.lilie.services.eliot.impression.template.bulletin.option.BulletinOptionsPersonnalise"/>
- <style name="cellule" mode="Opaque" backcolor="#F0F0F0" hAlign="Center" vAlign="Middle" fontName="Arial" fontSize="7">
- <box>
- <pen lineWidth="0.25"/>
- <topPen lineWidth="0.25"/>
- <leftPen lineWidth="0.25"/>
- <bottomPen lineWidth="0.25"/>
- <rightPen lineWidth="0.25"/>
- </box>
- </style>
- <style name="table">
- <box>
- <pen lineWidth="0.25" lineColor="#000000"/>
- <topPen lineWidth="0.25"/>
- <leftPen lineWidth="0.25"/>
- <bottomPen lineWidth="0.25"/>
- <rightPen lineWidth="0.25"/>
- </box>
- </style>
- <style name="table_TH" mode="Opaque" backcolor="#F0F0F0">
- <box>
- <pen lineWidth="0.5" lineColor="#000000"/>
- </box>
- </style>
- <style name="table_CH" mode="Opaque" backcolor="#F0F0F0">
- <box>
- <pen lineWidth="0.5" lineColor="#000000"/>
- </box>
- </style>
- <style name="table_TD" mode="Opaque" backcolor="#FFFFFF" fontSize="8"/>
- <style name="titre" mode="Opaque" backcolor="#F0F0F0">
- <box leftPadding="3" rightPadding="3">
- <pen lineWidth="0.25"/>
- <topPen lineWidth="0.25"/>
- <leftPen lineWidth="0.25"/>
- <bottomPen lineWidth="0.25"/>
- <rightPen lineWidth="0.25"/>
- </box>
- </style>
- <subDataset name="annotations" uuid="e1d0d5d0-0c5a-4d6e-a42c-c25eeb46d252">
- <field name="code" class="java.lang.String"/>
- <field name="libelle" class="java.lang.String"/>
- </subDataset>
- <parameter name="ligneMatiere" class="java.lang.Object"/>
- <parameter name="ligneSousMatiere" class="java.lang.Object"/>
- <parameter name="options" class="org.lilie.services.eliot.impression.template.bulletin.option.BulletinOptionsPersonnalise" isForPrompting="false"/>
- <field name="libelle" class="java.lang.String"/>
- <field name="moyenneMin" class="java.lang.String"/>
- <field name="moyenneMax" class="java.lang.String"/>
- <field name="coeff" class="java.lang.String"/>
- <field name="appreciation" class="java.lang.String"/>
- <field name="moyenneEleve" class="java.lang.String"/>
- <field name="moyenneClasse" class="java.lang.String"/>
- <field name="lignesTableau" class="java.util.List"/>
- <field name="allNoteTextuelle" class="java.lang.String"/>
- <field name="existeNoteTextuelle" class="java.lang.Boolean"/>
- <field name="nomPeriodePrecedente1" class="java.lang.String"/>
- <field name="nomPeriodePrecedente2" class="java.lang.String"/>
- <field name="rangs" class="java.lang.String"/>
- <field name="nbNotes" class="java.lang.Integer"/>
- <field name="moyennePrec1" class="java.lang.String"/>
- <field name="moyennePrec2" class="java.lang.String"/>
- <field name="nomPeriodePrecedente3" class="java.lang.String"/>
- <field name="moyennePrec3" class="java.lang.String"/>
- <columnHeader>
- <band height="21" splitType="Stretch">
- <staticText>
- <reportElement uuid="12b014e9-2e2d-43f2-9ffd-dcfd0ac425ba" key="appreciation" style="cellule" x="361" y="1" width="194" height="20"/>
- <textElement>
- <font fontName="Arial" size="8" isBold="false"/>
- </textElement>
- <text><![CDATA[Appréciations]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="ef545f23-91c9-446e-ab45-9a4cfcf66ae0" key="titreEnseignant" style="titre" mode="Opaque" x="0" y="11" width="91" height="10" backcolor="#F0F0F0"/>
- <textElement textAlignment="Left">
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Enseignants]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="00b17978-5603-4c98-9319-b49bc092f09e" key="titreMoyennes" style="cellule" mode="Opaque" x="172" y="1" width="54" height="10"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Moyennes]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="75483331-6465-40d9-a4a7-a5c46be9008b" key="moyenneEleve" style="cellule" x="172" y="11" width="27" height="10"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Elève]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="540c1bb2-1474-4b33-967b-601d8997c541" key="moyenneClasse" style="cellule" x="199" y="11" width="27" height="10"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Classe]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="9c570a82-891e-4420-8d21-a70237599c65" key="coeff" style="cellule" x="226" y="1" width="27" height="20"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Coeff.]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="14e8b2e1-65b4-45a5-96d8-6cd42e14d2a9" key="titreMoyenneMin" style="cellule" x="280" y="1" width="54" height="10"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Moyennes]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="cd40de85-3bb5-4efa-85c4-d2f73b70b539" key="moyenneMin" style="cellule" x="280" y="11" width="27" height="10"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Min.]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="deee63ad-a461-4053-939a-d78382f84eae" key="moyenneMax" style="cellule" x="307" y="11" width="27" height="10"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Max.]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="f041b875-b87c-491a-b695-8918ef10f24c" key="titreMatiere" style="titre" mode="Opaque" x="0" y="1" width="91" height="10"/>
- <textElement textAlignment="Left">
- <font fontName="Arial" size="8" isBold="true"/>
- </textElement>
- <text><![CDATA[Matières]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="3ef4b903-bcbe-4eab-98bf-2e27c38c0e03" key="titreMoyennePrec" style="cellule" x="91" y="1" width="27" height="10"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Moy.]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="e226a81e-cfb6-4b5d-908c-3561b3d488b6" key="rangs" style="cellule" x="253" y="1" width="27" height="20"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Rang]]></text>
- </staticText>
- <staticText>
- <reportElement uuid="bd4c1536-618c-4a7b-acae-3c0c4abacc57" key="nbNotes" style="cellule" x="334" y="1" width="27" height="20"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <text><![CDATA[Nbre
+ <property name="ireport.zoom" value="3.0"/>
+ <property name="ireport.x" value="0"/>
+ <property name="ireport.y" value="0"/>
+ <import value="org.lilie.services.eliot.impression.template.bulletin.option.BulletinOptionsPersonnalise"/>
+ <style name="cellule" mode="Opaque" backcolor="#F0F0F0" hAlign="Center" vAlign="Middle" fontName="Arial" fontSize="7">
+ <box>
+ <pen lineWidth="0.25"/>
+ <topPen lineWidth="0.25"/>
+ <leftPen lineWidth="0.25"/>
+ <bottomPen lineWidth="0.25"/>
+ <rightPen lineWidth="0.25"/>
+ </box>
+ </style>
+ <style name="table">
+ <box>
+ <pen lineWidth="0.25" lineColor="#000000"/>
+ <topPen lineWidth="0.25"/>
+ <leftPen lineWidth="0.25"/>
+ <bottomPen lineWidth="0.25"/>
+ <rightPen lineWidth="0.25"/>
+ </box>
+ </style>
+ <style name="table_TH" mode="Opaque" backcolor="#F0F0F0">
+ <box>
+ <pen lineWidth="0.5" lineColor="#000000"/>
+ </box>
+ </style>
+ <style name="table_CH" mode="Opaque" backcolor="#F0F0F0">
+ <box>
+ <pen lineWidth="0.5" lineColor="#000000"/>
+ </box>
+ </style>
+ <style name="table_TD" mode="Opaque" backcolor="#FFFFFF" fontSize="8"/>
+ <style name="titre" mode="Opaque" backcolor="#F0F0F0">
+ <box leftPadding="3" rightPadding="3">
+ <pen lineWidth="0.25"/>
+ <topPen lineWidth="0.25"/>
+ <leftPen lineWidth="0.25"/>
+ <bottomPen lineWidth="0.25"/>
+ <rightPen lineWidth="0.25"/>
+ </box>
+ </style>
+ <subDataset name="annotations" uuid="e1d0d5d0-0c5a-4d6e-a42c-c25eeb46d252">
+ <field name="code" class="java.lang.String"/>
+ <field name="libelle" class="java.lang.String"/>
+ </subDataset>
+ <parameter name="ligneMatiere" class="java.lang.Object"/>
+ <parameter name="ligneSousMatiere" class="java.lang.Object"/>
+ <parameter name="options" class="org.lilie.services.eliot.impression.template.bulletin.option.BulletinOptionsPersonnalise" isForPrompting="false"/>
+ <field name="libelle" class="java.lang.String"/>
+ <field name="moyenneMin" class="java.lang.String"/>
+ <field name="moyenneMax" class="java.lang.String"/>
+ <field name="coeff" class="java.lang.String"/>
+ <field name="appreciation" class="java.lang.String"/>
+ <field name="moyenneEleve" class="java.lang.String"/>
+ <field name="moyenneClasse" class="java.lang.String"/>
+ <field name="lignesTableau" class="java.util.List"/>
+ <field name="allNoteTextuelle" class="java.lang.String"/>
+ <field name="existeNoteTextuelle" class="java.lang.Boolean"/>
+ <field name="nomPeriodePrecedente1" class="java.lang.String"/>
+ <field name="nomPeriodePrecedente2" class="java.lang.String"/>
+ <field name="rangs" class="java.lang.String"/>
+ <field name="nbNotes" class="java.lang.Integer"/>
+ <field name="moyennePrec1" class="java.lang.String"/>
+ <field name="moyennePrec2" class="java.lang.String"/>
+ <field name="nomPeriodePrecedente3" class="java.lang.String"/>
+ <field name="moyennePrec3" class="java.lang.String"/>
+ <columnHeader>
+ <band height="21" splitType="Stretch">
+ <staticText>
+ <reportElement uuid="12b014e9-2e2d-43f2-9ffd-dcfd0ac425ba" key="appreciation" style="cellule" x="361" y="1" width="194" height="20"/>
+ <textElement>
+ <font fontName="Arial" size="8" isBold="false"/>
+ </textElement>
+ <text><![CDATA[Appréciations]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="ef545f23-91c9-446e-ab45-9a4cfcf66ae0" key="titreEnseignant" style="titre" mode="Opaque" x="0" y="11" width="91" height="10" backcolor="#F0F0F0"/>
+ <textElement textAlignment="Left">
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Enseignants]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="00b17978-5603-4c98-9319-b49bc092f09e" key="titreMoyennes" style="cellule" mode="Opaque" x="172" y="1" width="54" height="10"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Moyennes]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="75483331-6465-40d9-a4a7-a5c46be9008b" key="moyenneEleve" style="cellule" x="172" y="11" width="27" height="10"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Elève]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="540c1bb2-1474-4b33-967b-601d8997c541" key="moyenneClasse" style="cellule" x="199" y="11" width="27" height="10"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Classe]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="9c570a82-891e-4420-8d21-a70237599c65" key="coeff" style="cellule" x="226" y="1" width="27" height="20"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Coeff.]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="14e8b2e1-65b4-45a5-96d8-6cd42e14d2a9" key="titreMoyenneMin" style="cellule" x="280" y="1" width="54" height="10"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Moyennes]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="cd40de85-3bb5-4efa-85c4-d2f73b70b539" key="moyenneMin" style="cellule" x="280" y="11" width="27" height="10"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Min.]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="deee63ad-a461-4053-939a-d78382f84eae" key="moyenneMax" style="cellule" x="307" y="11" width="27" height="10"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Max.]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="f041b875-b87c-491a-b695-8918ef10f24c" key="titreMatiere" style="titre" mode="Opaque" x="0" y="1" width="91" height="10"/>
+ <textElement textAlignment="Left">
+ <font fontName="Arial" size="8" isBold="true"/>
+ </textElement>
+ <text><![CDATA[Matières]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="3ef4b903-bcbe-4eab-98bf-2e27c38c0e03" key="titreMoyennePrec" style="cellule" x="91" y="1" width="27" height="10"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Moy.]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="e226a81e-cfb6-4b5d-908c-3561b3d488b6" key="rangs" style="cellule" x="253" y="1" width="27" height="20"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Rang]]></text>
+ </staticText>
+ <staticText>
+ <reportElement uuid="bd4c1536-618c-4a7b-acae-3c0c4abacc57" key="nbNotes" style="cellule" x="334" y="1" width="27" height="20"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <text><![CDATA[Nbre
notes]]></text>
- </staticText>
- <textField isBlankWhenNull="true">
- <reportElement uuid="63ac7ea1-41d0-4775-a042-0385a1d1af2f" key="moyennePrec1" style="cellule" x="91" y="11" width="27" height="10"/>
- <textElement>
- <font size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{nomPeriodePrecedente1}]]></textFieldExpression>
- </textField>
- <textField isBlankWhenNull="true">
- <reportElement uuid="9c80df62-927b-4d10-8636-0bcf9f689d41" key="moyennePrec2" style="cellule" x="118" y="11" width="27" height="10"/>
- <textElement>
- <font size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{nomPeriodePrecedente2}]]></textFieldExpression>
- </textField>
- <textField isBlankWhenNull="true">
- <reportElement uuid="973e8472-23f4-41e5-b5aa-6c5f85e1e61c" key="moyennePrec3" style="cellule" x="145" y="11" width="27" height="10"/>
- <textElement>
- <font size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{nomPeriodePrecedente3}]]></textFieldExpression>
- </textField>
- </band>
- </columnHeader>
- <detail>
- <band height="20" splitType="Stretch">
- <subreport>
- <reportElement uuid="01ec75da-8d06-4f18-8390-83e36af28638" stretchType="RelativeToBandHeight" x="0" y="0" width="555" height="20"/>
- <subreportParameter name="ligneSousMatiere">
- <subreportParameterExpression><![CDATA[$P{ligneSousMatiere}]]></subreportParameterExpression>
- </subreportParameter>
- <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{lignesTableau})]]></dataSourceExpression>
- <subreportExpression><![CDATA[$P{ligneMatiere}]]></subreportExpression>
- </subreport>
- </band>
- <band height="21">
- <printWhenExpression><![CDATA[$P{options}.getMoyenneGenerale()]]></printWhenExpression>
- <rectangle>
- <reportElement uuid="d27a6913-a728-4cf2-b601-ca3b2a6375eb" key="appreciation" style="cellule" x="361" y="0" width="194" height="20"/>
- <graphicElement>
- <pen lineWidth="0.25"/>
- </graphicElement>
- </rectangle>
- <staticText>
- <reportElement uuid="0355b327-61e8-488a-92a3-5ce32a33bb13" style="titre" mode="Opaque" x="0" y="0" width="98" height="20"/>
- <textElement textAlignment="Left" verticalAlignment="Middle">
- <font fontName="Arial" size="8" isBold="true"/>
- </textElement>
- <text><![CDATA[Moyenne générale]]></text>
- </staticText>
- <textField pattern="" isBlankWhenNull="true">
- <reportElement uuid="c43ac41c-02fd-4407-9475-f297166579fd" key="col231" style="cellule" x="179" y="0" width="27" height="20"/>
- <textElement>
- <font fontName="Arial" size="8" isBold="true"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{moyenneEleve}]]></textFieldExpression>
- </textField>
- <textField pattern="" isBlankWhenNull="true">
- <reportElement uuid="2a196152-3ee4-4c34-9247-79b7a592cc71" key="col232" style="cellule" x="206" y="0" width="27" height="20"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{moyenneClasse}]]></textFieldExpression>
- </textField>
- <textField isBlankWhenNull="true">
- <reportElement uuid="fb177f26-8780-41e9-a27b-5fb9659e1972" style="cellule" x="287" y="0" width="27" height="20"/>
- <textElement textAlignment="Center" verticalAlignment="Middle">
- <font fontName="Arial" size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{moyenneMin}]]></textFieldExpression>
- </textField>
- <textField isBlankWhenNull="true">
- <reportElement uuid="a7402042-f9ca-4d3a-b321-ee04ca0a8c2f" style="cellule" x="314" y="0" width="27" height="20"/>
- <textElement textAlignment="Center" verticalAlignment="Middle">
- <font fontName="Arial" size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{moyenneMax}]]></textFieldExpression>
- </textField>
- <textField pattern="" isBlankWhenNull="true">
- <reportElement uuid="b53515dc-c18a-44a8-b7fc-db230917cc49" key="col13" style="cellule" x="98" y="0" width="27" height="20"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{moyennePrec1}]]></textFieldExpression>
- </textField>
- <textField isBlankWhenNull="true">
- <reportElement uuid="a5aab541-ae31-470b-9bb6-88f03a21e237" style="cellule" x="341" y="0" width="27" height="20"/>
- <textElement>
- <font size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{nbNotes}]]></textFieldExpression>
- </textField>
- <textField isBlankWhenNull="true">
- <reportElement uuid="7c7b2998-505e-49a3-a792-b32ea8663560" style="cellule" x="233" y="0" width="27" height="20"/>
- <textElement>
- <font size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{coeff}]]></textFieldExpression>
- </textField>
- <textField isBlankWhenNull="true">
- <reportElement uuid="7bc51cdf-c86c-4917-afc8-b68ce22b2eb4" style="cellule" x="260" y="0" width="27" height="20"/>
- <textElement>
- <font size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{rangs}]]></textFieldExpression>
- </textField>
- <textField pattern="" isBlankWhenNull="true">
- <reportElement uuid="a09dc6b7-59c7-41f4-a4b1-e505d4f5bfe9" key="" style="cellule" x="125" y="0" width="27" height="20"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{moyennePrec2}]]></textFieldExpression>
- </textField>
- <textField pattern="" isBlankWhenNull="true">
- <reportElement uuid="39117d9d-ff12-4a6b-892d-a839d0cd7651" key="" style="cellule" x="152" y="0" width="27" height="20"/>
- <textElement>
- <font fontName="Arial" size="8"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{moyennePrec3}]]></textFieldExpression>
- </textField>
- </band>
- <band height="11" splitType="Stretch">
- <textField isStretchWithOverflow="true" isBlankWhenNull="true">
- <reportElement uuid="4079f165-8030-4acc-be04-dcffb8053757" x="0" y="0" width="555" height="10"/>
- <textElement>
- <font fontName="Arial" size="7" isItalic="true"/>
- </textElement>
- <textFieldExpression><![CDATA[$F{allNoteTextuelle}]]></textFieldExpression>
- </textField>
- </band>
- </detail>
+ </staticText>
+ <textField isBlankWhenNull="true">
+ <reportElement uuid="63ac7ea1-41d0-4775-a042-0385a1d1af2f" key="moyennePrec1" style="cellule" x="91" y="11" width="27" height="10"/>
+ <textElement>
+ <font size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{nomPeriodePrecedente1}]]></textFieldExpression>
+ </textField>
+ <textField isBlankWhenNull="true">
+ <reportElement uuid="9c80df62-927b-4d10-8636-0bcf9f689d41" key="moyennePrec2" style="cellule" x="118" y="11" width="27" height="10"/>
+ <textElement>
+ <font size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{nomPeriodePrecedente2}]]></textFieldExpression>
+ </textField>
+ <textField isBlankWhenNull="true">
+ <reportElement uuid="973e8472-23f4-41e5-b5aa-6c5f85e1e61c" key="moyennePrec3" style="cellule" x="145" y="11" width="27" height="10"/>
+ <textElement>
+ <font size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{nomPeriodePrecedente3}]]></textFieldExpression>
+ </textField>
+ </band>
+ </columnHeader>
+ <detail>
+ <band height="20" splitType="Stretch">
+ <subreport>
+ <reportElement uuid="01ec75da-8d06-4f18-8390-83e36af28638" stretchType="RelativeToBandHeight" x="0" y="0" width="555" height="20"/>
+ <subreportParameter name="ligneSousMatiere">
+ <subreportParameterExpression><![CDATA[$P{ligneSousMatiere}]]></subreportParameterExpression>
+ </subreportParameter>
+ <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{lignesTableau})]]></dataSourceExpression>
+ <subreportExpression><![CDATA[$P{ligneMatiere}]]></subreportExpression>
+ </subreport>
+ </band>
+ <band height="21">
+ <printWhenExpression><![CDATA[$P{options}.getMoyenneGenerale()]]></printWhenExpression>
+ <rectangle>
+ <reportElement uuid="d27a6913-a728-4cf2-b601-ca3b2a6375eb" key="appreciation" style="cellule" x="361" y="0" width="194" height="20"/>
+ <graphicElement>
+ <pen lineWidth="0.25"/>
+ </graphicElement>
+ </rectangle>
+ <staticText>
+ <reportElement uuid="0355b327-61e8-488a-92a3-5ce32a33bb13" style="titre" mode="Opaque" x="0" y="0" width="98" height="20"/>
+ <textElement textAlignment="Left" verticalAlignment="Middle">
+ <font fontName="Arial" size="8" isBold="true"/>
+ </textElement>
+ <text><![CDATA[Moyenne générale]]></text>
+ </staticText>
+ <textField pattern="" isBlankWhenNull="true">
+ <reportElement uuid="c43ac41c-02fd-4407-9475-f297166579fd" key="col231" style="cellule" x="179" y="0" width="27" height="20"/>
+ <textElement>
+ <font fontName="Arial" size="8" isBold="true"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{moyenneEleve}]]></textFieldExpression>
+ </textField>
+ <textField pattern="" isBlankWhenNull="true">
+ <reportElement uuid="2a196152-3ee4-4c34-9247-79b7a592cc71" key="col232" style="cellule" x="206" y="0" width="27" height="20"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{moyenneClasse}]]></textFieldExpression>
+ </textField>
+ <textField isBlankWhenNull="true">
+ <reportElement uuid="fb177f26-8780-41e9-a27b-5fb9659e1972" style="cellule" x="287" y="0" width="27" height="20"/>
+ <textElement textAlignment="Center" verticalAlignment="Middle">
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{moyenneMin}]]></textFieldExpression>
+ </textField>
+ <textField isBlankWhenNull="true">
+ <reportElement uuid="a7402042-f9ca-4d3a-b321-ee04ca0a8c2f" style="cellule" x="314" y="0" width="27" height="20"/>
+ <textElement textAlignment="Center" verticalAlignment="Middle">
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{moyenneMax}]]></textFieldExpression>
+ </textField>
+ <textField pattern="" isBlankWhenNull="true">
+ <reportElement uuid="b53515dc-c18a-44a8-b7fc-db230917cc49" key="col13" style="cellule" x="98" y="0" width="27" height="20"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{moyennePrec1}]]></textFieldExpression>
+ </textField>
+ <textField isBlankWhenNull="true">
+ <reportElement uuid="a5aab541-ae31-470b-9bb6-88f03a21e237" style="cellule" x="341" y="0" width="27" height="20"/>
+ <textElement>
+ <font size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{nbNotes}]]></textFieldExpression>
+ </textField>
+ <textField isBlankWhenNull="true">
+ <reportElement uuid="7c7b2998-505e-49a3-a792-b32ea8663560" style="cellule" x="233" y="0" width="27" height="20"/>
+ <textElement>
+ <font size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{coeff}]]></textFieldExpression>
+ </textField>
+ <textField isBlankWhenNull="true">
+ <reportElement uuid="7bc51cdf-c86c-4917-afc8-b68ce22b2eb4" style="cellule" x="260" y="0" width="27" height="20"/>
+ <textElement>
+ <font size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{rangs}]]></textFieldExpression>
+ </textField>
+ <textField pattern="" isBlankWhenNull="true">
+ <reportElement uuid="a09dc6b7-59c7-41f4-a4b1-e505d4f5bfe9" key="" style="cellule" x="125" y="0" width="27" height="20"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{moyennePrec2}]]></textFieldExpression>
+ </textField>
+ <textField pattern="" isBlankWhenNull="true">
+ <reportElement uuid="39117d9d-ff12-4a6b-892d-a839d0cd7651" key="" style="cellule" x="152" y="0" width="27" height="20"/>
+ <textElement>
+ <font fontName="Arial" size="8"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{moyennePrec3}]]></textFieldExpression>
+ </textField>
+ </band>
+ <band height="11" splitType="Stretch">
+ <textField isStretchWithOverflow="true" isBlankWhenNull="true">
+ <reportElement uuid="4079f165-8030-4acc-be04-dcffb8053757" x="0" y="0" width="555" height="10"/>
+ <textElement>
+ <font fontName="Arial" size="7" isItalic="true"/>
+ </textElement>
+ <textFieldExpression><![CDATA[$F{allNoteTextuelle}]]></textFieldExpression>
+ </textField>
+ </band>
+ </detail>
</jasperReport>
* Creates a Spinner control utilized by Ext.ux.form.SpinnerField
*/
Ext.ux.Spinner = Ext.extend(Ext.util.Observable, {
- incrementValue: 1,
- alternateIncrementValue: 5,
- triggerClass: 'x-form-spinner-trigger',
- splitterClass: 'x-form-spinner-splitter',
- alternateKey: Ext.EventObject.shiftKey,
- defaultValue: 0,
- accelerate: false,
-
- constructor: function(config){
- Ext.ux.Spinner.superclass.constructor.call(this, config);
- Ext.apply(this, config);
- this.mimicing = false;
- },
-
- init: function(field){
- this.field = field;
-
- field.afterMethod('onRender', this.doRender, this);
- field.afterMethod('onEnable', this.doEnable, this);
- field.afterMethod('onDisable', this.doDisable, this);
- field.afterMethod('afterRender', this.doAfterRender, this);
- field.afterMethod('onResize', this.doResize, this);
- field.afterMethod('onFocus', this.doFocus, this);
- field.beforeMethod('onDestroy', this.doDestroy, this);
- },
-
- doRender: function(ct, position){
- var el = this.el = this.field.getEl();
- var f = this.field;
-
- if (!f.wrap) {
- f.wrap = this.wrap = el.wrap({
- cls: "x-form-field-wrap"
- });
- }
- else {
- this.wrap = f.wrap.addClass('x-form-field-wrap');
- }
-
- this.trigger = this.wrap.createChild({
- tag: "img",
- src: Ext.BLANK_IMAGE_URL,
- cls: "x-form-trigger " + this.triggerClass
- });
-
- if (!f.width) {
- this.wrap.setWidth(el.getWidth() + this.trigger.getWidth());
- }
-
- this.splitter = this.wrap.createChild({
- tag: 'div',
- cls: this.splitterClass,
- style: 'width:13px; height:2px;'
- });
- this.splitter.setRight((Ext.isIE) ? 1 : 2).setTop(10).show();
-
- this.proxy = this.trigger.createProxy('', this.splitter, true);
- this.proxy.addClass("x-form-spinner-proxy");
- this.proxy.setStyle('left', '0px');
- this.proxy.setSize(14, 1);
- this.proxy.hide();
- this.dd = new Ext.dd.DDProxy(this.splitter.dom.id, "SpinnerDrag", {
- dragElId: this.proxy.id
- });
-
- this.initTrigger();
- this.initSpinner();
-
- // Pour afficher la valeur d'init (defautValue)
- this.field.setRawValue(this.defaultValue);
- },
-
- doAfterRender: function(){
- var y;
- if (Ext.isIE && this.el.getY() != (y = this.trigger.getY())) {
- this.el.position();
- this.el.setY(y);
- }
- },
-
- doEnable: function(){
- if (this.wrap) {
- this.wrap.removeClass(this.field.disabledClass);
- }
- },
-
- doDisable: function(){
- if (this.wrap) {
- this.wrap.addClass(this.field.disabledClass);
- this.el.removeClass(this.field.disabledClass);
- }
- },
-
- doResize: function(w, h){
- if (typeof w == 'number') {
- this.el.setWidth(w - this.trigger.getWidth());
- }
- this.wrap.setWidth(this.el.getWidth() + this.trigger.getWidth());
- },
-
- doFocus: function(){
- if (!this.mimicing) {
- this.wrap.addClass('x-trigger-wrap-focus');
- this.mimicing = true;
- Ext.get(Ext.isIE ? document.body : document).on("mousedown", this.mimicBlur, this, {
- delay: 10
- });
- this.el.on('keydown', this.checkTab, this);
- }
- },
-
- // private
- checkTab: function(e){
- if (e.getKey() == e.TAB) {
- this.triggerBlur();
- }
- },
-
- // private
- mimicBlur: function(e){
- if (!this.wrap.contains(e.target) && this.field.validateBlur(e)) {
- this.triggerBlur();
- }
- },
-
- // private
- triggerBlur: function(){
- this.mimicing = false;
- Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
- this.el.un("keydown", this.checkTab, this);
- this.field.beforeBlur();
- this.wrap.removeClass('x-trigger-wrap-focus');
- this.field.onBlur.call(this.field);
- },
-
- initTrigger: function(){
- this.trigger.addClassOnOver('x-form-trigger-over');
- this.trigger.addClassOnClick('x-form-trigger-click');
- },
-
- initSpinner: function(){
- this.field.addEvents({
- 'spin': true,
- 'spinup': true,
- 'spindown': true
- });
-
- this.keyNav = new Ext.KeyNav(this.el, {
- "up": function(e){
- e.preventDefault();
- this.onSpinUp();
- },
-
- "down": function(e){
- e.preventDefault();
- this.onSpinDown();
- },
-
- "pageUp": function(e){
- e.preventDefault();
- this.onSpinUpAlternate();
- },
-
- "pageDown": function(e){
- e.preventDefault();
- this.onSpinDownAlternate();
- },
-
- scope: this
- });
-
- this.repeater = new Ext.util.ClickRepeater(this.trigger, {
- accelerate: this.accelerate
- });
- this.field.mon(this.repeater, "click", this.onTriggerClick, this, {
- preventDefault: true
- });
-
- this.field.mon(this.trigger, {
- mouseover: this.onMouseOver,
- mouseout: this.onMouseOut,
- mousemove: this.onMouseMove,
- mousedown: this.onMouseDown,
- mouseup: this.onMouseUp,
- scope: this,
- preventDefault: true
- });
-
- this.field.mon(this.wrap, "mousewheel", this.handleMouseWheel, this);
-
- this.dd.setXConstraint(0, 0, 10)
- this.dd.setYConstraint(1500, 1500, 10);
- this.dd.endDrag = this.endDrag.createDelegate(this);
- this.dd.startDrag = this.startDrag.createDelegate(this);
- this.dd.onDrag = this.onDrag.createDelegate(this);
- },
-
- onMouseOver: function(){
- if (this.disabled) {
- return;
- }
- var middle = this.getMiddle();
- this.tmpHoverClass = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-overup' : 'x-form-spinner-overdown';
- this.trigger.addClass(this.tmpHoverClass);
- },
-
- //private
- onMouseOut: function(){
- this.trigger.removeClass(this.tmpHoverClass);
- },
-
- //private
- onMouseMove: function(){
- if (this.disabled) {
- return;
- }
- var middle = this.getMiddle();
- if (((Ext.EventObject.getPageY() > middle) && this.tmpHoverClass == "x-form-spinner-overup") ||
+ incrementValue:1,
+ alternateIncrementValue:5,
+ triggerClass:'x-form-spinner-trigger',
+ splitterClass:'x-form-spinner-splitter',
+ alternateKey:Ext.EventObject.shiftKey,
+ defaultValue:0,
+ accelerate:false,
+
+ constructor:function (config) {
+ Ext.ux.Spinner.superclass.constructor.call(this, config);
+ Ext.apply(this, config);
+ this.mimicing = false;
+ },
+
+ init:function (field) {
+ this.field = field;
+
+ field.afterMethod('onRender', this.doRender, this);
+ field.afterMethod('onEnable', this.doEnable, this);
+ field.afterMethod('onDisable', this.doDisable, this);
+ field.afterMethod('afterRender', this.doAfterRender, this);
+ field.afterMethod('onResize', this.doResize, this);
+ field.afterMethod('onFocus', this.doFocus, this);
+ field.beforeMethod('onDestroy', this.doDestroy, this);
+ },
+
+ doRender:function (ct, position) {
+ var el = this.el = this.field.getEl();
+ var f = this.field;
+
+ if (!f.wrap) {
+ f.wrap = this.wrap = el.wrap({
+ cls:"x-form-field-wrap"
+ });
+ }
+ else {
+ this.wrap = f.wrap.addClass('x-form-field-wrap');
+ }
+
+ this.trigger = this.wrap.createChild({
+ tag:"img",
+ src:Ext.BLANK_IMAGE_URL,
+ cls:"x-form-trigger " + this.triggerClass
+ });
+
+ if (!f.width) {
+ this.wrap.setWidth(el.getWidth() + this.trigger.getWidth());
+ }
+
+ this.splitter = this.wrap.createChild({
+ tag:'div',
+ cls:this.splitterClass,
+ style:'width:13px; height:2px;'
+ });
+ this.splitter.setRight((Ext.isIE) ? 1 : 2).setTop(10).show();
+
+ this.proxy = this.trigger.createProxy('', this.splitter, true);
+ this.proxy.addClass("x-form-spinner-proxy");
+ this.proxy.setStyle('left', '0px');
+ this.proxy.setSize(14, 1);
+ this.proxy.hide();
+ this.dd = new Ext.dd.DDProxy(this.splitter.dom.id, "SpinnerDrag", {
+ dragElId:this.proxy.id
+ });
+
+ this.initTrigger();
+ this.initSpinner();
+
+ // Pour afficher la valeur d'init (defautValue)
+ this.field.setRawValue(this.defaultValue);
+ },
+
+ doAfterRender:function () {
+ var y;
+ if (Ext.isIE && this.el.getY() != (y = this.trigger.getY())) {
+ this.el.position();
+ this.el.setY(y);
+ }
+ },
+
+ doEnable:function () {
+ if (this.wrap) {
+ this.wrap.removeClass(this.field.disabledClass);
+ }
+ },
+
+ doDisable:function () {
+ if (this.wrap) {
+ this.wrap.addClass(this.field.disabledClass);
+ this.el.removeClass(this.field.disabledClass);
+ }
+ },
+
+ doResize:function (w, h) {
+ if (typeof w == 'number') {
+ this.el.setWidth(w - this.trigger.getWidth());
+ }
+ this.wrap.setWidth(this.el.getWidth() + this.trigger.getWidth());
+ },
+
+ doFocus:function () {
+ if (!this.mimicing) {
+ this.wrap.addClass('x-trigger-wrap-focus');
+ this.mimicing = true;
+ Ext.get(Ext.isIE ? document.body : document).on("mousedown", this.mimicBlur, this, {
+ delay:10
+ });
+ this.el.on('keydown', this.checkTab, this);
+ }
+ },
+
+ // private
+ checkTab:function (e) {
+ if (e.getKey() == e.TAB) {
+ this.triggerBlur();
+ }
+ },
+
+ // private
+ mimicBlur:function (e) {
+ if (!this.wrap.contains(e.target) && this.field.validateBlur(e)) {
+ this.triggerBlur();
+ }
+ },
+
+ // private
+ triggerBlur:function () {
+ this.mimicing = false;
+ Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
+ this.el.un("keydown", this.checkTab, this);
+ this.field.beforeBlur();
+ this.wrap.removeClass('x-trigger-wrap-focus');
+ this.field.onBlur.call(this.field);
+ },
+
+ initTrigger:function () {
+ this.trigger.addClassOnOver('x-form-trigger-over');
+ this.trigger.addClassOnClick('x-form-trigger-click');
+ },
+
+ initSpinner:function () {
+ this.field.addEvents({
+ 'spin':true,
+ 'spinup':true,
+ 'spindown':true
+ });
+
+ this.keyNav = new Ext.KeyNav(this.el, {
+ "up":function (e) {
+ e.preventDefault();
+ this.onSpinUp();
+ },
+
+ "down":function (e) {
+ e.preventDefault();
+ this.onSpinDown();
+ },
+
+ "pageUp":function (e) {
+ e.preventDefault();
+ this.onSpinUpAlternate();
+ },
+
+ "pageDown":function (e) {
+ e.preventDefault();
+ this.onSpinDownAlternate();
+ },
+
+ scope:this
+ });
+
+ this.repeater = new Ext.util.ClickRepeater(this.trigger, {
+ accelerate:this.accelerate
+ });
+ this.field.mon(this.repeater, "click", this.onTriggerClick, this, {
+ preventDefault:true
+ });
+
+ this.field.mon(this.trigger, {
+ mouseover:this.onMouseOver,
+ mouseout:this.onMouseOut,
+ mousemove:this.onMouseMove,
+ mousedown:this.onMouseDown,
+ mouseup:this.onMouseUp,
+ scope:this,
+ preventDefault:true
+ });
+
+ this.field.mon(this.wrap, "mousewheel", this.handleMouseWheel, this);
+
+ this.dd.setXConstraint(0, 0, 10);
+ this.dd.setYConstraint(1500, 1500, 10);
+ this.dd.endDrag = this.endDrag.createDelegate(this);
+ this.dd.startDrag = this.startDrag.createDelegate(this);
+ this.dd.onDrag = this.onDrag.createDelegate(this);
+ },
+
+ onMouseOver:function () {
+ if (this.disabled) {
+ return;
+ }
+ var middle = this.getMiddle();
+ this.tmpHoverClass = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-overup' : 'x-form-spinner-overdown';
+ this.trigger.addClass(this.tmpHoverClass);
+ },
+
+ //private
+ onMouseOut:function () {
+ this.trigger.removeClass(this.tmpHoverClass);
+ },
+
+ //private
+ onMouseMove:function () {
+ if (this.disabled) {
+ return;
+ }
+ var middle = this.getMiddle();
+ if (((Ext.EventObject.getPageY() > middle) && this.tmpHoverClass == "x-form-spinner-overup") ||
((Ext.EventObject.getPageY() < middle) && this.tmpHoverClass == "x-form-spinner-overdown")) {
- }
- },
-
- //private
- onMouseDown: function(){
- if (this.disabled) {
- return;
- }
- var middle = this.getMiddle();
- this.tmpClickClass = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-clickup' : 'x-form-spinner-clickdown';
- this.trigger.addClass(this.tmpClickClass);
- },
-
- //private
- onMouseUp: function(){
- this.trigger.removeClass(this.tmpClickClass);
- },
-
- //private
- onTriggerClick: function(){
- if (this.disabled || this.el.dom.readOnly) {
- return;
- }
- var middle = this.getMiddle();
- var ud = (Ext.EventObject.getPageY() < middle) ? 'Up' : 'Down';
- this['onSpin' + ud]();
- },
-
- //private
- getMiddle: function(){
- var t = this.trigger.getTop();
- var h = this.trigger.getHeight();
- var middle = t + (h / 2);
- return middle;
- },
-
- //private
- //checks if control is allowed to spin
- isSpinnable: function(){
- if (this.disabled || this.el.dom.readOnly) {
- Ext.EventObject.preventDefault(); //prevent scrolling when disabled/readonly
- return false;
- }
- return true;
- },
-
- handleMouseWheel: function(e){
- //disable scrolling when not focused
- if (this.wrap.hasClass('x-trigger-wrap-focus') == false) {
- return;
- }
-
- var delta = e.getWheelDelta();
- if (delta > 0) {
- this.onSpinUp();
- e.stopEvent();
- }
- else
- if (delta < 0) {
- this.onSpinDown();
- e.stopEvent();
- }
- },
-
- //private
- startDrag: function(){
- this.proxy.show();
- this._previousY = Ext.fly(this.dd.getDragEl()).getTop();
- },
-
- //private
- endDrag: function(){
- this.proxy.hide();
- },
-
- //private
- onDrag: function(){
- if (this.disabled) {
- return;
- }
- var y = Ext.fly(this.dd.getDragEl()).getTop();
- var ud = '';
-
- if (this._previousY > y) {
- ud = 'Up';
- } //up
- if (this._previousY < y) {
- ud = 'Down';
- } //down
- if (ud != '') {
- this['onSpin' + ud]();
- }
-
- this._previousY = y;
- },
-
- //private
- onSpinUp: function(){
- if (this.isSpinnable() == false) {
- return;
- }
- if (Ext.EventObject.shiftKey == true) {
- this.onSpinUpAlternate();
- return;
- }
- else {
- this.spin(false, false);
- }
- this.field.fireEvent("spin", this);
- this.field.fireEvent("spinup", this);
- },
-
- //private
- onSpinDown: function(){
- if (this.isSpinnable() == false) {
- return;
- }
- if (Ext.EventObject.shiftKey == true) {
- this.onSpinDownAlternate();
- return;
- }
- else {
- this.spin(true, false);
- }
- this.field.fireEvent("spin", this);
- this.field.fireEvent("spindown", this);
- },
-
- //private
- onSpinUpAlternate: function(){
- if (this.isSpinnable() == false) {
- return;
- }
- this.spin(false, true);
- this.field.fireEvent("spin", this);
- this.field.fireEvent("spinup", this);
- },
-
- //private
- onSpinDownAlternate: function(){
- if (this.isSpinnable() == false) {
- return;
- }
- this.spin(true, true);
- this.field.fireEvent("spin", this);
- this.field.fireEvent("spindown", this);
- },
-
- spin: function(down, alternate){
- var v = parseFloat(this.field.getValue());
- var incr = (alternate == true) ? this.alternateIncrementValue : this.incrementValue;
- (down == true) ? v -= incr : v += incr;
-
- v = (isNaN(v)) ? this.defaultValue : v;
- v = this.fixBoundries(v);
- this.field.setRawValue(v);
- },
-
- fixBoundries: function(value){
- var v = value;
-
- if (this.field.minValue != undefined && v < this.field.minValue) {
- v = this.field.minValue;
- }
- if (this.field.maxValue != undefined && v > this.field.maxValue) {
- v = this.field.maxValue;
- }
-
- return this.fixPrecision(v);
- },
-
- // private
- fixPrecision: function(value){
- var nan = isNaN(value);
- if (!this.field.allowDecimals || this.field.decimalPrecision == -1 || nan || !value) {
- return nan ? '' : value;
- }
- return parseFloat(parseFloat(value).toFixed(this.field.decimalPrecision));
- },
-
- doDestroy: function(){
- if (this.trigger) {
- this.trigger.remove();
- }
- if (this.wrap) {
- this.wrap.remove();
- delete this.field.wrap;
- }
-
- if (this.splitter) {
- this.splitter.remove();
- }
-
- if (this.dd) {
- this.dd.unreg();
- this.dd = null;
- }
-
- if (this.proxy) {
- this.proxy.remove();
- }
-
- if (this.repeater) {
- this.repeater.purgeListeners();
- }
}
+ },
+
+ //private
+ onMouseDown:function () {
+ if (this.disabled) {
+ return;
+ }
+ var middle = this.getMiddle();
+ this.tmpClickClass = (Ext.EventObject.getPageY() < middle) ? 'x-form-spinner-clickup' : 'x-form-spinner-clickdown';
+ this.trigger.addClass(this.tmpClickClass);
+ },
+
+ //private
+ onMouseUp:function () {
+ this.trigger.removeClass(this.tmpClickClass);
+ },
+
+ //private
+ onTriggerClick:function () {
+ if (this.disabled || this.el.dom.readOnly) {
+ return;
+ }
+ var middle = this.getMiddle();
+ var ud = (Ext.EventObject.getPageY() < middle) ? 'Up' : 'Down';
+ this['onSpin' + ud]();
+ },
+
+ //private
+ getMiddle:function () {
+ var t = this.trigger.getTop();
+ var h = this.trigger.getHeight();
+ var middle = t + (h / 2);
+ return middle;
+ },
+
+ //private
+ //checks if control is allowed to spin
+ isSpinnable:function () {
+ if (this.disabled || this.el.dom.readOnly) {
+ Ext.EventObject.preventDefault(); //prevent scrolling when disabled/readonly
+ return false;
+ }
+ return true;
+ },
+
+ handleMouseWheel:function (e) {
+ //disable scrolling when not focused
+ if (this.wrap.hasClass('x-trigger-wrap-focus') == false) {
+ return;
+ }
+
+ var delta = e.getWheelDelta();
+ if (delta > 0) {
+ this.onSpinUp();
+ e.stopEvent();
+ }
+ else if (delta < 0) {
+ this.onSpinDown();
+ e.stopEvent();
+ }
+ },
+
+ //private
+ startDrag:function () {
+ this.proxy.show();
+ this._previousY = Ext.fly(this.dd.getDragEl()).getTop();
+ },
+
+ //private
+ endDrag:function () {
+ this.proxy.hide();
+ },
+
+ //private
+ onDrag:function () {
+ if (this.disabled) {
+ return;
+ }
+ var y = Ext.fly(this.dd.getDragEl()).getTop();
+ var ud = '';
+
+ if (this._previousY > y) {
+ ud = 'Up';
+ } //up
+ if (this._previousY < y) {
+ ud = 'Down';
+ } //down
+ if (ud != '') {
+ this['onSpin' + ud]();
+ }
+
+ this._previousY = y;
+ },
+
+ //private
+ onSpinUp:function () {
+ if (this.isSpinnable() == false) {
+ return;
+ }
+ if (Ext.EventObject.shiftKey == true) {
+ this.onSpinUpAlternate();
+ return;
+ }
+ else {
+ this.spin(false, false);
+ }
+ this.field.fireEvent("spin", this);
+ this.field.fireEvent("spinup", this);
+ },
+
+ //private
+ onSpinDown:function () {
+ if (this.isSpinnable() == false) {
+ return;
+ }
+ if (Ext.EventObject.shiftKey == true) {
+ this.onSpinDownAlternate();
+ return;
+ }
+ else {
+ this.spin(true, false);
+ }
+ this.field.fireEvent("spin", this);
+ this.field.fireEvent("spindown", this);
+ },
+
+ //private
+ onSpinUpAlternate:function () {
+ if (this.isSpinnable() == false) {
+ return;
+ }
+ this.spin(false, true);
+ this.field.fireEvent("spin", this);
+ this.field.fireEvent("spinup", this);
+ },
+
+ //private
+ onSpinDownAlternate:function () {
+ if (this.isSpinnable() == false) {
+ return;
+ }
+ this.spin(true, true);
+ this.field.fireEvent("spin", this);
+ this.field.fireEvent("spindown", this);
+ },
+
+ spin:function (down, alternate) {
+ var v = parseFloat(this.field.getValue());
+ var incr = (alternate == true) ? this.alternateIncrementValue : this.incrementValue;
+ (down == true) ? v -= incr : v += incr;
+
+ v = (isNaN(v)) ? this.defaultValue : v;
+ v = this.fixBoundries(v);
+ this.field.setRawValue(v);
+ },
+
+ fixBoundries:function (value) {
+ var v = value;
+
+ if (this.field.minValue != undefined && v < this.field.minValue) {
+ v = this.field.minValue;
+ }
+ if (this.field.maxValue != undefined && v > this.field.maxValue) {
+ v = this.field.maxValue;
+ }
+
+ return this.fixPrecision(v);
+ },
+
+ // private
+ fixPrecision:function (value) {
+ var nan = isNaN(value);
+ if (!this.field.allowDecimals || this.field.decimalPrecision == -1 || nan || !value) {
+ return nan ? '' : value;
+ }
+ return parseFloat(parseFloat(value).toFixed(this.field.decimalPrecision));
+ },
+
+ doDestroy:function () {
+ if (this.trigger) {
+ this.trigger.remove();
+ }
+ if (this.wrap) {
+ this.wrap.remove();
+ delete this.field.wrap;
+ }
+
+ if (this.splitter) {
+ this.splitter.remove();
+ }
+
+ if (this.dd) {
+ this.dd.unreg();
+ this.dd = null;
+ }
+
+ if (this.proxy) {
+ this.proxy.remove();
+ }
+
+ if (this.repeater) {
+ this.repeater.purgeListeners();
+ }
+ }
});
//backwards compat
.x-trigger-wrap-focus .x-form-spinner-splitter{
background-position:-14px 0;
}
+
+.x-form-field-wrap .x-form-spinner-trigger {
+ background-image: url("../images/spinner.gif");
+}
break;
case this.Constantes.action.logo :
- console.log(listeElement[i])
var id = listeElement[i].id;
var action = listeElement[i].action;
var checkbox = new Ext.form.Checkbox({
},
creeBulletinEditor:function (element) {
-
+ console.log(element)
this.bulletinCheckboxes = {
moyenneGenerale:this.creeBulletinCheckbox(element, 'moyenneGenerale'),
coefficient:this.creeBulletinCheckbox(element, 'coefficient'),
rangs:this.creeBulletinCheckbox(element, 'rangs')
};
+ this.taillePoliceCombo = new Ext.form.ComboBox({
+ labelWidth:80,
+ width:50,
+ fieldLabel:'<span style="font-weight: normal; font-size: 11px;">'
+ + 'Taille de police' + '</span>', // todo
+ labelSeparator:'',
+ editable:false,
+ store:[], // todo
+ mode:'local',
+ typeAhead:true,
+ triggerAction:'all',
+ autocomplete:true,
+ displayField:'libelle',
+ valueField:'id',
+ value:33,
+ listeners:{
+ 'select':function (combo, record, index) { // todo
+ this.fireEvent(
+// this.Constantes.eventId.actionSelectionneSousRapport,
+// combo.idComboBox,
+// record.get('id')
+ );
+ },
+ scope:this
+ }
+ });
+
+ this.matiereColonneLargeur = new Ext.ux.form.SpinnerField({
+ fieldLabel:'<span style="font-weight: normal; font-size: 11px;">'
+ + 'Largeur colonne des matières' + '</span>', // todo
+ value:element.complement.largeurMatiere,
+ minValue:30,
+ maxValue:100,
+ allowDecimals:false,
+ width:50,
+ labelSeparator:'',
+ listeners:{
+ spin:function (spinner, newValue, oldValue) {
+ this.updateBulletin(element);
+ },
+ scope:this
+ }
+ });
+
+
var editor = new Ext.Panel({
layout:'column',
+ defaults:{
+ layout:'form',
+ labelSeparator:''
+ },
items:[
{
- layout:'form',
labelWidth:135,
width:140,
items:[
{
xtype:'label',
- labelSeparator:'',
fieldLabel:element.libelle
}
]
},
{
- layout:'form',
+ width:260,
+ items:[
+ this.taillePoliceCombo,
+ {
+ height:15 // un blanc horizontal
+ },
+ {
+ layout:'column',
+ items:[
+ {
+ layout:'form',
+ labelWidth:150,
+ width:210,
+ items:this.matiereColonneLargeur
+ },
+ {
+ width:50,
+ html:'(en mm)', // todo
+ bodyStyle:'line-height: 20px'
+ }
+ ]
+ }
+ ]
+ },
+ {
hideLabels:true,
- width:220,
+ width:180,
items:[
this.bulletinCheckboxes.moyenneGenerale,
this.bulletinCheckboxes.coefficient,
{
layout:'form',
hideLabels:true,
- width:220,
+ width:180,
items:[
this.bulletinCheckboxes.moyenneMinMax,
this.bulletinCheckboxes.nombreNotes,
checked:element.complement[name],
listeners:{
check:function () {
- this.updateBulletinCheckboxValues(element);
+ this.updateBulletin(element);
},
scope:this
}
})
},
- updateBulletinCheckboxValues:function (element) {
+ updateBulletin:function (element) {
var complement = {
moyenneGenerale:this.bulletinCheckboxes.moyenneGenerale.checked,
moyennePrecedente:this.bulletinCheckboxes.moyennePrecedente.checked,
moyenneMinMax:this.bulletinCheckboxes.moyenneMinMax.checked,
nombreNotes:this.bulletinCheckboxes.nombreNotes.checked,
- rangs:this.bulletinCheckboxes.rangs.checked
+ rangs:this.bulletinCheckboxes.rangs.checked,
+ largeurMatiere:this.matiereColonneLargeur.getValue()
};
this.fireEvent(this.Constantes.eventId.actionChangeBulletinComplement,