isModeModification : undefined,
etablissements : undefined,
etablissementCourant : undefined,
- profils : undefined
+ profils : undefined,
+ profilResponsable : undefined,
+ personneResponsables : undefined,
+ personneResponsable : undefined
},
libelle : {
comboEtablissementField : undefined,
// Evénements
this.addEvents(
- /**
- * @event nomSelectionneValide est déclenché quand le troisième comboBox
- * dans popUp fenetre a choisi
- * @param idItemSelectionne id du item sélectionné
- * @param nomItemSelectionne nom du item sélectionné
- * @param idItemsSelectionnes liste des ids des items sélectionnés lors de
- * la multi-sélection
- */
- this.Constantes.eventId.nomSelectionneValide,
- /**
- * @event personneValidee est déclenché quand le bouton 'valider' de popUp
- * est cliqué
- * @param idItemSelectionne id du item sélectionné
- * @param nomItemSelectionne nom du item sélectionné
- * @param idItemsSelectionnes liste des ids des items sélectionnés lors de
- * la multi-sélection
- */
- this.Constantes.eventId.personneValidee,
- /**
- * @event afficherMessageDialogue est déclenché quand utilisateur en mode
- * modification, il clique sur bouton 'Choisir' du composant 'élève puni'
- * il déclenche une boite de message.
- */
- this.Constantes.eventId.afficherMessageDialogue,
- /**
- * @event initialiseComboReste est déclenché quand le premier combo
- * est expand
- */
- this.Constantes.eventId.initialiseComboReste
- );
+ /**
+ * @event nomSelectionneValide est déclenché quand le troisième comboBox
+ * dans popUp fenetre a choisi
+ * @param idItemSelectionne id du item sélectionné
+ * @param nomItemSelectionne nom du item sélectionné
+ * @param idItemsSelectionnes liste des ids des items sélectionnés lors de
+ * la multi-sélection
+ */
+ this.Constantes.eventId.nomSelectionneValide,
+ /**
+ * @event personneValidee est déclenché quand le bouton 'valider' de popUp
+ * est cliqué
+ * @param idItemSelectionne id du item sélectionné
+ * @param nomItemSelectionne nom du item sélectionné
+ * @param idItemsSelectionnes liste des ids des items sélectionnés lors de
+ * la multi-sélection
+ */
+ this.Constantes.eventId.personneValidee,
+ /**
+ * @event afficherMessageDialogue est déclenché quand utilisateur en mode
+ * modification, il clique sur bouton 'Choisir' du composant 'élève puni'
+ * il déclenche une boite de message.
+ */
+ this.Constantes.eventId.afficherMessageDialogue,
+ /**
+ * @event initialiseComboReste est déclenché quand le premier combo
+ * est expand
+ */
+ this.Constantes.eventId.initialiseComboReste
+ );
},
/**
*/
observeCompositFieldView : function(compositFieldView) {
compositFieldView.addListener(
- eliot.absences.communs.CompositFieldViewConstantes.eventId.
- actionChoisir,
- function(isElevePuni) {
- var modeModification = this.Modeles.data.isModeModification;
- if (modeModification && isElevePuni && (this.autoriteId != null)) {
- this.fireEvent(
- this.Constantes.eventId.afficherMessageDialogue
- );
- } else {
- this.actionAfficherPopUp(isElevePuni);
- }
- },
- this
+ eliot.absences.communs.CompositFieldViewConstantes.eventId.
+ actionChoisir,
+ function(isElevePuni) {
+ var modeModification = this.Modeles.data.isModeModification;
+ if (modeModification && isElevePuni && (this.autoriteId != null)) {
+ this.fireEvent(
+ this.Constantes.eventId.afficherMessageDialogue
);
+ } else {
+ this.actionAfficherPopUp(isElevePuni);
+ }
+ },
+ this
+ );
compositFieldView.addListener(
- eliot.absences.communs.CompositFieldViewConstantes.eventId.
- actionSupprimeAssociationPunition,
- function(isElevePuni) {
- this.actionAfficherPopUp(isElevePuni);
- },
- this
- );
+ eliot.absences.communs.CompositFieldViewConstantes.eventId.
+ actionSupprimeAssociationPunition,
+ function(isElevePuni) {
+ this.actionAfficherPopUp(isElevePuni);
+ },
+ this
+ );
},
/**
var troisiemeComboDansFenetre = contenu[3];
this.fenetreDeRecherche = new eliot.absences.commons.
- PopUpFenetreView({
- titreDeFenetre : titreDeFenetre,
- premierComboDansFenetre : premierComboDansFenetre,
- deuxiemeComboDansFenetre : deuxiemeComboDansFenetre,
- troisiemeComboDansFenetre :troisiemeComboDansFenetre
- });
+ PopUpFenetreView({
+ titreDeFenetre : titreDeFenetre,
+ premierComboDansFenetre : premierComboDansFenetre,
+ deuxiemeComboDansFenetre : deuxiemeComboDansFenetre,
+ troisiemeComboDansFenetre :troisiemeComboDansFenetre
+ });
this.fenetreDeRecherche.observePopUpFenetreController(this);
this.observePopUpFenetreView(this.fenetreDeRecherche);
+
+ if (this.Modeles.data.personneResponsable != 'undefined'){
+ var idItemSelectionne = parseInt(this.Modeles.data.personneResponsable);
+ var recordSelectionne = this.comboPersonneEducController.storeCrud.getById(idItemSelectionne);
+ var libelleItemSelectione = recordSelectionne.get("libelle");
+ this.fireEvent(this.Constantes.eventId.nomSelectionneValide,
+ idItemSelectionne, libelleItemSelectione);
+ }
},
/**
},
/**
- * La méthoder permet de construire une popUp fenetre pour choisir une élève puni.
+ * La méthode permet de construire une popUp permettant de sélectionner l'élève puni.
* la fenetre contient : combo Etablissement + combo profils + combo personne
* @param contenu contenu de la fenetre
*/
*/
observeCombo1Controller : function(combo1Controller) {
combo1Controller.addListener(
- eliot.absences.commons.CRUDPopUpComboControllerConstantes.
- eventId.itemExpand,
- function() {
- if (this.isTypeCenseur) {
- this.initialiseCombosProfil();
- this.initialiseCombosPersonneEduc();
- } else {
- this.initialiseCombosClasse();
- this.initialiseCombosEleve();
- }
- this.fireEvent(this.Constantes.eventId.initialiseComboReste);
- },
- this
- );
+ eliot.absences.commons.CRUDPopUpComboControllerConstantes.
+ eventId.itemExpand,
+ function() {
+ if (this.isTypeCenseur) {
+ this.initialiseCombosProfil();
+ this.initialiseCombosPersonneEduc();
+ } else {
+ this.initialiseCombosClasse();
+ this.initialiseCombosEleve();
+ }
+ this.fireEvent(this.Constantes.eventId.initialiseComboReste);
+ },
+ this
+ );
combo1Controller.addListener(
- eliot.absences.commons.CRUDPopUpComboControllerConstantes.
- eventId.itemChange,
- function(itemSelectionne) {
- this.combo1ItemSelectionne = itemSelectionne;
- if (this.isTypeCenseur) {
- if (this.combo2ItemSelectionne) {
- this.rechargeStoreComboPersonneEduc(
- this.combo1ItemSelectionne,
- this.combo2ItemSelectionne
- );
- }
- } else {
- this.rechargeStoreComboStructureEns(this.combo1ItemSelectionne);
- }
- },
- this
- );
+ eliot.absences.commons.CRUDPopUpComboControllerConstantes.
+ eventId.itemChange,
+ function(itemSelectionne) {
+ this.combo1ItemSelectionne = itemSelectionne;
+ if (this.isTypeCenseur) {
+ if (this.combo2ItemSelectionne) {
+ this.rechargeStoreComboPersonneEduc(
+ this.combo1ItemSelectionne,
+ this.combo2ItemSelectionne
+ );
+ }
+ } else {
+ this.rechargeStoreComboStructureEns(this.combo1ItemSelectionne);
+ }
+ },
+ this
+ );
},
/**
*/
observeCombo2Controller : function(combo2Controller) {
combo2Controller.addListener(
- eliot.absences.commons.CRUDPopUpComboControllerConstantes.
- eventId.itemChange,
- function(itemSelectionne) {
- this.combo2ItemSelectionne = itemSelectionne;
- if (this.isTypeCenseur) {
- if (this.combo1ItemSelectionne) {
- this.rechargeStoreComboPersonneEduc(
- this.combo1ItemSelectionne,
- this.combo2ItemSelectionne
- );
- }
- } else {
- this.rechargeStoreComboEleve(this.combo2ItemSelectionne);
- }
- },
- this
- );
+ eliot.absences.commons.CRUDPopUpComboControllerConstantes.
+ eventId.itemChange,
+ function(itemSelectionne) {
+ this.combo2ItemSelectionne = itemSelectionne;
+ if (this.isTypeCenseur) {
+ if (this.combo1ItemSelectionne) {
+ this.rechargeStoreComboPersonneEduc(
+ this.combo1ItemSelectionne,
+ this.combo2ItemSelectionne
+ );
+ }
+ } else {
+ this.rechargeStoreComboEleve(this.combo2ItemSelectionne);
+ }
+ },
+ this
+ );
combo2Controller.addListener(
- eliot.absences.commons.CRUDPopUpComboControllerConstantes.
- eventId.itemExpand,
- function() {
- if (this.isTypeCenseur) {
- this.initialiseCombosPersonneEduc();
- } else {
- this.initialiseCombosEleve();
- }
- this.fireEvent(this.Constantes.eventId.initialiseComboReste);
- },
- this
- );
+ eliot.absences.commons.CRUDPopUpComboControllerConstantes.
+ eventId.itemExpand,
+ function() {
+ if (this.isTypeCenseur) {
+ this.initialiseCombosPersonneEduc();
+ } else {
+ this.initialiseCombosEleve();
+ }
+ this.fireEvent(this.Constantes.eventId.initialiseComboReste);
+ },
+ this
+ );
},
/**
var Constantes = eliot.absences.commons.CRUDPopUpComboControllerConstantes;
combo3Controller.addListener(Constantes.eventId.itemChange,
- function(itemSelectionne) {
- var idItemSelectionne = itemSelectionne;
- var recordSelectionne = combo3Controller.storeCrud.getById(itemSelectionne);
- var libelleItemSelectione = recordSelectionne.get("libelle");
+ function(itemSelectionne) {
+ var idItemSelectionne = itemSelectionne;
+ var recordSelectionne = combo3Controller.storeCrud.getById(itemSelectionne);
+ var libelleItemSelectione = recordSelectionne.get("libelle");
- this.fireEvent(this.Constantes.eventId.nomSelectionneValide,
- idItemSelectionne, libelleItemSelectione);
+ this.fireEvent(this.Constantes.eventId.nomSelectionneValide,
+ idItemSelectionne, libelleItemSelectione);
- }, this);
+ }, this);
},
observeLovCombo3Controller : function(combo3Controller) {
*/
creeComboEtablissement : function() {
this.comboEtablissementController = new eliot.absences.commons.
- CRUDPopUpComboController({
- data : this.Modeles.data.etablissements
- });
+ CRUDPopUpComboController({
+ data : this.Modeles.data.etablissements
+ });
this.combo1ItemSelectionne = this.Modeles.data.etablissementCourant;
this.comboEtablissementView = new eliot.absences.commons.CRUDPopUpComboView({
storeCrud : this.comboEtablissementController.storeCrud,
* Création du comboBox de profils dans fenetre de recherche
*/
creeComboProfil : function() {
+ var valeurAffichee;
+ var disabled;
+ if (this.Modeles.data.profilResponsable != 'undefined' && this.Modeles.data.profilResponsable != undefined){
+ valeurAffichee = this.Modeles.data.profilResponsable;
+ disabled = true;
+ } else {
+ valeurAffichee = this.Modeles.message.selectionProfil;
+ disabled = false;
+ }
this.comboProfilController = new eliot.absences.commons.CRUDPopUpComboController({
data : this.Modeles.data.profils
});
this.comboProfilView = new eliot.absences.commons.CRUDPopUpComboView({
storeCrud : this.comboProfilController.storeCrud,
label : this.Modeles.libelle.comboProfilField,
- valeurAffichee : this.Modeles.message.selectionProfil
+ valeurAffichee : valeurAffichee,
+ disabled : disabled
});
},
* Création du comboBox de personne éductation dans fenetre de recherche
*/
creeComboPersonneEduc :function() {
- this.comboPersonneEducController = new eliot.absences.commons.CRUDPopUpComboController({
- url : this.Modeles.url.urlListePersonneProfil
- });
+ var valeurAffichee;
+ var disabled;
+ if (this.Modeles.data.personneResponsable != 'undefined' && this.Modeles.data.profilResponsable != undefined){
+ this.comboPersonneEducController = new eliot.absences.commons.CRUDPopUpComboController({
+ data : this.Modeles.data.personneResponsables
+ });
+ valeurAffichee = parseInt(this.Modeles.data.personneResponsable);
+ disabled = true;
+ } else {
+ this.comboPersonneEducController = new eliot.absences.commons.CRUDPopUpComboController({
+ url : this.Modeles.url.urlListePersonneProfil
+ });
+ valeurAffichee = this.Modeles.message.selectionProfil;
+ disabled = false;
+ }
this.comboPersonneEducView = new eliot.absences.commons.CRUDPopUpComboView({
storeCrud : this.comboPersonneEducController.storeCrud,
label : this.Modeles.libelle.comboPersonneEducField,
- valeurAffichee : this.Modeles.message.selectionPersonneEduc
+ valeurAffichee : valeurAffichee,
+ disabled : disabled
});
},