/**
* Demande l'actualisation du graph
*/
- this.Constantes.eventId.actionActualiserGraph);
+ this.Constantes.eventId.actionActualiserGraph,
+
+ /**
+ * Demande les informations d'options de publication
+ */
+ this.Constantes.eventId.actionAfficherOptionsDePublication,
+
+ /**
+ * Enregistre les options de publication
+ * @param optionsDePublication
+ */
+ this.Constantes.eventId.enregistreOptionsDePublication);
// Définition de la configuration par défaut
var cfg = {
this.afficheGraph(data, periodesPrecedentesExistent, periodes);
},
this);
+
+ controller.addListener(
+ this.Constantes.eventId.openWindowOptionsDePublication,
+ function(classe, optionsDePublication) {
+ this.openWindowOptionsDePublication(classe, optionsDePublication);
+ },
+ this);
}
,
}
}
}
+ },
+
+ getOptionsButton: function() {
+ return new Ext.Button({
+ xtype: 'tbbutton',
+ text : eliot.notes.Modele.libelle.btnOptionsDePublication,
+ style:'margin-top: 3px;margin-left: 25px;',
+ listeners: {
+ click : function() {
+ this.fireEvent(this.Constantes.eventId.actionAfficherOptionsDePublication);
+ },
+ scope : this
+ }
+ });
+ },
+
+ /**
+ * Ouvre la fenêtre popup Options de publication
+ * @param classe
+ * @param optionsDePublication
+ */
+ openWindowOptionsDePublication: function(classe, optionsDePublication) {
+
+ if (this.windowOptionsDePublication === undefined) {
+ this.initWindowOptionsDePublication(classe);
+ }
+
+ this.optionsDePublication = optionsDePublication;
+ if (this.optionsDePublication){
+ var moyenneGenerale = this.optionsDePublication.moyenneGenerale;
+ var coefficient = this.optionsDePublication.coefficient;
+ var moyenneMinMax = this.optionsDePublication.moyenneMinMax;
+ var moyennePrecedente = this.optionsDePublication.moyennePrecedente;
+ var nombreNotes = this.optionsDePublication.nombreNotes;
+ var rangs = this.optionsDePublication.rangs;
+ if (moyenneGenerale != undefined) {
+ this.checkBoxMoyenneGenerale.setValue(moyenneGenerale);
+ }
+ if (coefficient != undefined){
+ this.checkBoxCoefficient.setValue(coefficient);
+ }
+ if (moyenneMinMax != undefined){
+ this.checkBoxMoyennesMinMax.setValue(moyenneMinMax);
+ }
+ if (moyennePrecedente != undefined){
+ this.checkBoxMoyennesPrecedentes.setValue(moyennePrecedente);
+ }
+ if (nombreNotes != undefined){
+ this.checkBoxNbNotes.setValue(nombreNotes);
+ }
+ if (rangs != undefined){
+ this.checkBoxRang.setValue(rangs);
+ }
+ }
+
+ this.windowOptionsDePublication.show();
+
+ },
+
+ /**
+ * Crée la popup Options De Publication
+ */
+ initWindowOptionsDePublication: function(classe) {
+
+ this.checkBoxMoyenneGenerale = new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.moyenneGenerale + '</span>',
+ checked: true
+ });
+ this.checkBoxCoefficient = new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.coefficient + '</span>',
+ checked: true
+ });
+ this.checkBoxMoyennesMinMax = new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.moyennesMinMax + '</span>',
+ checked: true
+ });
+ this.checkBoxMoyennesPrecedentes = new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.moyennesPrecedentes + '</span>',
+ checked: false
+ });
+ this.checkBoxNbNotes = new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.nbNotes + '</span>',
+ checked: false
+ });
+ this.checkBoxRang = new Ext.form.Checkbox({
+ boxLabel: '<span style="font-weight:normal;">' + this.ConfigServeur.libelle.rangSurNbEleves + '</span>',
+ checked: false
+ });
+
+ this.buttonOk = new Ext.Button({
+ text: this.ConfigServeur.libelle.ok,
+ handler: function() {
+ this.optionsDePublication.moyenneGenerale = this.checkBoxMoyenneGenerale.getValue();
+ this.optionsDePublication.coefficient = this.checkBoxCoefficient.getValue();
+ this.optionsDePublication.moyenneMinMax = this.checkBoxMoyennesMinMax.getValue();
+ this.optionsDePublication.moyennePrecedente = this.checkBoxMoyennesPrecedentes.getValue();
+ this.optionsDePublication.nombreNotes = this.checkBoxNbNotes.getValue();
+ this.optionsDePublication.rangs = this.checkBoxRang.getValue();
+
+ this.fireEvent(
+ this.Constantes.eventId.enregistreOptionsDePublication,
+ this.optionsDePublication);
+
+ this.windowOptionsDePublication.hide();
+ },
+ scope: this
+ });
+
+ this.windowOptionsDePublication = new Ext.Window({
+
+ title: this.ConfigServeur.libelle.optionsDePublication,
+ layout:'fit',
+ width:350,
+ height:250,
+ closeAction:'hide',
+ resizable: false,
+ plain: true,
+
+ items: [
+ {
+ xtype: 'fieldset',
+ border: false,
+ autoHeight: true,
+ defaults: {
+ width: 200
+ },
+ items: [
+ {
+ xtype: 'label',
+ html: this.ConfigServeur.libelle.selOptionsDePublicationConseil+'<div style="margin: 0 0 5px 0"/>'
+ },
+ {
+ xtype: 'checkboxgroup',
+ columns: 1,
+ labelWidth: 30,
+ hideLabel: true,
+ items: [
+ this.checkBoxMoyenneGenerale,
+ this.checkBoxCoefficient,
+ this.checkBoxMoyennesMinMax,
+ this.checkBoxMoyennesPrecedentes,
+ this.checkBoxNbNotes,
+ this.checkBoxRang
+ ]
+ }
+ ]
+ }
+ ],
+
+ buttons: [this.buttonOk,
+ {
+ text: this.ConfigServeur.libelle.annuler,
+ handler: function() {
+ this.windowOptionsDePublication.hide();
+ },
+ scope: this
+ }]
+ });
+
}
});
\ No newline at end of file