this.Constantes.eventId.ouvreOngletBulletin
);
- this.creeGraphTdn();
-
// Banque d'appréciation
this.banqueAppreciation = new eliot.notes.saisie.commun.banqueAppreciation.Composant();
if (this.ConfigServeur.data.verrouille === true) {
eleveModel: this.eleveModel,
periodeModel: this.periodeModel,
banqueAppreciation: this.banqueAppreciation,
- bulletin: this.bulletin,
- graphTdn: this.graphTdn
+ bulletin: this.bulletin
});
this.conseilDeClasseController.observeToolbarView(this.toolbarView);
banqueAppreciation: this.banqueAppreciation,
periodeModel: this.periodeModel,
eleveModel: this.eleveModel,
- graphTdn: this.graphTdn,
controller: this.conseilDeClasseController
});
this.conseilDeClasseView.observeController(this.conseilDeClasseController);
*/
ouvreSynthese: function() {
this.conseilDeClasseController.ouvreSynthese();
- },
-
- creeGraphTdn: function() {
-
- this.graphTdn = new eliot.notes.consultation.commun.graph.Composant({
-
- prefix: 'tdn',
-
- dataFilter: function(data) {
- return data.noteEleve != null;
- },
-
- xField: {
- name: 'evaluation'
- },
- yFields: [
- {
- name: 'noteMax',
- type: 'column',
- libelle: this.ConfigServeur.libelle.noteMaxMoyenneClasse,
- style: {
- color: '#96ff96',
- colorId: 'max'
- },
- round: eliot.notes.commun.Utils.getNoteRound()
- },
- {
- name: 'noteMin',
- type: 'column',
- libelle: this.ConfigServeur.libelle.noteMinMoyenneClasse,
- style: {
- color: '#0ff858',
- colorId: 'min'
- },
- round: eliot.notes.commun.Utils.getNoteRound()
- },
- {
- name: 'moyenneClasse',
- type: 'line',
- libelle: this.ConfigServeur.libelle.moyenneClasse,
- style: {
- color: '#15428B',
- colorId: 'classe'
- },
- round: eliot.notes.commun.Utils.noteRound
- },
- {
- name: 'noteEleve',
- type: 'line',
- libelle: this.ConfigServeur.libelle.noteEleve,
- style: {
- color: '#B20007',
- colorId: 'eleve'
- },
- round: eliot.notes.commun.Utils.getNoteRound()
- }
- ],
- extraFields: [
- {name: 'noteMaxSur'},
- {name: 'noteMaxBase'},
- {name: 'noteMinSur'},
- {name: 'noteMinBase'},
- {name: 'moyenneClasseSur'},
- {name: 'moyenneClasseBase'},
- {name: 'noteEleveSur'},
- {name: 'noteEleveBase'}
- ],
- tipRenderer: eliot.notes.commun.Utils.getNoteRenderer()
- });
}
});
this.periodeModel = cfg.periodeModel;
this.banqueAppreciation = cfg.banqueAppreciation;
this.bulletin = cfg.bulletin;
- this.graphTdn = cfg.graphTdn
this.bloqueRechargement = false;
data, dataImpressionGraph, periodesPrecedentesExistent, periodes)
},
- onGraphClick: function(event, element, graphConfig) {
- var data = graphConfig.datas[element.x];
-
- var service = {id: data.serviceId, libelle: data.service};
- var enseignant = {id: data.enseignantId};
-
- this.ouvreGraphTdnWindow(service, enseignant);
- },
-
- ouvreGraphTdnWindow: function(service, enseignant) {
-
- Ext.Ajax.request({
-
- url : this.ConfigServeur.url.urlGraphTblNotes,
-
- params : {
- enseignantId: enseignant.id,
- eleveId: this.eleveModel.getEleve().id,
- periodeId : this.periodeModel.getPeriode().id,
- serviceId : service.id
- },
-
- success : function(response, request) {
- var reponse = Ext.decode(response.responseText);
- if (reponse.success != true) {
- if (reponse.errorMsg) {
- eliot.notes.Messages.showErreur(reponse.errorMsg);
- }
- else {
- request.failure.call(this);
- }
- }
- else {
- this.graphTdn.afficheGraph(reponse.data, reponse.impressionGraph);
- this.fireEvent(this.Constantes.eventId.actionOuvrirGraphTdnWindow, service);
- }
- },
- failure : function() {
- eliot.notes.Messages.showErreur(
- this.ConfigServeur.messages.tblNotesGraphEchou
- );
- },
- scope : this
- });
- },
-
/**
* Ouvre la synthèse
*/
this.banqueAppreciation = cfg.banqueAppreciation;
this.periodeModel = cfg.periodeModel;
this.eleveModel = cfg.eleveModel;
- this.graphTdn = cfg.graphTdn;
this.initSaisie();
this.initAffichage();
this.initGraphCompnents();
- this.initGraphTdnWindow();
this.items = [this.getMainItem()];
},
- initGraphTdnWindow: function() {
-
- var view = this;
-
- var graphTdnWindow = new Ext.Window({
- layout:'fit',
- width:800,
- height:500,
- closeAction:'hide',
- plain: true,
- modal: true,
- items: [
- {
- border: false,
- frame: false,
- layout: 'border',
- items: [
- {
- border: false,
- frame: false,
- region: 'center',
- layout: 'fit',
-
- items: this.graphTdn.getItems()
- },
- {
- region: 'east',
- xtype: 'panel',
-
- border: false,
- frame : false,
- layout : 'border',
- split: true,
- width: 200,
- minSize: 20,
- collapseMode: 'mini',
-
- items: [
- {
- cls: 'legendcb',
- region: 'north',
- border: false,
- frame : false,
- height: 100,
- items: []
- },
- {
- region: 'center',
- border: false,
- frame : false,
- layout : 'fit',
- items: [
- this.graphTdn.getLegendItem()
- ]
- }
- ]
- }
- ]
- }
- ],
- buttonAlign: 'left',
- buttons: [
- {
- icon: this.ConfigServeur.icon.graphEtoile,
- tooltip: this.ConfigServeur.libelle.graphEtoile,
- toggleGroup: 'graphTdn',
- allowDepress: false,
- pressed: true,
- handler: function() {
- view.graphTdn.toggleGraphEtoile();
- }
- },
- {
- icon: this.ConfigServeur.icon.graphEleveClasseCompare,
- tooltip: this.ConfigServeur.libelle.graphEleveClasseCompare,
- toggleGroup: 'graphTdn',
- allowDepress: false,
- handler: function() {
- view.graphTdn.toggleGraphEleveClasseCompare();
- }
- },
- '->',
- {
- text: this.ConfigServeur.libelle.fermer,
- handler: function() {
- graphTdnWindow.hide();
- }
- },
- {
- text: this.ConfigServeur.libelle.imprimer,
- handler: function() {
- view.graphTdn.imprime();
- }
- }
- ]
- });
- this.graphTdnWindow = graphTdnWindow;
- },
-
/**
* Initialise la saisie
*/
}
}
- var controller = this.config.controller;
-
// Graph
var graph = new eliot.notes.consultation.commun.graph.Composant({
- onClick: function(event, element, graphConfig) {
- controller.onGraphClick(event, element, graphConfig);
- },
-
dataFilter: function(data) {
if (periodes != null) {
var filter = false;